sqllogictest

Artifact [f2537ca040]
Login

Artifact f2537ca040b17f0d2feff0764adad4a79ad6a782:


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 53 * + col2 + + cor0.col2 FROM tab2 AS cor0
----
1404
1458
2052

onlyif mysql # use DIV operator for integer division
query I rowsort label-1
SELECT - col1 DIV col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-1
SELECT - col1 / col2 AS col0 FROM tab0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2
SELECT 30 * col1 DIV + col1 - col1 FROM tab2 AS cor0
----
-1
-29
13

skipif mysql # not compatible
query I rowsort label-2
SELECT 30 * col1 / + col1 - col1 FROM tab2 AS cor0
----
-1
-29
13

query I rowsort
SELECT DISTINCT - 92 * - col2 + + col0 FROM tab0 cor0
----
127
3060
7633

onlyif mysql # use DIV operator for integer division
query I rowsort label-4
SELECT DISTINCT - - col0 + + col0 DIV cor0.col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-4
SELECT DISTINCT - - col0 + + col0 / cor0.col2 FROM tab0 AS cor0
----
24
70
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5
SELECT - col2 * + 76 * col1 + col1 DIV - 61 + col0 * col0 AS col0 FROM tab1 cor0
----
-106695
-39224
-88448

skipif mysql # not compatible
query I rowsort label-5
SELECT - col2 * + 76 * col1 + col1 / - 61 + col0 * col0 AS col0 FROM tab1 cor0
----
-106695
-39224
-88448

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

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

query I rowsort
SELECT DISTINCT + 22 * + ( col2 * 94 ) + - col2 * - cor0.col2 + col1 AS col2 FROM tab2 AS cor0
----
54503
56596
80045

onlyif mysql # use DIV operator for integer division
query I rowsort label-9
SELECT ( - 28 ) DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9
SELECT ( - 28 ) / col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 6 + + col1 col1 FROM tab0 AS cor0
----
80
85
91

query I rowsort
SELECT + 66 + col0 * col1 + + ( 74 * col1 ) FROM tab2 AS cor0
----
2577
2667
9034

query I rowsort
SELECT + 88 - cor0.col0 FROM tab1 AS cor0
----
24
8
85

query I rowsort
SELECT DISTINCT - 5 * + cor0.col0 FROM tab0 AS cor0
----
-120
-175
-445

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

query I rowsort
SELECT ALL - - 64 FROM tab2 AS cor0
----
64
64
64

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

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

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

query I rowsort
SELECT ALL + ( 19 ) + col1 * - col0 FROM tab1 AS cor0
----
-1021
-59
-621

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

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

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

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

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

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

query I rowsort
SELECT 53 + - col2 + col2 AS col1 FROM tab1 AS cor0
----
53
53
53

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

query I rowsort
SELECT - col2 * col2 * - cor0.col2 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
154548
181944
875520

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

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

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

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

query I rowsort
SELECT ALL - - col0 * + col1 - 65 FROM tab2 AS cor0
----
1278
152
4537

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

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

query I rowsort
SELECT ALL + cor0.col2 + - ( ( col0 ) ) * + ( - ( - col1 ) ) FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + col0 + 66 * cor0.col0 FROM tab0 cor0
----
1608
2345
5963

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

query I rowsort
SELECT DISTINCT - + col2 + - col1 * - col2 * - col2 FROM tab2 AS cor0
----
-22626
-24586
-39910

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

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

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

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

query I rowsort
SELECT cor0.col0 * + 72 FROM tab0, tab2 AS cor0
----
9 values hashing to 18a75408bc15f458d0d684a9de456b0b

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

query I rowsort
SELECT DISTINCT col1 + + ( + col2 ) - - col1 AS col1 FROM tab1
----
106
122
77

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

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

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

query I rowsort
SELECT + - 45 + 79 FROM tab1 AS cor0
----
34
34
34

query I rowsort
SELECT ALL + 10 - 11 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to f3aaea07874d9328a91c424c0907a688

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

query I rowsort
SELECT DISTINCT tab1.col1 + 21 AS col1 FROM tab1
----
31
34
47

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

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

query I rowsort
SELECT ALL - tab1.col2 + + col2 FROM tab1
----
0
0
0

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

query I rowsort
SELECT 10 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

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

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

query I rowsort
SELECT - + 72 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-6192
-6552
-6984

query I rowsort
SELECT DISTINCT - - col1 + 57 * + cor0.col0 FROM tab1 AS cor0
----
197
3658
4573

query I rowsort
SELECT DISTINCT - 74 + - col1 FROM tab1 AS cor0
----
-100
-84
-87

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

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

query I rowsort
SELECT ALL + 65 * col1 FROM tab1
----
1690
650
845

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

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

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

query I rowsort
SELECT + 35 AS col1 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col2 + + col1 col1 FROM tab0
----
194
2924
7553

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

query I rowsort
SELECT DISTINCT - 43 * col1 FROM tab2
----
-1333
-2537
-731

query I rowsort
SELECT DISTINCT + + cor0.col2 + 32 * - col0 FROM tab0 AS cor0
----
-1119
-2766
-735

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

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

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

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

query I rowsort
SELECT ALL - 17 + col0 FROM tab0
----
18
7
72

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

skipif mysql # not compatible
query I rowsort label-74
SELECT DISTINCT + col1 * CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-75
SELECT col2 + 95 DIV 41 FROM tab0 AS cor0
----
3
35
84

skipif mysql # not compatible
query I rowsort label-75
SELECT col2 + 95 / 41 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT ALL + + cor0.col1 * 8 * cor0.col2 FROM tab1 AS cor0
----
11232
4560
9984

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

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

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

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

query I rowsort
SELECT - cor0.col2 FROM tab2, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

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

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE col2 + - col0 * col0 BETWEEN col2 AND ( + col0 + col0 * col2 * + col0 )
----

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-87
SELECT col2 * + col1 + cor0.col1 DIV - col1 FROM tab1 cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-87
SELECT col2 * + col1 + cor0.col1 / - col1 FROM tab1 cor0
----
1247
1403
569

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

query I rowsort
SELECT DISTINCT col2 * - col0 AS col1 FROM tab0
----
-35
-7298
-792

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col2 * col1 col0 FROM tab0
----
244068
679042
9409

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-99
SELECT ALL - cor0.col2 DIV cor0.col0 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 721682d0719de924079c33bd72eef789

skipif mysql # not compatible
query I rowsort label-99
SELECT ALL - cor0.col2 / cor0.col0 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 721682d0719de924079c33bd72eef789

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

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

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

query I rowsort
SELECT ALL col0 - + col0 AS col0 FROM tab1
----
0
0
0

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

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

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 DISTINCT col0 * + col2 + col0 * - tab0.col1 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT col0 + col1 * col2 + col0 AS col2 FROM tab1
----
1408
1410
698

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

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

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

query I rowsort
SELECT + col1 - + col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT + 25 FROM tab0, tab1 AS cor0, tab0 cor1, tab1, tab0 AS cor2
----
243 values hashing to c6e5a3144a256401485973f820a8ac30

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

query I rowsort
SELECT + + col1 * + col1 * 19 FROM tab0 AS cor0
----
140524
157339
178771

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

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

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

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

query I rowsort
SELECT + col0 + - 94 + - col0 AS col1 FROM tab1 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ALL col0 + ( 4 ) FROM tab2 AS cor0
----
11
82
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * - 18 + col0 + - col1 col0 FROM tab2 AS cor0
----
-1360
-1385
-150

onlyif mysql # use DIV operator for integer division
query I rowsort label-123
SELECT DISTINCT + col1 DIV - ( - ( - col1 ) + 23 ) FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-123
SELECT DISTINCT + col1 / - ( - ( - col1 ) + 23 ) FROM tab1 AS cor0
----
0

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

query I rowsort
SELECT + cor0.col1 * col1 - 5 * col2 FROM tab1 cor0
----
-185
-311
406

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

skipif mysql # not compatible
query I rowsort label-126
SELECT DISTINCT - col1 / - 80 FROM tab0 AS cor0
----
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-128
SELECT ALL + col1 DIV ( 54 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-128
SELECT ALL + col1 / ( 54 ) FROM tab1 AS cor0
----
0
0
0

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

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

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

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

query I rowsort
SELECT + 30 * + 70 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 3ecfda54ec560635eda9f4b6cc0ff915

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

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

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

query I rowsort
SELECT + col2 * col2 FROM tab1 WHERE col1 > - tab1.col0 - col2
----
2916
3249
9216

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

query I rowsort
SELECT ALL tab0.col2 * + col2 - - col2 FROM tab0
----
1122
2
6806

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * + col1 * col2 - col1 * col1 AS col0 FROM tab0
----
-6014
60716
655837

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-149
SELECT col0 DIV col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-149
SELECT col0 / col1 FROM tab1
----
0
6
6

query I rowsort
SELECT ALL - col1 * - col2 + - col0 FROM tab0
----
2814
62
7373

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

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

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

query I rowsort
SELECT + ( col1 * + col1 ) + col1 AS col0 FROM tab1
----
110
182
702

query I rowsort
SELECT + 71 - col0 AS col1 FROM tab2
----
-7
-8
64

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

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

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

skipif mysql # not compatible
query I rowsort label-158
SELECT - tab0.col0 + + col2 / + ( + tab0.col0 ) FROM tab0
----
-23
-35
-89

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

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

query I rowsort
SELECT ALL col2 + col2 * - 45 * + col0 FROM tab1 AS cor0
----
-164103
-345504
-7236

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

query I rowsort
SELECT ALL cor0.col2 * - 95 FROM tab0, tab2 cor0
----
9 values hashing to 381c83e2a0077d0955cd3283ddc85954

query I rowsort
SELECT + ( col0 ) AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT - 56 + col1 * col0 FROM tab2
----
1287
161
4546

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

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

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

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

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

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

query I rowsort
SELECT + col2 + - 43 * col2 FROM tab2 AS cor0
----
-1092
-1134
-1596

query I rowsort
SELECT DISTINCT - col0 + 56 FROM tab0 AS cor0
----
-33
21
32

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-174
SELECT col0 * col2 DIV - 82 AS col1 FROM tab0
----
-89
-9
0

skipif mysql # not compatible
query I rowsort label-174
SELECT col0 * col2 / - 82 AS col1 FROM tab0
----
-89
-9
0

query I rowsort
SELECT ALL - - 69 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

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

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

query I rowsort
SELECT + col0 * ( 65 ) + + col1 FROM tab1 cor0
----
221
4170
5213

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

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

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

query I rowsort
SELECT - col2 + 40 FROM tab0 cor0
----
-42
39
7

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

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

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

query I rowsort
SELECT 35 + - ( + col0 ) AS col1 FROM tab1
----
-29
-45
32

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

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

query I rowsort
SELECT ALL - - 2 + + col1 * - col1 AS col1 FROM tab0 AS cor0
----
-7394
-8279
-9407

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

query I rowsort
SELECT ALL 46 * cor0.col0 FROM tab2 AS cor0
----
322
3588
3634

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

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

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 ALL + col1 * col2 * cor0.col2 col2 FROM tab1 AS cor0
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-196
SELECT DISTINCT - + 92 DIV col2 FROM tab0 AS cor0
----
-1
-2
-92

skipif mysql # not compatible
query I rowsort label-196
SELECT DISTINCT - + 92 / col2 FROM tab0 AS cor0
----
-1
-2
-92

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

skipif mysql # not compatible
query I rowsort label-197
SELECT - - 91 / col2 FROM tab1 AS cor0
----
0
1
1

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

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

query I rowsort
SELECT DISTINCT + 44 * + col0 AS col2 FROM tab1 AS cor0
----
132
2816
3520

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-204
SELECT ALL 82 * - cor0.col2 DIV - col2 FROM tab1 AS cor0
----
82
82
82

skipif mysql # not compatible
query I rowsort label-204
SELECT ALL 82 * - cor0.col2 / - col2 FROM tab1 AS cor0
----
82
82
82

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

query I rowsort
SELECT + 95 + + col2 * 66 FROM tab2 AS cor0
----
1811
1877
2603

query I rowsort
SELECT ALL + col0 * col1 + col1 + + 32 FROM tab2 AS cor0
----
1392
280
4693

query I rowsort
SELECT ALL + - col2 * + col2 - - 80 * col2 AS col0 FROM tab1 AS cor0
----
-1536
1311
1404

onlyif mysql # use DIV operator for integer division
query I rowsort label-209
SELECT ALL + cor1.col2 DIV 61 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif mysql # not compatible
query I rowsort label-209
SELECT ALL + cor1.col2 / 61 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 14fcfa6c11198893073049d94262832c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 12 col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
12

query I rowsort
SELECT + 33 + col2 * col1 FROM tab1 AS cor0
----
1281
1437
603

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

query I rowsort
SELECT - 12 * cor0.col0 * - col2 + - cor0.col1 FROM tab0 AS cor0
----
323
87485
9418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 * + col1 col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - 14 * + col2 AS col1 FROM tab0 AS cor0
----
-1148
-14
-462

query I rowsort
SELECT 7 + col0 * - col1 FROM tab0 AS cor0
----
-2057
-3388
-8092

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

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

query I rowsort
SELECT + - col1 * + 72 FROM tab2 cor0
----
-1224
-2232
-4248

query I rowsort
SELECT 32 * + ( - col0 ) + - col0 AS col2 FROM tab2 AS cor0
----
-231
-2574
-2607

query I rowsort
SELECT ALL + 97 FROM tab2, tab0 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

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

query I rowsort
SELECT 11 + cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1dd16a424f474ddb6de21fafc3f7d79c

query I rowsort
SELECT + 70 * - col1 FROM tab2
----
-1190
-2170
-4130

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-226
SELECT ALL col0 DIV 1 AS col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-226
SELECT ALL col0 / 1 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL - 28 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to c3e7fa3d059fc708f03c60e9cef0c115

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

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

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

query I rowsort
SELECT ALL 74 * + col2 FROM tab0 AS cor0
----
2442
6068
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 * + 28 * - col1 - cor0.col1 col1 FROM tab2 AS cor0
----
-17629
-32147
-61183

query I rowsort
SELECT ALL + + 45 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # use DIV operator for integer division
query I rowsort label-234
SELECT ALL 23 DIV tab2.col1 AS col0 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-234
SELECT ALL 23 / tab2.col1 AS col0 FROM tab2
----
0
0
1

query I rowsort
SELECT - tab2.col1 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-236
SELECT DISTINCT col2 - 49 DIV + col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-236
SELECT DISTINCT col2 - 49 / + col2 FROM tab1
----
54
57
96

query I rowsort
SELECT 17 + col0 AS col0 FROM tab2
----
24
95
96

query I rowsort
SELECT col0 * 83 AS col2 FROM tab2
----
581
6474
6557

query I rowsort
SELECT DISTINCT col0 - 78 FROM tab1
----
-14
-75
2

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

query I rowsort
SELECT - - col0 + - 38 FROM tab1 AS cor0
----
-35
26
42

query I rowsort
SELECT + 78 AS col0 FROM tab2
----
78
78
78

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

query I rowsort
SELECT + + 93 * + cor0.col2 FROM tab0 AS cor0
----
3069
7626
93

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

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

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

query I rowsort
SELECT + col0 + + 46 AS col2 FROM tab2
----
124
125
53

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

skipif mysql # not compatible
query I rowsort label-249
SELECT - + col2 + + CAST ( - col2 AS INTEGER ) * col1 AS col0 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT col1 * - 85 FROM tab0 AS cor0
----
-7310
-7735
-8245

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

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

query I rowsort
SELECT col1 * 80 FROM tab2 AS cor0
----
1360
2480
4720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( col0 + cor0.col0 ) * + 22 col1 FROM tab0 AS cor0
----
-149380
-356356
-90816

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

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

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

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

query I rowsort
SELECT col2 * 55 + - col0 FROM tab0
----
1791
20
4421

query I rowsort
SELECT DISTINCT - tab2.col1 * - col1 AS col0 FROM tab2
----
289
3481
961

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

query I rowsort
SELECT col2 * - 56 FROM tab0 AS cor0
----
-1848
-4592
-56

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 70 * col1 AS col0 FROM tab1 AS cor0
----
1820
700
910

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

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

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

query I rowsort
SELECT DISTINCT - + 42 AS col0 FROM tab0 AS cor0
----
-42

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

query I rowsort
SELECT ALL + - 22 + 87 * + cor0.col0 FROM tab1 AS cor0
----
239
5546
6938

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL 54 AS col1 FROM tab2 cor0
----
54
54
54

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

query I rowsort
SELECT ALL - col2 * + 89 AS col0 FROM tab2 AS cor0
----
-2314
-2403
-3382

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 81 col0 FROM tab2 AS cor0
----
2106
2187
3078

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

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

query I rowsort
SELECT DISTINCT 23 * + cor0.col1 FROM tab1 AS cor0
----
230
299
598

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

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

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

query I rowsort
SELECT 79 + + col1 + + col1 FROM tab0 AS cor0
----
251
261
273

query I rowsort
SELECT cor0.col2 + - cor0.col1 * 49 + col0 AS col2 FROM tab2 AS cor0
----
-1485
-2787
-716

query I rowsort
SELECT col1 * col2 + col1 * 42 FROM tab2 AS cor0
----
1360
2139
4012

query I rowsort
SELECT ALL 3 * col2 + 55 * - col0 - + col2 AS col2 FROM tab2 AS cor0
----
-331
-4238
-4269

query I rowsort
SELECT ALL - - 35 * cor0.col0 FROM tab2 AS cor0
----
245
2730
2765

query I rowsort
SELECT + - col0 + col2 * 6 FROM tab0 AS cor0
----
-29
174
403

onlyif mysql # use DIV operator for integer division
query I rowsort label-294
SELECT + 70 * col2 + + col2 * col1 DIV col2 AS col2 FROM tab1 AS cor0
----
3806
4000
6733

skipif mysql # not compatible
query I rowsort label-294
SELECT + 70 * col2 + + col2 * col1 / col2 AS col2 FROM tab1 AS cor0
----
3806
4000
6733

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

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

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

query I rowsort
SELECT ALL cor0.col2 * col2 + - 40 AS col0 FROM tab2 AS cor0
----
1404
636
689

query I rowsort
SELECT - 14 * - col2 FROM tab0 AS cor0
----
1148
14
462

query I rowsort
SELECT col2 * cor0.col2 + + col2 * col0 * 14 FROM tab2 AS cor0
----
29068
3375
43472

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

query I rowsort
SELECT DISTINCT + col2 + - 10 AS col2 FROM tab1 AS cor0
----
44
47
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-303
SELECT DISTINCT + col0 * 58 DIV - 9 FROM tab0 cor0
----
-154
-225
-573

skipif mysql # not compatible
query I rowsort label-303
SELECT DISTINCT + col0 * 58 / - 9 FROM tab0 cor0
----
-154
-225
-573

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

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

query I rowsort
SELECT DISTINCT + 14 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
14

query I rowsort
SELECT - 17 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

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

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

query I rowsort
SELECT DISTINCT + 43 * cor0.col2 + col1 FROM tab0 cor0
----
140
1505
3617

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 33 * + col0 col1 FROM tab2 AS cor0
----
-231
-2574
-2607

query I rowsort
SELECT ALL + - 94 + - col2 FROM tab2 AS cor0
----
-120
-121
-132

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col2 * - 70 col1 FROM tab1 AS cor0
----
-3806
-4000
-6733

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-316
SELECT ALL CAST( - 43 AS SIGNED ) AS col0 FROM tab2
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-316
SELECT ALL CAST ( - 43 AS INTEGER ) AS col0 FROM tab2
----
-43
-43
-43

query I rowsort
SELECT DISTINCT 40 * tab2.col0 * + col2 FROM tab2
----
120080
7560
81120

query I rowsort
SELECT ALL + 16 + - tab0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 3979181dd6c7607d1f17d03827c2ea32

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

query I rowsort
SELECT ALL - + 12 AS col0 FROM tab0 AS cor0
----
-12
-12
-12

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

query I rowsort
SELECT ALL - 70 + col0 FROM tab2 AS cor0
----
-63
8
9

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

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

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

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

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

query I rowsort
SELECT ALL col1 * 99 + - col2 * col0 AS col0 FROM tab2
----
-1319
2880
3813

query I rowsort
SELECT col2 + + 94 AS col0 FROM tab0 AS cor0
----
127
176
95

query I rowsort
SELECT DISTINCT + col1 - + 39 AS col0 FROM tab1 AS cor0
----
-13
-26
-29

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

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

query I rowsort
SELECT + + col0 * 76 FROM tab1 AS cor0
----
228
4864
6080

query I rowsort
SELECT ALL + col2 - - cor0.col0 * 25 AS col1 FROM tab0 AS cor0
----
2307
633
876

query I rowsort
SELECT DISTINCT + col1 * 39 - 94 AS col0 FROM tab2 AS cor0
----
1115
2207
569

query I rowsort
SELECT + col2 + col1 + col2 AS col1 FROM tab1
----
124
134
205

query I rowsort
SELECT ALL + + ( - 47 ) + - col0 * cor0.col1 FROM tab1 AS cor0
----
-1087
-125
-687

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-337
SELECT DISTINCT - - CAST( 31 AS SIGNED ) + col1 FROM tab1 AS cor0
----
41
44
57

skipif mysql # not compatible
query I rowsort label-337
SELECT DISTINCT - - CAST ( 31 AS INTEGER ) + col1 FROM tab1 AS cor0
----
41
44
57

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

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

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

query I rowsort
SELECT 63 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

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

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

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

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

skipif mysql # not compatible
query I rowsort label-344
SELECT ALL + ( col0 ) + col1 * + CAST ( + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL + 4 FROM tab1, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL col0 + + 69 AS col1 FROM tab1 AS cor0
----
133
149
72

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-348
SELECT ALL - CAST ( - cor0.col2 AS INTEGER ) col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL 78 AS col2 FROM tab0
----
78
78
78

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

query I rowsort
SELECT ALL 31 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-353
SELECT ALL - ( + col0 ) DIV col0 + col2 AS col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-353
SELECT ALL - ( + col0 ) / col0 + col2 AS col1 FROM tab1 AS cor0
----
53
56
95

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-355
SELECT + + ( + col0 ) * col0 DIV col1 + - col2 * - col1 FROM tab0 AS cor0
----
109
2844
7549

skipif mysql # not compatible
query I rowsort label-355
SELECT + + ( + col0 ) * col0 / col1 + - col2 * - col1 FROM tab0 AS cor0
----
109
2844
7549

query I rowsort
SELECT ( - 64 ) + col2 AS col1 FROM tab1 cor0
----
-10
-7
32

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

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

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

query I rowsort
SELECT - - col2 * 79 AS col1 FROM tab1 AS cor0
----
4266
4503
7584

query I rowsort
SELECT ALL - ( 72 ) * col2 + + col0 FROM tab0 AS cor0
----
-2352
-37
-5815

query I rowsort
SELECT col1 * col0 + + col1 * - 34 * + col1 AS col1 FROM tab2 AS cor0
----
-113752
-32457
-8483

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 * + 6 + cor0.col0 FROM tab0 cor0
----
-174
-403
29

query I rowsort
SELECT DISTINCT + - col0 * + col2 + - cor0.col0 * + col1 AS col1 FROM tab2 AS cor0
----
-406
-4345
-6630

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

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

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT + 99 + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 90ee3d89a7d1d86915439368158988af

query I rowsort
SELECT + - 19 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

query I rowsort
SELECT - 55 + - col1 * col1 - 31 FROM tab1 AS cor0
----
-186
-255
-762

query I rowsort
SELECT DISTINCT col0 + ( - 74 + col2 ) FROM tab2
----
-40
30
43

query I rowsort
SELECT DISTINCT + col1 + - col2 + col1 AS col1 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT ALL + 34 + - 1 FROM tab2, tab2 cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

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

query I rowsort
SELECT ALL + col0 + - ( 47 ) FROM tab2
----
-40
31
32

query I rowsort
SELECT + col2 * 71 AS col0 FROM tab0 AS cor0
----
2343
5822
71

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

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

query I rowsort
SELECT DISTINCT + ( - 38 ) FROM tab0, tab0 cor0
----
-38

query I rowsort
SELECT + ( - 76 ) FROM tab0, tab0 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT DISTINCT col0 + + 41 FROM tab2
----
119
120
48

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col1 - 45 col2 FROM tab2
----
244
3436
916

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-392
SELECT 32 DIV col0 FROM tab1 AS cor0
----
0
0
10

skipif mysql # not compatible
query I rowsort label-392
SELECT 32 / col0 FROM tab1 AS cor0
----
0
0
10

query I rowsort
SELECT - + 86 * - col2 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT ALL - - 6 + - col2 FROM tab2 AS cor0
----
-20
-21
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-395
SELECT - 96 DIV + cor0.col1 col0 FROM tab1 cor0
----
-3
-7
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-395
SELECT - 96 / + cor0.col1 col0 FROM tab1 cor0
----
-3
-7
-9

query I rowsort
SELECT ALL - + col1 - + col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + col2 * + 8 FROM tab0 AS cor0
----
264
656
8

query I rowsort
SELECT ALL - - col2 * 62 * 75 FROM tab2 AS cor0
----
120900
125550
176700

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-400
SELECT col2 DIV + cor0.col0 + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
192
2028
3002

skipif mysql # not compatible
query I rowsort label-400
SELECT col2 / + cor0.col0 + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
192
2028
3002

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

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

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

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

query I rowsort
SELECT ALL - 84 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-407
SELECT col0 * - cor0.col2 * + col1 + + ( + col1 ) DIV - col0 FROM tab2 AS cor0
----
-119652
-51034
-5863

skipif mysql # not compatible
query I rowsort label-407
SELECT col0 * - cor0.col2 * + col1 + + ( + col1 ) / - col0 FROM tab2 AS cor0
----
-119652
-51034
-5863

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-409
SELECT CAST( - col1 * - col1 AS SIGNED ) AS col1 FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-409
SELECT CAST ( - col1 * - col1 AS INTEGER ) AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - 27 * tab1.col2 FROM tab1
----
-1458
-1539
-2592

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

query I rowsort
SELECT DISTINCT - 21 * col0 * col1 FROM tab2
----
-28203
-4557
-96642

query I rowsort
SELECT ALL - - 63 + col1 FROM tab0 AS cor0
----
149
154
160

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-416
SELECT CAST( - col2 AS SIGNED ) * col0 * + 34 - - col0 AS col1 FROM tab1
----
-123968
-261040
-5505

skipif mysql # not compatible
query I rowsort label-416
SELECT CAST ( - col2 AS INTEGER ) * col0 * + 34 - - col0 AS col1 FROM tab1
----
-123968
-261040
-5505

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

query I rowsort
SELECT col0 * - 92 AS col1 FROM tab2
----
-644
-7176
-7268

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

query I rowsort
SELECT DISTINCT - tab2.col0 + 88 FROM tab2
----
10
81
9

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

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

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

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

query I rowsort
SELECT 95 * - col2 FROM tab1 AS cor0
----
-5130
-5415
-9120

query I rowsort
SELECT ALL - 97 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to deb52fa16b6d112bf86aa258415d922e

query I rowsort
SELECT ALL + 95 + - col2 + - col1 * + col1 FROM tab1 AS cor0
----
-170
-62
-635

query I rowsort
SELECT ALL - 96 * + cor0.col0 * col1 + + col2 AS col0 FROM tab0 AS cor0
----
-198111
-325919
-777422

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

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

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

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

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

query I rowsort
SELECT + col0 + col1 + 22 FROM tab1 AS cor0
----
115
51
96

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

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

query I rowsort
SELECT DISTINCT - 26 * - col2 + - cor0.col1 * 35 AS col2 FROM tab1 AS cor0
----
1132
2041
494

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

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

query I rowsort
SELECT ALL - 2 * + col1 AS col2 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT ALL 72 + + cor0.col1 * + col1 AS col2 FROM tab0 cor0
----
7468
8353
9481

query I rowsort
SELECT + 81 + tab0.col0 AS col2 FROM tab0
----
105
116
170

query I rowsort
SELECT + col1 + 49 AS col2 FROM tab0
----
135
140
146

query I rowsort
SELECT + tab2.col2 + - 57 + 85 FROM tab2
----
54
55
66

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

skipif mysql # not compatible
query I rowsort label-442
SELECT col2 * tab2.col1 / - col1 + + col2 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - 45 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT DISTINCT + col2 * + 39 + col2 FROM tab0 cor0
----
1320
3280
40

query I rowsort
SELECT - 96 + - col2 * + col1 AS col1 FROM tab2 AS cor0
----
-1630
-742
-933

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

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

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

query I rowsort
SELECT + - col1 + - 61 FROM tab2 AS cor0
----
-120
-78
-92

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-451
SELECT + cor0.col0 DIV 95 + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-451
SELECT + cor0.col0 / 95 + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-452
SELECT DISTINCT + - 75 DIV - cor1.col1 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab1 cor1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-452
SELECT DISTINCT + - 75 / - cor1.col1 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab1 cor1
----
2
5
7

query I rowsort
SELECT ALL col2 * - 42 AS col1 FROM tab0 AS cor0
----
-1386
-3444
-42

query I rowsort
SELECT + 81 + col1 FROM tab2 AS cor0
----
112
140
98

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-458
SELECT ALL - col0 + + cor0.col0 DIV cor0.col0 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-458
SELECT ALL - col0 + + cor0.col0 / cor0.col0 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( col0 AS REAL ) + - col1 AS col2 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col1 - 59 FROM tab2 AS cor0
----
-28
-42
0

query I rowsort
SELECT DISTINCT ( col2 ) + col1 * - 12 AS col0 FROM tab0 AS cor0
----
-1010
-1163
-999

query I rowsort
SELECT DISTINCT - 65 AS col2 FROM tab0 AS cor0
----
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 84 * ( col0 ) + 67 col2 FROM tab1 cor0
----
-185
-5309
-6653

query I rowsort
SELECT + col1 * ( col0 ) + - ( - col0 ) * col0 AS col2 FROM tab2 AS cor0
----
10686
266
7584

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

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

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

query I rowsort
SELECT col2 * cor0.col2 + - col0 * ( + col2 ) FROM tab0 cor0
----
-34
-574
297

query I rowsort
SELECT ALL + ( 27 ) * - col1 * ( col1 ) AS col2 FROM tab2 AS cor0
----
-25947
-7803
-93987

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-469
SELECT col1 + CAST( - col0 AS SIGNED ) * + cor0.col0 + + col1 FROM tab2 AS cor0
----
-5966
-6207
13

skipif mysql # not compatible
query I rowsort label-469
SELECT col1 + CAST ( - col0 AS INTEGER ) * + cor0.col0 + + col1 FROM tab2 AS cor0
----
-5966
-6207
13

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-471
SELECT cor2.col0 * cor0.col0 DIV - cor1.col2 + + cor0.col1 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to a49655c032849b691b64b5b38ad266ac

skipif mysql # not compatible
query I rowsort label-471
SELECT cor2.col0 * cor0.col0 / - cor1.col2 + + cor0.col1 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to a49655c032849b691b64b5b38ad266ac

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

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

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

query I rowsort
SELECT DISTINCT - col2 * + 52 AS col0 FROM tab1 AS cor0
----
-2808
-2964
-4992

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

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

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

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

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 ) * col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + col0 + + 86 FROM tab2 AS cor0
----
164
165
93

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

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

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

query I rowsort
SELECT - 25 * - ( col0 ) FROM tab2 AS cor0
----
175
1950
1975

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-485
SELECT col1 * ( 93 ) * + col1 + - CAST( col0 AS SIGNED ) AS col0 FROM tab0
----
687804
770044
875002

skipif mysql # not compatible
query I rowsort label-485
SELECT col1 * ( 93 ) * + col1 + - CAST ( col0 AS INTEGER ) AS col0 FROM tab0
----
687804
770044
875002

query I rowsort
SELECT ALL - + ( col1 ) * ( - 95 ) FROM tab2 AS cor0
----
1615
2945
5605

query I rowsort
SELECT col0 - - col2 * + 9 FROM tab1 cor0
----
489
577
944

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 3 * col1 col2 FROM tab1 AS cor0
----
-30
-39
-78

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-496
SELECT - col2 DIV col0 - col1 AS col1 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-496
SELECT - col2 / col0 - col1 AS col1 FROM tab2 AS cor0
----
-17
-34
-59

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

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

query I rowsort
SELECT 4 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL - 10 * col2 FROM tab0 AS cor0
----
-10
-330
-820

query I rowsort
SELECT ALL + - col0 + - col1 + - col2 FROM tab2 AS cor0
----
-134
-163
-65

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

query I rowsort
SELECT DISTINCT + col1 + - col2 + + cor0.col1 FROM tab1 AS cor0
----
-2
-37
-70

query I rowsort
SELECT 17 * col2 FROM tab1 AS cor0
----
1632
918
969

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

query I rowsort
SELECT ALL 30 + - col0 FROM tab1 AS cor0
----
-34
-50
27

query I rowsort
SELECT ALL - col2 * tab1.col2 + + col0 * ( - tab1.col2 ) + col0 FROM tab1
----
-16816
-3075
-6833

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

skipif mysql # not compatible
query I rowsort label-508
SELECT + 60 / col0 AS col0 FROM tab1
----
0
0
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-509
SELECT - col0 * col1 + + 57 + - col0 DIV - col0 FROM tab0 AS cor0
----
-2006
-3337
-8041

skipif mysql # not compatible
query I rowsort label-509
SELECT - col0 * col1 + + 57 + - col0 / - col0 FROM tab0 AS cor0
----
-2006
-3337
-8041

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

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

query I rowsort
SELECT ALL + 83 AS col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT ALL + 83 * + col1 FROM tab1
----
1079
2158
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-514
SELECT col0 * tab0.col1 DIV col2 FROM tab0
----
3395
62
98

skipif mysql # not compatible
query I rowsort label-514
SELECT col0 * tab0.col1 / col2 FROM tab0
----
3395
62
98

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

query I rowsort
SELECT ALL 30 * tab1.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 12ff78d90fb6d6e7b44bdd4157b90771

onlyif mysql # use DIV operator for integer division
query I rowsort label-517
SELECT DISTINCT col1 DIV + 40 FROM tab0
----
2

skipif mysql # not compatible
query I rowsort label-517
SELECT DISTINCT col1 / + 40 FROM tab0
----
2

query I rowsort
SELECT - - col0 + 37 FROM tab0 AS cor0
----
126
61
72

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

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

query I rowsort
SELECT - col2 * - col1 + col2 * + col0 FROM tab1 AS cor0
----
1566
4218
8928

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

query I rowsort
SELECT ALL - ( + tab0.col2 ) AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL + 59 * - col1 + + col0 AS col0 FROM tab2 AS cor0
----
-1822
-3403
-924

query I rowsort
SELECT ALL ( 78 ) * - col0 * col1 FROM tab2 AS cor0
----
-104754
-16926
-358956

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

query I rowsort
SELECT ALL - + ( 4 ) * col1 AS col1 FROM tab2 AS cor0
----
-124
-236
-68

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

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

query I rowsort
SELECT ALL 44 + tab2.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 0b5fa645936d47dc88e0ddbce82d072f

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

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

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

query I rowsort
SELECT - - 97 * col2 AS col0 FROM tab2 AS cor0
----
2522
2619
3686

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

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

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

query I rowsort
SELECT DISTINCT 14 * + 23 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1, tab2 cor2
----
322

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1, tab2 cor0, tab1 AS cor1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col1 * col0 col1 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - 88 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT ALL - col0 * ( col2 ) * col2 AS col1 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT + col2 + 80 + col2 AS col0 FROM tab2 AS cor0
----
132
134
156

query I rowsort
SELECT - + col1 + - col0 + - col2 * col1 FROM tab1 AS cor0
----
-1341
-1433
-644

query I rowsort
SELECT 26 * - col2 + + col0 FROM tab2 AS cor0
----
-598
-695
-909

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

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

query I rowsort
SELECT ALL - 29 - - col2 AS col0 FROM tab1 AS cor0
----
25
28
67

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

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

query I rowsort
SELECT ALL - + ( + 91 ) + cor0.col2 * - ( + col0 ) FROM tab2 AS cor0
----
-2119
-280
-3093

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

query I rowsort
SELECT DISTINCT + 28 FROM tab0
----
28

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

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

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

query I rowsort
SELECT - col1 + col0 + 28 FROM tab0 cor0
----
-34
-34
26

query I rowsort
SELECT - - cor0.col0 * - 95 AS col1 FROM tab1 cor0
----
-285
-6080
-7600

query I rowsort
SELECT + col1 + - col0 + + 36 FROM tab0 AS cor0
----
38
98
98

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

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

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

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

query I rowsort
SELECT - + col1 + + ( + col2 ) FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT col2 + + 10 FROM tab2 AS cor0
----
36
37
48

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

query I rowsort
SELECT DISTINCT - cor0.col2 * - 96 FROM tab2, tab1 cor0
----
5184
5472
9216

query I rowsort
SELECT ALL 25 AS col2 FROM tab2
----
25
25
25

query I rowsort
SELECT + - 65 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 4ca93c42a91c7dff917e7b7090ba9e57

query I rowsort
SELECT ALL + 79 * tab2.col2 FROM tab2
----
2054
2133
3002

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 28 * col1 FROM tab0
----
2408
2548
2716

query I rowsort
SELECT DISTINCT col2 * 34 FROM tab2 cor0
----
1292
884
918

query I rowsort
SELECT + - col1 * ( + col1 ) + + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-182
-5332
-6014

query I rowsort
SELECT DISTINCT col2 + 65 AS col1 FROM tab2
----
103
91
92

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

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

query I rowsort
SELECT - col1 * 70 * col2 AS col2 FROM tab1
----
-39900
-87360
-98280

query I rowsort
SELECT ALL 77 * 83 FROM tab2 AS cor0
----
6391
6391
6391

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

query I rowsort
SELECT + 94 FROM tab1 cor0
----
94
94
94

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-585
SELECT 50 DIV + 83 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-585
SELECT 50 / + 83 FROM tab2 AS cor0
----
0
0
0

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

query I rowsort
SELECT ALL - col0 + 84 AS col2 FROM tab1
----
20
4
81

query I rowsort
SELECT ALL tab0.col1 + - 91 FROM tab0
----
-5
0
6

query I rowsort
SELECT - col0 * col2 * + col0 + col0 + - 50 FROM tab1
----
-233458
-533
-614370

query I rowsort
SELECT - 7 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

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

query I rowsort
SELECT ALL - 72 * cor0.col2 FROM tab0 AS cor0
----
-2376
-5904
-72

query I rowsort
SELECT ALL - + col1 + col0 * + ( col0 ) + + cor0.col2 * - col2 FROM tab0 AS cor0
----
-599
1106
1127

query I rowsort
SELECT - 16 FROM tab1
----
-16
-16
-16

query I rowsort
SELECT ALL - + col0 * + col2 * 93 FROM tab2 AS cor0
----
-17577
-188604
-279186

query I rowsort
SELECT ALL - 25 * col1 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-1553
-504
-782

query I rowsort
SELECT ALL - - 93 + - col0 FROM tab0 AS cor0
----
4
58
69

query I rowsort
SELECT + 28 * col1 FROM tab2 AS cor0
----
1652
476
868

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

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

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

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

query I rowsort
SELECT + 33 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT 80 * - tab1.col1 + + col1 * col0 + + col0 * + col0 FROM tab1
----
-1993
3936
6400

query I rowsort
SELECT DISTINCT - col0 + col2 - + 89 FROM tab2
----
-130
-141
-69

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

query I rowsort
SELECT 4 * col2 - 55 FROM tab1
----
161
173
329

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-609
SELECT ALL - cor0.col2 DIV col0 + col1 FROM tab0 cor0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-609
SELECT ALL - cor0.col2 / col0 + col1 FROM tab0 cor0
----
85
91
97

query I rowsort
SELECT - 59 * - col2 * 37 + - col0 FROM tab0 AS cor0
----
178917
2148
72015

query I rowsort
SELECT ALL 98 + ( + tab2.col1 + 98 * - col1 ) FROM tab2
----
-1551
-2909
-5625

query I rowsort
SELECT DISTINCT - tab1.col2 * 87 FROM tab1
----
-4698
-4959
-8352

query I rowsort
SELECT col0 + + 35 AS col0 FROM tab2
----
113
114
42

query I rowsort
SELECT DISTINCT + 32 + + col0 * + col0 FROM tab2
----
6116
6273
81

query I rowsort
SELECT 24 FROM tab1
----
24
24
24

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

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

query I rowsort
SELECT + - 64 * col0 - col2 FROM tab1 AS cor0
----
-246
-4153
-5216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 26 * + 83 + + col1 + 36 col2 FROM tab0 AS cor0
----
-2025
-2031
-2036

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - cor0.col2 col1 FROM tab1 AS cor0
----
2916
3249
9216

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-625
SELECT DISTINCT + col2 * + col1 + - CAST( 19 AS SIGNED ) AS col2 FROM tab2 cor0
----
1515
627
818

skipif mysql # not compatible
query I rowsort label-625
SELECT DISTINCT + col2 * + col1 + - CAST ( 19 AS INTEGER ) AS col2 FROM tab2 cor0
----
1515
627
818

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

query I rowsort
SELECT ALL 70 * col0 - ( - col0 + - col2 ) AS col2 FROM tab0 AS cor0
----
1737
2486
6401

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

query I rowsort
SELECT col0 + col2 * + col1 * col1 AS col2 FROM tab0 cor0
----
244092
679131
9444

query I rowsort
SELECT + 96 + col0 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1439
313
4698

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col1 ) - - col2 col0 FROM tab1 AS cor0
----
109
67
80

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

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

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

query I rowsort
SELECT - col0 + + col2 * - 60 AS col2 FROM tab2 AS cor0
----
-1627
-1638
-2359

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

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

query I rowsort
SELECT 40 * tab2.col0 + col1 FROM tab2
----
311
3177
3179

query I rowsort
SELECT ( - 90 ) * - col0 + - ( col0 ) + + col2 FROM tab0
----
2169
3116
8003

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

query I rowsort
SELECT 72 AS col0 FROM tab2 AS cor0
----
72
72
72

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

query I rowsort
SELECT ALL col0 * + 99 FROM tab0 AS cor0
----
2376
3465
8811

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

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

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

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

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

query I rowsort
SELECT DISTINCT - - col1 * + 21 + + col2 FROM tab1 cor0
----
267
369
600

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

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

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

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

query I rowsort
SELECT DISTINCT - - col1 + col2 + - col0 AS col1 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT 1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

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

query I rowsort
SELECT ALL - ( 92 ) FROM tab0 cor0
----
-92
-92
-92

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

query I rowsort
SELECT + 97 FROM tab2, tab1 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 84 ) * col1 col2 FROM tab0 AS cor0
----
7224
7644
8148

query I rowsort
SELECT + col2 * 75 FROM tab2 AS cor0
----
1950
2025
2850

onlyif mysql # use DIV operator for integer division
query I rowsort label-663
SELECT DISTINCT - tab1.col0 DIV 9 FROM tab1
----
-7
-8
0

skipif mysql # not compatible
query I rowsort label-663
SELECT DISTINCT - tab1.col0 / 9 FROM tab1
----
-7
-8
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-664
SELECT - col1 DIV + col2 + + tab0.col1 AS col0 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-664
SELECT - col1 / + col2 + + tab0.col1 AS col0 FROM tab0
----
0
84
90

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-667
SELECT col0 DIV col1 AS col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-667
SELECT col0 / col1 AS col1 FROM tab1
----
0
6
6

query I rowsort
SELECT DISTINCT - col1 * + 40 FROM tab1 AS cor0
----
-1040
-400
-520

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

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

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

query I rowsort
SELECT + 58 + col0 * 36 FROM tab2
----
2866
2902
310

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

query I rowsort
SELECT + 55 * 36 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 86870309577f915d87b6adce04b0683f

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

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

onlyif mysql # use DIV operator for integer division
query I rowsort label-676
SELECT ALL 32 DIV cor1.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f473f62da6d05f118f2c7e1a6929ebb

skipif mysql # not compatible
query I rowsort label-676
SELECT ALL 32 / cor1.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f473f62da6d05f118f2c7e1a6929ebb

query I rowsort
SELECT ALL - col1 * - ( 75 ) + + col2 AS col2 FROM tab0 AS cor0
----
6483
6907
7276

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

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

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

query I rowsort
SELECT DISTINCT + col2 + + 97 + 58 FROM tab1 cor0
----
209
212
251

query I rowsort
SELECT DISTINCT cor0.col0 + 4 AS col0 FROM tab2 AS cor0
----
11
82
83

query I rowsort
SELECT - col0 * col0 + - col2 - + col0 FROM tab1 AS cor0
----
-4217
-6576
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-683
SELECT - col0 + - ( col0 ) DIV - cor0.col2 FROM tab1 cor0
----
-3
-63
-80

skipif mysql # not compatible
query I rowsort label-683
SELECT - col0 + - ( col0 ) / - cor0.col2 FROM tab1 cor0
----
-3
-63
-80

query I rowsort
SELECT ALL + col2 * ( col2 + col2 * + col2 ) FROM tab2 AS cor0
----
18252
20412
56316

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

query I rowsort
SELECT - - col1 * 34 AS col2 FROM tab2 AS cor0
----
1054
2006
578

onlyif mysql # use DIV operator for integer division
query I rowsort label-687
SELECT + col0 + cor0.col0 DIV - col2 AS col2 FROM tab1 AS cor0
----
3
63
80

skipif mysql # not compatible
query I rowsort label-687
SELECT + col0 + cor0.col0 / - col2 AS col2 FROM tab1 AS cor0
----
3
63
80

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

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

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

query I rowsort
SELECT ALL 30 * 92 AS col1 FROM tab0, tab2 cor0 CROSS JOIN tab1
----
27 values hashing to e6a77760c59afc69e0adf3bb150749d7

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

query I rowsort
SELECT DISTINCT - - col1 * cor0.col1 + + 98 FROM tab1 AS cor0
----
198
267
774

query I rowsort
SELECT - col0 * - col0 - - tab0.col0 AS col2 FROM tab0
----
1260
600
8010

query I rowsort
SELECT 39 + - col1 * - col1 FROM tab1
----
139
208
715

query I rowsort
SELECT DISTINCT + col0 - + col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT - col2 * col1 - 50 FROM tab1 AS cor0
----
-1298
-1454
-620

query I rowsort
SELECT + col2 * col0 - 63 AS col0 FROM tab0 AS cor0
----
-28
7235
729

query I rowsort
SELECT DISTINCT 47 - + tab2.col2 FROM tab2
----
20
21
9

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

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

query I rowsort
SELECT DISTINCT 7 * + col2 AS col0 FROM tab0 cor0
----
231
574
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-703
SELECT col2 * col2 DIV + col1 - col0 AS col0 FROM tab1 AS cor0
----
109
260
628

skipif mysql # not compatible
query I rowsort label-703
SELECT col2 * col2 / + col1 - col0 AS col0 FROM tab1 AS cor0
----
109
260
628

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

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

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

query I rowsort
SELECT DISTINCT 4 * col1 FROM tab0 AS cor0
----
344
364
388

query I rowsort
SELECT - - 90 * col0 FROM tab2 cor0
----
630
7020
7110

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

skipif mysql # not compatible
query I rowsort label-709
SELECT ALL + col2 / col2 AS col2 FROM tab0 AS cor0
----
1
1
1

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-712
SELECT ALL + ( - col2 ) + - CAST( col2 AS SIGNED ) * cor0.col0 FROM tab1 AS cor0
----
-216
-3705
-7776

skipif mysql # not compatible
query I rowsort label-712
SELECT ALL + ( - col2 ) + - CAST ( col2 AS INTEGER ) * cor0.col0 FROM tab1 AS cor0
----
-216
-3705
-7776

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

query I rowsort
SELECT ALL + col0 + col2 - - 18 AS col2 FROM tab0 AS cor0
----
189
54
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-715
SELECT + + col2 DIV col2 - cor0.col2 FROM tab0 cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-715
SELECT + + col2 / col2 - cor0.col2 FROM tab0 cor0
----
-32
-81
0

query I rowsort
SELECT 40 FROM tab1, tab0 cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

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

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

query I rowsort
SELECT ALL - col2 * + 73 AS col0 FROM tab1 cor0
----
-3942
-4161
-7008

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

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

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

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

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

query I rowsort
SELECT ALL 19 FROM tab2 AS cor0
----
19
19
19

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

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

query I rowsort
SELECT ( + 37 ) + - col1 AS col0 FROM tab1
----
11
24
27

query I rowsort
SELECT 76 + + col1 * col0 * col0 AS col2 FROM tab2 AS cor0
----
106173
1595
359032

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

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

query I rowsort
SELECT DISTINCT + - col1 + ( cor0.col1 ) * 81 FROM tab2 AS cor0
----
1360
2480
4720

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

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

query I rowsort
SELECT DISTINCT + + col0 + 76 AS col1 FROM tab1 AS cor0
----
140
156
79

query I rowsort
SELECT DISTINCT - col0 + + 66 * col2 FROM tab0 AS cor0
----
2154
31
5323

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

query I rowsort
SELECT - + 60 FROM tab2 cor0
----
-60
-60
-60

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

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

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

query I rowsort
SELECT DISTINCT + 38 * - col1 FROM tab2
----
-1178
-2242
-646

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

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

query I rowsort
SELECT ALL col0 - cor0.col2 * + ( - 80 ) FROM tab0 AS cor0
----
115
2664
6649

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-743
SELECT DISTINCT col2 DIV col1 + + ( - col1 ) + + col0 FROM tab2 cor0
----
-24
19
64

skipif mysql # not compatible
query I rowsort label-743
SELECT DISTINCT col2 / col1 + + ( - col1 ) + + col0 FROM tab2 cor0
----
-24
19
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 - col0 col2 FROM tab2 AS cor0
----
-48
-49
23

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

query I rowsort
SELECT ALL 65 AS col2 FROM tab1
----
65
65
65

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

query I rowsort
SELECT 33 * col2 AS col1 FROM tab2 AS cor0
----
1254
858
891

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

query I rowsort
SELECT - 7 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

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

query I rowsort
SELECT - 17 + - cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 8acd7c6f988d0f6989c08b3c78618ab9

query I rowsort
SELECT ( 51 ) AS col0 FROM tab1 cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to c9771396949659773ab2fa2a1ac228de

query I rowsort
SELECT ALL - 82 FROM tab1, tab1 AS cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

query I rowsort
SELECT DISTINCT + 27 + tab1.col1 * col2 FROM tab1
----
1275
1431
597

query I rowsort
SELECT ALL col1 + 76 * + col1 + + col2 FROM tab0
----
6655
7089
7470

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

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

query I rowsort
SELECT - 26 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-761
SELECT ALL + col2 DIV 17 + - col1 * + col2 + col1 AS col1 FROM tab1 AS cor0
----
-1230
-1375
-557

skipif mysql # not compatible
query I rowsort label-761
SELECT ALL + col2 / 17 + - col1 * + col2 + col1 AS col1 FROM tab1 AS cor0
----
-1230
-1375
-557

onlyif mysql # use DIV operator for integer division
query I rowsort label-762
SELECT DISTINCT + col1 + 1 DIV - cor0.col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-762
SELECT DISTINCT + col1 + 1 / - cor0.col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 48 * col0 + 32 * + 74 AS col2 FROM tab1
----
2512
5440
6208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * + 19 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to bb00ad656ecb1f86e668d1fef0b986f3

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

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

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

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

query I rowsort
SELECT ALL - - col1 * - 70 - - col2 * - col0 FROM tab1 AS cor0
----
-1982
-4348
-8590

query I rowsort
SELECT ALL + - col2 + + col1 * - col1 AS col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT DISTINCT cor0.col2 * 41 + col0 AS col1 FROM tab1 AS cor0
----
2217
2401
4016

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

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

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

skipif mysql # not compatible
query I rowsort label-773
SELECT - col2 / col2 + + ( - cor0.col0 + col1 ) / - col2 AS col1 FROM tab0 AS cor0
----
-1
-2
-63

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

skipif mysql # not compatible
query I rowsort label-774
SELECT ALL col1 + + col1 / col1 FROM tab0 AS cor0
----
87
92
98

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

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

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

query I rowsort
SELECT ALL col2 * + ( tab2.col1 ) + col0 * - col2 + tab2.col2 * - col1 * 43 FROM tab2
----
-30134
-35343
-66456

query I rowsort
SELECT DISTINCT - col0 * - ( - col0 * col1 ) FROM tab2
----
-106097
-1519
-358956

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

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

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

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

query I rowsort
SELECT ALL 56 * col1 * + col1 AS col2 FROM tab2 AS cor0
----
16184
194936
53816

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

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

query I rowsort
SELECT ALL + 33 * - cor0.col1 FROM tab0 AS cor0
----
-2838
-3003
-3201

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

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

query I rowsort
SELECT ALL - 22 * col1 * col1 AS col2 FROM tab2 AS cor0
----
-21142
-6358
-76582

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

query I rowsort
SELECT + col0 * col2 - - col0 * - 38 FROM tab1 AS cor0
----
1216
4640
48

query I rowsort
SELECT - col0 + - 43 + tab1.col2 AS col1 FROM tab1
----
-27
-50
8

query I rowsort
SELECT DISTINCT 32 + col0 * - col2 FROM tab0
----
-3
-7266
-760

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

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

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

query I rowsort
SELECT + col1 + col0 + + col1 * ( + col1 ) FROM tab1 AS cor0
----
174
262
705

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

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

query I rowsort
SELECT + col2 + - ( 43 ) AS col0 FROM tab2 AS cor0
----
-16
-17
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-801
SELECT ALL + col1 * tab2.col2 DIV ( col1 ) FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-801
SELECT ALL + col1 * tab2.col2 / ( col1 ) FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT 25 * - col0 AS col0 FROM tab1
----
-1600
-2000
-75

query I rowsort
SELECT + 44 + - 85 * col1 AS col0 FROM tab2 AS cor0
----
-1401
-2591
-4971

onlyif mysql # use DIV operator for integer division
query I rowsort label-804
SELECT - ( cor0.col0 ) + + cor0.col0 DIV - ( - col1 * - 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-804
SELECT - ( cor0.col0 ) + + cor0.col0 / - ( - col1 * - col0 ) col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + 63 * col1 FROM tab1 AS cor0
----
1638
630
819

query I rowsort
SELECT + - col1 + + cor0.col2 * + col1 * - col1 FROM tab1 cor0
----
-16237
-36530
-5710

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

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

query I rowsort
SELECT DISTINCT - col2 + + 46 AS col1 FROM tab2 AS cor0
----
19
20
8

query I rowsort
SELECT ALL - + col2 + 59 AS col0 FROM tab0 AS cor0
----
-23
26
58

query I rowsort
SELECT + 65 + - 84 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

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

query I rowsort
SELECT - + 48 * col1 FROM tab1 AS cor0
----
-1248
-480
-624

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

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

query I rowsort
SELECT DISTINCT + col0 * col1 + col0 * col0 * + 37 FROM tab2 AS cor0
----
2030
229710
232260

query I rowsort
SELECT DISTINCT col0 + col2 * - col2 * - 36 FROM tab0 AS cor0
----
242153
39228
71

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

skipif mysql # not compatible
query I rowsort label-817
SELECT + + col2 * col1 + CAST ( - 59 AS INTEGER ) + - col2 AS col2 FROM tab2 AS cor0
----
1449
549
751

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 93 * + col1 + - 53 + ( - col1 ) FROM tab2 AS cor0
----
1511
2799
5375

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

query I rowsort
SELECT ALL ( 5 ) + col0 * 28 - + col0 AS col0 FROM tab2
----
194
2111
2138

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0 CROSS JOIN tab0, tab2, tab0 cor1
----
3645 values hashing to 4fa4bd3038de6e74a345debc8ab4cd53

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + ( col1 ) + col2 col2 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT ALL + col2 * + cor0.col0 * 16 + - col0 * cor0.col2 AS col0 FROM tab2 cor0
----
2835
30420
45030

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

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

skipif mysql # not compatible
query I rowsort label-830
SELECT col0 / 24 FROM tab0 AS cor0
----
1
1
3

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

skipif mysql # not compatible
query I rowsort label-831
SELECT + col0 * + CAST ( col2 AS INTEGER ) * col0 FROM tab2 AS cor0
----
1323
158184
237158

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

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

query I rowsort
SELECT DISTINCT col1 * + 41 FROM tab0
----
3526
3731
3977

query I rowsort
SELECT DISTINCT - - 57 * 33 + + col1 * - 52 AS col2 FROM tab0 AS cor0
----
-2591
-2851
-3163

query I rowsort
SELECT - cor0.col1 * 90 FROM tab0 AS cor0
----
-7740
-8190
-8730

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

query I rowsort
SELECT tab0.col0 * col2 + col0 * col0 * ( col1 ) AS col2 FROM tab0
----
118860
50328
728109

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

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab2
----
64

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

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

query I rowsort
SELECT cor0.col0 - - 75 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 02d3bd118524dbb5fb916f296cd1cc74

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

query I rowsort
SELECT ALL + + 26 + + 78 AS col1 FROM tab0 AS cor0
----
104
104
104

query I rowsort
SELECT DISTINCT + + col2 * - 97 - + col1 AS col0 FROM tab0 AS cor0
----
-194
-3287
-8045

query I rowsort
SELECT DISTINCT - 81 + col1 FROM tab1 cor0
----
-55
-68
-71

query I rowsort
SELECT + 62 * cor0.col1 FROM tab0 AS cor0
----
5332
5642
6014

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

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

query I rowsort
SELECT ALL col1 * - 67 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-5848
-6188
-6596

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

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab0 cor0, tab0 AS cor1
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-854
SELECT ALL + 73 * - col0 + CAST( 16 AS SIGNED ) AS col2 FROM tab2
----
-495
-5678
-5751

skipif mysql # not compatible
query I rowsort label-854
SELECT ALL + 73 * - col0 + CAST ( 16 AS INTEGER ) AS col2 FROM tab2
----
-495
-5678
-5751

onlyif mysql # use DIV operator for integer division
query I rowsort label-855
SELECT col0 + col0 DIV - 32 AS col0 FROM tab2
----
7
76
77

skipif mysql # not compatible
query I rowsort label-855
SELECT col0 + col0 / - 32 AS col0 FROM tab2
----
7
76
77

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

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

query I rowsort
SELECT + 63 + - col0 FROM tab2
----
-15
-16
56

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-863
SELECT - - col1 * ( - col0 * col1 ) + - col2 DIV col0 FROM tab0 AS cor0
----
-177505
-329315
-737009

skipif mysql # not compatible
query I rowsort label-863
SELECT - - col1 * ( - col0 * col1 ) + - col2 / col0 FROM tab0 AS cor0
----
-177505
-329315
-737009

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-865
SELECT DISTINCT - - cor0.col2 * + col1 - - cor0.col2 * col1 DIV col0 AS col0 FROM tab0 AS cor0
----
2956
7545
99

skipif mysql # not compatible
query I rowsort label-865
SELECT DISTINCT - - cor0.col2 * + col1 - - cor0.col2 * col1 / col0 AS col0 FROM tab0 AS cor0
----
2956
7545
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-866
SELECT ALL col0 * col1 DIV + col2 col1 FROM tab0 AS cor0
----
3395
62
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-866
SELECT ALL col0 * col1 / + col2 col1 FROM tab0 AS cor0
----
3395
62
98

query I rowsort
SELECT ALL col2 * ( + col0 ) * + col0 + col1 FROM tab0 AS cor0
----
1322
19094
649613

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col2 + 45 col1 FROM tab2 AS cor0
----
-1489
-601
-792

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 * ( 63 ) - + col0 FROM tab0 AS cor0
----
-2103
-5255
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-877
SELECT - - col0 + CAST( + col0 AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

skipif mysql # not compatible
query I rowsort label-877
SELECT - - col0 + CAST ( + col0 AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 75 col0 FROM tab0 AS cor0
----
-6450
-6825
-7275

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

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

query I rowsort
SELECT - col2 + + col1 * + 68 FROM tab0 AS cor0
----
5815
6106
6595

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 75 ) col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c0722b1d77ac0ed13c0f2691a5751c59

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

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

query I rowsort
SELECT DISTINCT + - 57 * col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

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

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

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

query I rowsort
SELECT + 48 * - col1 AS col0 FROM tab2
----
-1488
-2832
-816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 + col2 col2 FROM tab1
----
-5
-8
34

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

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

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

query I rowsort
SELECT DISTINCT 90 * + col2 * col2 AS col2 FROM tab2
----
129960
60840
65610

query I rowsort
SELECT DISTINCT col2 * col1 + + cor0.col1 * - cor0.col1 FROM tab1 AS cor0
----
1079
470
728

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

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

query I rowsort
SELECT + col0 * 54 + + col2 FROM tab1
----
216
3513
4416

query I rowsort
SELECT DISTINCT tab2.col2 * - col2 + + 74 FROM tab2
----
-1370
-602
-655

query I rowsort
SELECT col2 * 24 FROM tab1
----
1296
1368
2304

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

query I rowsort
SELECT + col1 + - 66 AS col2 FROM tab0 AS cor0
----
20
25
31

query I rowsort
SELECT - ( col0 ) * col0 + + 24 * col0 AS col1 FROM tab1 AS cor0
----
-2560
-4480
63

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

skipif mysql # not compatible
query I rowsort label-906
SELECT DISTINCT - col2 + col0 / 83 AS col2 FROM tab0
----
-1
-33
-81

query I rowsort
SELECT ALL - tab0.col1 + - 94 FROM tab0
----
-180
-185
-191

query I rowsort
SELECT tab1.col1 + 24 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 6f365f14f12a269e0726b8c80d2fa00a

query I rowsort
SELECT + 9 * tab2.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 82745dd8089cd8992a57bcb69f14e5a0

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

query I rowsort
SELECT col1 * 38 AS col0 FROM tab0
----
3268
3458
3686

onlyif mysql # use DIV operator for integer division
query I rowsort label-912
SELECT - col0 + col1 + + 34 DIV col2 FROM tab0
----
2
63
96

skipif mysql # not compatible
query I rowsort label-912
SELECT - col0 + col1 + + 34 / col2 FROM tab0
----
2
63
96

query I rowsort
SELECT - col2 * 13 AS col2 FROM tab1
----
-1248
-702
-741

query I rowsort
SELECT - 16 AS col0 FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 6a726f8493b62c5d4e1dd657007160c3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + 89 col2 FROM tab1 AS cor0
----
102
115
99

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

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

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

query I rowsort
SELECT DISTINCT + col2 + - 4 FROM tab2 AS cor0
----
22
23
34

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

query I rowsort
SELECT DISTINCT + 36 + 63 + - col1 FROM tab2 AS cor0
----
40
68
82

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

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

query I rowsort
SELECT ALL + + ( + cor0.col1 ) * cor0.col2 - 99 FROM tab0 AS cor0
----
-2
2739
7363

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-926
SELECT - + col2 * - col2 + - col0 DIV + col2 FROM tab1 AS cor0
----
2916
3248
9216

skipif mysql # not compatible
query I rowsort label-926
SELECT - + col2 * - col2 + - col0 / + col2 FROM tab1 AS cor0
----
2916
3248
9216

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 * - col2 + col2 + col0 FROM tab1 AS cor0
----
-207815
-737104
-8691

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

skipif mysql # not compatible
query I rowsort label-931
SELECT DISTINCT + 45 / 46 + col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-934
SELECT CAST( - col0 AS SIGNED ) FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-934
SELECT CAST ( - col0 AS INTEGER ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + - 1 - col0 FROM tab0 cor0
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 64 * - col0 col2 FROM tab0
----
-1536
-2240
-5696

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

query I rowsort
SELECT - 86 * + col1 FROM tab0
----
-7396
-7826
-8342

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

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

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

query I rowsort
SELECT + col2 * cor0.col1 + cor0.col1 * 65 FROM tab1 AS cor0
----
1220
2093
3094

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

query I rowsort
SELECT ALL - 22 FROM tab1 AS cor0
----
-22
-22
-22

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

query I rowsort
SELECT ( + cor0.col0 ) + col1 * - 96 FROM tab1 AS cor0
----
-1168
-2493
-896

query I rowsort
SELECT ALL 46 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

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

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

query I rowsort
SELECT - col1 * - 65 * col1 AS col2 FROM tab2 AS cor0
----
18785
226265
62465

onlyif mysql # use DIV operator for integer division
query I rowsort label-951
SELECT col1 DIV + 96 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-951
SELECT col1 / + 96 FROM tab1
----
0
0
0

query I rowsort
SELECT - - 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-953
SELECT + + cor0.col1 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

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

skipif mysql # not compatible
query I rowsort label-954
SELECT col2 * + CAST ( - col2 AS INTEGER ) FROM tab2 cor0
----
-1444
-676
-729

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-958
SELECT - ( 9 ) DIV + cor0.col0 - col0 * - col0 FROM tab0 cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-958
SELECT - ( 9 ) / + cor0.col0 - col0 * - col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT 86 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

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

query I rowsort
SELECT ALL ( - cor1.col0 ) FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

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

skipif mysql # not compatible
query I rowsort label-962
SELECT ALL CAST ( NULL AS INTEGER ) * + cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - col0 + 82 AS col1 FROM tab1
----
18
2
79

query I rowsort
SELECT ( - col0 ) * - 40 + - col0 * tab2.col0 AS col0 FROM tab2
----
-2964
-3081
231

query I rowsort
SELECT + 74 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

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

query I rowsort
SELECT ALL - col0 * 35 * ( col2 * col1 + col0 ) AS col1 FROM tab2 AS cor0
----
-2004625
-206780
-4400760

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

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

query I rowsort
SELECT ALL - + col0 * 68 AS col0 FROM tab1 AS cor0
----
-204
-4352
-5440

query I rowsort
SELECT DISTINCT - - cor0.col0 + + 71 FROM tab1 AS cor0
----
135
151
74

query I rowsort
SELECT DISTINCT col2 + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

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

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

query I rowsort
SELECT - col1 * 39 FROM tab1 AS cor0
----
-1014
-390
-507

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

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

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

query I rowsort
SELECT - 67 AS col2 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 95c9eba643f6489e03be4d5e83f1ef99

query I rowsort
SELECT DISTINCT 24 * col0 FROM tab0
----
2136
576
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-980
SELECT ALL - - col2 DIV col0 - + col1 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-980
SELECT ALL - - col2 / col0 - + col1 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT DISTINCT + - col1 * + 97 AS col2 FROM tab1 AS cor0
----
-1261
-2522
-970

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 + + CAST ( 87 * + col0 AS REAL ) + 81 AS col2 FROM tab1 AS cor0
----
345
5713
7121

query I rowsort
SELECT ALL + col1 * 43 FROM tab2 AS cor0
----
1333
2537
731

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

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

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

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

query I rowsort
SELECT + cor0.col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-989
SELECT 7 DIV + col2 - col0 FROM tab0
----
-24
-28
-89

skipif mysql # not compatible
query I rowsort label-989
SELECT 7 / + col2 - col0 FROM tab0
----
-24
-28
-89

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

query I rowsort
SELECT - col0 + + 24 AS col2 FROM tab0 AS cor0
----
-11
-65
0

query I rowsort
SELECT ALL col1 * - 31 FROM tab2 AS cor0
----
-1829
-527
-961

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

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-998
SELECT - + col2 * - col2 + - col0 / ( col0 ) + col2 * - cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

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

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

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

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

query I rowsort
SELECT ALL - cor0.col0 * + 69 AS col2 FROM tab0 cor0
----
-1656
-2415
-6141

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

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

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

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

query I rowsort
SELECT - + 82 * + col2 + cor0.col1 FROM tab0 AS cor0
----
-2620
-6633
15

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

skipif mysql # not compatible
query I rowsort label-1009
SELECT ALL - col0 + col1 / 45 FROM tab1 AS cor0
----
-3
-64
-80

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

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

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

query I rowsort
SELECT DISTINCT - - 19 - - col2 * - col1 FROM tab0 AS cor0
----
-2819
-7443
-78

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 ALL + 29 * + col2 + col0 FROM tab0 AS cor0
----
2467
64
981

query I rowsort
SELECT DISTINCT + + ( + 45 ) FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab2, tab0 AS cor1
----
45

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to 2248b8c3b6efacb4e8fc6d9f81b7df8b

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

query I rowsort
SELECT DISTINCT + 99 FROM tab0 AS cor0
----
99

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

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

query I rowsort
SELECT DISTINCT 8 * - col2 * - 95 FROM tab0 AS cor0
----
25080
62320
760

query I rowsort
SELECT + col0 * col1 + - 61 * col2 AS col0 FROM tab2 AS cor0
----
-1430
-975
3016

query I rowsort
SELECT 89 + col2 * col2 FROM tab0 AS cor0
----
1178
6813
90

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

query I rowsort
SELECT ALL - 63 * + col1 FROM tab2 AS cor0
----
-1071
-1953
-3717

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1027
SELECT ( col0 ) * - CAST( 69 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1656
-2415
-6141

skipif mysql # not compatible
query I rowsort label-1027
SELECT ( col0 ) * - CAST ( 69 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1656
-2415
-6141

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

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

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

query I rowsort
SELECT 31 + 97 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 627d9e05796dcd941d7b712e3de8215f

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

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

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

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

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

query I rowsort
SELECT + 95 + col1 AS col0 FROM tab2 AS cor0
----
112
126
154

query I rowsort
SELECT DISTINCT - + 41 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-41

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
70

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

query I rowsort
SELECT + 53 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT 22 * + col1 + 79 AS col0 FROM tab1
----
299
365
651

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

query I rowsort
SELECT ALL + col2 + - 57 * + col2 FROM tab2 AS cor0
----
-1456
-1512
-2128

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

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

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

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

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

query I rowsort
SELECT col0 - col1 AS col2 FROM tab2
----
-24
19
62

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1 WHERE NULL > NULL
----

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

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

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

query I rowsort
SELECT 96 + ( col0 ) + tab2.col2 * - col0 FROM tab2
----
-1854
-2827
-86

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 ( col2 ) + col2 * 12 AS col0 FROM tab0
----
1066
13
429

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

query I rowsort
SELECT 62 + - col1 FROM tab2
----
3
31
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 68 + ( col1 + - ( - col2 ) * - col2 ) col2 FROM tab0
----
-1071
-6701
28

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 63 + + col0 AS col0 FROM tab0 cor0
----
152
87
98

query I rowsort
SELECT - 15 FROM tab0, tab0 AS cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query I rowsort
SELECT ALL ( 76 ) + + col0 + + 23 FROM tab2 AS cor0
----
106
177
178

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

query I rowsort
SELECT col1 * - 98 AS col2 FROM tab1
----
-1274
-2548
-980

onlyif mysql # use DIV operator for integer division
query I rowsort label-1070
SELECT col2 DIV - col0 + col2 * col0 + col2 * + 93 FROM tab0 AS cor0
----
128
14924
3860

skipif mysql # not compatible
query I rowsort label-1070
SELECT col2 / - col0 + col2 * col0 + col2 * + 93 FROM tab0 AS cor0
----
128
14924
3860

query I rowsort
SELECT - + col0 + col1 + + col0 * - col0 FROM tab0 AS cor0
----
-1163
-514
-7919

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

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

query I rowsort
SELECT + - col0 * ( - cor0.col1 ) + cor0.col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

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

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

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

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

query I rowsort
SELECT - 7 FROM tab1, tab1 cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT ALL + 1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1080
SELECT + col1 DIV + col1 + - 8 * + tab1.col0 + ( 69 ) * + col2 AS col1 FROM tab1
----
3422
3703
5985

skipif mysql # not compatible
query I rowsort label-1080
SELECT + col1 / + col1 + - 8 * + tab1.col0 + ( 69 ) * + col2 AS col1 FROM tab1
----
3422
3703
5985

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

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

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

query I rowsort
SELECT ALL 30 + col1 * col2 AS col0 FROM tab1 cor0
----
1278
1434
600

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

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

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

query I rowsort
SELECT DISTINCT - tab2.col1 + col0 * - ( - col0 ) FROM tab2
----
18
6025
6224

query I rowsort
SELECT + 51 * col0 AS col2 FROM tab2
----
357
3978
4029

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1090
SELECT + col0 DIV ( - col2 ) + - col0 + - ( + ( col2 ) ) AS col2 FROM tab1 AS cor0
----
-122
-176
-57

skipif mysql # not compatible
query I rowsort label-1090
SELECT + col0 / ( - col2 ) + - col0 + - ( + ( col2 ) ) AS col2 FROM tab1 AS cor0
----
-122
-176
-57

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

query I rowsort
SELECT 1 FROM tab1
----
1
1
1

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

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

query I rowsort
SELECT - 21 * + tab1.col2 * 84 FROM tab1
----
-100548
-169344
-95256

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1096
SELECT DISTINCT - 8 * tab1.col1 DIV ( col1 ) + - col0 + col2 * col2 FROM tab1
----
2905
3177
9128

skipif mysql # not compatible
query I rowsort label-1096
SELECT DISTINCT - 8 * tab1.col1 / ( col1 ) + - col0 + col2 * col2 FROM tab1
----
2905
3177
9128

query I rowsort
SELECT DISTINCT + col1 + + col1 FROM tab2
----
118
34
62

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

query I rowsort
SELECT DISTINCT col1 * 48 AS col1 FROM tab2 AS cor0
----
1488
2832
816

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

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

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

query I rowsort
SELECT 77 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

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

query I rowsort
SELECT 44 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

onlyif mysql # use DIV operator for integer division
query I rowsort label-1105
SELECT DISTINCT - - col0 + - 41 DIV - col0 FROM tab0 AS cor0
----
25
36
89

skipif mysql # not compatible
query I rowsort label-1105
SELECT DISTINCT - - col0 + - 41 / - col0 FROM tab0 AS cor0
----
25
36
89

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

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

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

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

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

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

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

query I rowsort
SELECT + ( + col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT - 42 * + 29 AS col0 FROM tab0
----
-1218
-1218
-1218

query I rowsort
SELECT DISTINCT ( - 12 ) AS col2 FROM tab0
----
-12

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

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

query I rowsort
SELECT + + 33 FROM tab1 cor0
----
33
33
33

query I rowsort
SELECT DISTINCT + 56 FROM tab2
----
56

query I rowsort
SELECT ( col2 * - 23 ) - col1 FROM tab2
----
-652
-657
-891

onlyif mysql # use DIV operator for integer division
query I rowsort label-1121
SELECT + 32 DIV - col1 AS col2 FROM tab2 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1121
SELECT + 32 / - col1 AS col2 FROM tab2 cor0
----
-1
-1
0

query I rowsort
SELECT + 60 FROM tab2 AS cor0
----
60
60
60

query I rowsort
SELECT + 21 FROM tab2 AS cor0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1127
SELECT + col0 + + col2 DIV + col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-1127
SELECT + col0 + + col2 / + col1 FROM tab1 AS cor0
----
5
69
87

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1128
SELECT DISTINCT col1 / col2 + + col2 col0 FROM tab0
----
35
83
98

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1131
SELECT + col0 - col2 DIV col1 FROM tab1
----
1
59
73

skipif mysql # not compatible
query I rowsort label-1131
SELECT + col0 - col2 / col1 FROM tab1
----
1
59
73

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1133
SELECT DISTINCT - col1 + - col0 DIV + col1 FROM tab2
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-1133
SELECT DISTINCT - col1 + - col0 / + col1 FROM tab2
----
-21
-31
-60

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - col0 * col0 col0 FROM tab1
----
-4039
-6304
45

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

query I rowsort
SELECT DISTINCT + tab1.col2 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
54
57
96

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

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

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

query I rowsort
SELECT DISTINCT + col2 + - col0 * - col0 * col1 FROM tab1 AS cor0
----
288
41017
83296

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

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

query I rowsort
SELECT ALL 79 - col1 FROM tab0
----
-12
-18
-7

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

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-7
-78
-79

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

query I rowsort
SELECT - - 10 * col0 * col0 - - col1 FROM tab0 AS cor0
----
12347
5846
79301

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 + col0 col2 FROM tab0 AS cor0
----
-14
-25
40

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

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

query I rowsort
SELECT - + col2 * - col0 - col1 * col2 * col1 FROM tab0 AS cor0
----
-243276
-671744
-9374

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

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

query I rowsort
SELECT ALL col0 * col0 * col0 + + col2 AS col2 FROM tab1 AS cor0
----
262201
512096
81

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

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

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

query I rowsort
SELECT ALL tab0.col2 AS col1 FROM tab0
----
1
33
82

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1160
SELECT col2 DIV col0 - - tab1.col1 FROM tab1
----
10
14
44

skipif mysql # not compatible
query I rowsort label-1160
SELECT col2 / col0 - - tab1.col1 FROM tab1
----
10
14
44

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

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

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

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

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

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

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

query III rowsort
SELECT * FROM tab1 WHERE col1 * col1 BETWEEN ( col1 ) AND + col2 + + col2
----
64
10
57
80
13
96

query I rowsort
SELECT ALL + col1 * - col2 + - cor0.col0 * col0 FROM tab0 AS cor0
----
-1322
-15383
-3414

onlyif mysql # use DIV operator for integer division
query I rowsort label-1170
SELECT ALL + col0 DIV col0 + 41 * 26 FROM tab0 AS cor0
----
1067
1067
1067

skipif mysql # not compatible
query I rowsort label-1170
SELECT ALL + col0 / col0 + 41 * 26 FROM tab0 AS cor0
----
1067
1067
1067

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

query I rowsort
SELECT ALL cor0.col1 * - 82 FROM tab1, tab1 AS cor0
----
9 values hashing to d46bb131ee5e9611e55a1a9256f68c84

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

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

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

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

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

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

query I rowsort
SELECT col1 + - col0 * - col1 + col1 AS col2 FROM tab2
----
1377
279
4720

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

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

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

query I rowsort
SELECT DISTINCT + col1 + col1 * col2 * + col2 - + col0 * tab2.col0 FROM tab2
----
18324
22581
33859

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

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

query I rowsort
SELECT ALL - col2 + + col1 + col1 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT - col0 * - col2 - - col1 * tab2.col1 FROM tab2
----
1150
3291
5509

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

query I rowsort
SELECT ALL - col1 + - cor0.col1 * + col2 * + col1 AS col0 FROM tab2 AS cor0
----
-10999
-25978
-90565

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

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

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

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col0 <= NULL
----

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

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

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

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

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 - tab0.col1 IN ( col0 * col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1197
SELECT col0 DIV + col0 - col2 AS col0 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-1197
SELECT col0 / + col0 - col2 AS col0 FROM tab2
----
-25
-26
-37

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

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

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

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

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

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

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( - tab0.col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1203
SELECT - tab1.col1 + + col2 + - col0 DIV - tab1.col2 col2 FROM tab1
----
28
48
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1203
SELECT - tab1.col1 + + col2 + - col0 / - tab1.col2 col2 FROM tab1
----
28
48
83

query I rowsort
SELECT + col1 + col0 * + col2 + col1 AS col2 FROM tab1
----
214
3668
7706

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

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

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

query I rowsort
SELECT ALL 76 + col2 FROM tab1
----
130
133
172

query I rowsort
SELECT 37 * - col0 FROM tab1 AS cor0
----
-111
-2368
-2960

query I rowsort
SELECT DISTINCT 86 * col2 AS col0 FROM tab1 AS cor0
----
4644
4902
8256

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

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

query I rowsort
SELECT ALL - col2 * 7 FROM tab1 AS cor0
----
-378
-399
-672

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1217
SELECT DISTINCT col1 + col1 DIV col2 col2 FROM tab0 AS cor0
----
194
88
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1217
SELECT DISTINCT col1 + col1 / col2 col2 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT + 86 FROM tab2
----
86
86
86

query I rowsort
SELECT - 98 * cor0.col0 * + ( + col2 ) + col1 AS col2 FROM tab1 AS cor0
----
-15850
-357494
-752627

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

skipif mysql # not compatible
query I rowsort label-1220
SELECT col1 * + col0 * CAST ( + col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
106097
1519
358956

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

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

query I rowsort
SELECT + - col0 + - 28 FROM tab2 cor0
----
-106
-107
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 + col0 * col0 * col2 col1 FROM tab0
----
0
18432
641601

query I rowsort
SELECT DISTINCT - col0 * 16 * col1 FROM tab0
----
-129584
-33024
-54320

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

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

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

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

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

query I rowsort
SELECT ALL - + 7 * 82 FROM tab0 cor0
----
-574
-574
-574

query I rowsort
SELECT + col1 + cor0.col2 * col0 - - 44 FROM tab0 AS cor0
----
176
7433
922

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1231
SELECT DISTINCT col0 * ( + col2 ) + CAST( - 86 AS SIGNED ) * cor0.col0 FROM tab1 cor0
----
-1856
-96
800

skipif mysql # not compatible
query I rowsort label-1231
SELECT DISTINCT col0 * ( + col2 ) + CAST ( - 86 AS INTEGER ) * cor0.col0 FROM tab1 cor0
----
-1856
-96
800

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

query I rowsort
SELECT 9 + - col2 AS col0 FROM tab2 AS cor0
----
-17
-18
-29

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col0 AS REAL ) * - col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

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

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

skipif mysql # not compatible
query I rowsort label-1236
SELECT ALL CAST ( NULL AS INTEGER ) / col2 AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1237
SELECT 47 + col1 DIV cor0.col1 FROM tab1 AS cor0
----
48
48
48

skipif mysql # not compatible
query I rowsort label-1237
SELECT 47 + col1 / cor0.col1 FROM tab1 AS cor0
----
48
48
48

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

query I rowsort
SELECT + 0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1242
SELECT ALL + 94 - + col1 DIV + col0 FROM tab1 AS cor0
----
86
94
94

skipif mysql # not compatible
query I rowsort label-1242
SELECT ALL + 94 - + col1 / + col0 FROM tab1 AS cor0
----
86
94
94

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

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

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab2
----
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1246
SELECT DISTINCT - col0 * col0 * col2 + col2 DIV + col0 FROM tab1 cor0
----
-233472
-468
-614399

skipif mysql # not compatible
query I rowsort label-1246
SELECT DISTINCT - col0 * col0 * col2 + col2 / + col0 FROM tab1 cor0
----
-233472
-468
-614399

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

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

skipif mysql # not compatible
query I rowsort label-1248
SELECT cor0.col1 - col0 * col0 / - col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 65 * + col0 + - col2 AS col2 FROM tab2 AS cor0
----
428
5044
5097

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

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

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

query I rowsort
SELECT DISTINCT 31 * - cor0.col2 + + col0 FROM tab0 AS cor0
----
-2453
-999
4

query I rowsort
SELECT ALL 81 - col2 AS col2 FROM tab0 AS cor0
----
-1
48
80

query I rowsort
SELECT ALL - 94 * col2 AS col2 FROM tab2
----
-2444
-2538
-3572

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1257
SELECT + col1 + - 27 DIV - ( col2 * col0 ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1257
SELECT + col1 + - 27 / - ( col2 * col0 ) FROM tab0 AS cor0
----
86
91
97

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * - 93 col0 FROM tab0 AS cor0
----
-7998
-8463
-9021

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

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

query I rowsort
SELECT ALL - 22 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to 647e567609c5ada1d3454d2102819bfe

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

query I rowsort
SELECT - col0 * 51 FROM tab1 cor0
----
-153
-3264
-4080

query I rowsort
SELECT DISTINCT col0 * ( - 58 + col2 ) * col1 AS col1 FROM tab0 AS cor0
----
-193515
-51600
194376

query I rowsort
SELECT cor0.col2 + + cor1.col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0cb793b50a400e8b905f92ad22c8878f

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1272
SELECT col2 DIV ( col1 ) + - col2 * + col2 AS col1 FROM tab0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-1272
SELECT col2 / ( col1 ) + - col2 * + col2 AS col1 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col1 + + 97 AS col0 FROM tab0
----
183
188
194

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

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

query I rowsort
SELECT DISTINCT + 10 * col1 AS col0 FROM tab0 AS cor0
----
860
910
970

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) FROM tab2 AS cor0
----
17
31
59

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

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

query I rowsort
SELECT ALL col2 + - 73 FROM tab1
----
-16
-19
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-1280
SELECT col1 * tab2.col1 * col2 + col2 DIV col1 col0 FROM tab2
----
10984
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1280
SELECT col1 * tab2.col1 * col2 + col2 / col1 col0 FROM tab2
----
10984
25947
90506

query I rowsort
SELECT col0 + 82 AS col1 FROM tab1
----
146
162
85

query I rowsort
SELECT DISTINCT + col0 + col0 * - 35 FROM tab2
----
-238
-2652
-2686

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

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

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

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

query I rowsort
SELECT + 25 FROM tab1, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab0 cor0
----
23

query I rowsort
SELECT DISTINCT 15 * 82 AS col2 FROM tab1
----
1230

query I rowsort
SELECT DISTINCT + 88 * cor0.col0 + - 3 FROM tab2 AS cor0
----
613
6861
6949

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

query I rowsort
SELECT ALL - 70 + col0 AS col0 FROM tab0 AS cor0
----
-35
-46
19

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

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

query I rowsort
SELECT ALL 32 + + cor0.col2 * + col0 AS col0 FROM tab2 AS cor0
----
2060
221
3034

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

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

query I rowsort
SELECT + col1 + - tab0.col0 + + col0 * - 92 FROM tab0
----
-2146
-3158
-8186

query I rowsort
SELECT ( col1 ) * col0 - 43 * col2 * ( ( + col0 ) ) AS col0 FROM tab2 AS cor0
----
-127743
-7910
-82602

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( cor0.col2 ) + + 47 * col2 col0 FROM tab2 AS cor0
----
1248
1296
1824

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

skipif mysql # not compatible
query I rowsort label-1300
SELECT DISTINCT col0 / - col1 + - 42 AS col1 FROM tab0 AS cor0
----
-42

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

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

query I rowsort
SELECT - col0 * - col0 + + 53 + cor0.col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1205
15895
2503

query I rowsort
SELECT - 45 * col1 FROM tab0 AS cor0
----
-3870
-4095
-4365

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

query I rowsort
SELECT ALL ( tab1.col1 ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL + 87 AS col0 FROM tab1
----
87
87
87

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

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

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

query I rowsort
SELECT 6 * col1 + ( col0 ) FROM tab1
----
124
158
159

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

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

query I rowsort
SELECT - col0 + col2 * - ( + col2 ) - col2 AS col0 FROM tab2 AS cor0
----
-1561
-763
-780

onlyif mysql # use DIV operator for integer division
query I rowsort label-1315
SELECT DISTINCT - cor0.col2 * col2 * 65 + - col0 DIV - 66 FROM tab1 AS cor0
----
-189540
-211185
-599039

skipif mysql # not compatible
query I rowsort label-1315
SELECT DISTINCT - cor0.col2 * col2 * 65 + - col0 / - 66 FROM tab1 AS cor0
----
-189540
-211185
-599039

query I rowsort
SELECT ALL + col0 * 62 FROM tab2 AS cor0
----
434
4836
4898

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

query I rowsort
SELECT + col2 - ( + col1 + + col1 * col1 ) FROM tab1 AS cor0
----
-53
-648
-86

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

query I rowsort
SELECT + col0 + - col2 + col1 * - col2 AS col1 FROM tab1 AS cor0
----
-1264
-1455
-563

query I rowsort
SELECT ALL - col1 + - 16 AS col1 FROM tab0 cor0
----
-102
-107
-113

query I rowsort
SELECT - - col0 * cor0.col0 + 32 AS col0 FROM tab0 AS cor0
----
1257
608
7953

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

query I rowsort
SELECT ALL + col2 + + cor0.col1 * + 74 + cor0.col2 FROM tab1 AS cor0
----
1154
2032
854

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

query I rowsort
SELECT DISTINCT col0 * 72 FROM tab0 AS cor0
----
1728
2520
6408

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

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to ce53c0e8839c969b0513568da6eb2c4b

query I rowsort
SELECT ALL 30 * - cor0.col1 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 4f1fa1f5bd8b920fd5b85d06436a680e

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1330
SELECT + - ( ( - col1 ) ) * CAST ( - col0 AS INTEGER ) col1 FROM tab2 AS cor0
----
-1343
-217
-4602

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

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

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

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

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

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

query I rowsort
SELECT - col2 + + 76 FROM tab1 cor0
----
-20
19
22

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

skipif mysql # not compatible
query I rowsort label-1336
SELECT DISTINCT + CAST ( - cor0.col1 AS INTEGER ) + col0 FROM tab1 AS cor0
----
-23
54
67

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 94 * + 72 col2 FROM tab0 AS cor0
----
6768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 + + col0 * 27 col1 FROM tab1 AS cor0
----
105
1752
2184

query I rowsort
SELECT 41 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT ALL - 4 - col0 AS col2 FROM tab1 AS cor0
----
-68
-7
-84

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

query I rowsort
SELECT ALL - col1 + col0 * - 61 * - col1 AS col2 FROM tab1 AS cor0
----
39030
4732
63427

query I rowsort
SELECT + 30 * col0 * col0 AS col0 FROM tab0 AS cor0
----
17280
237630
36750

query I rowsort
SELECT DISTINCT 39 + - col1 AS col2 FROM tab1 AS cor0
----
13
26
29

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1353
SELECT CAST( 41 AS SIGNED ) + + col1 FROM tab1 AS cor0
----
51
54
67

skipif mysql # not compatible
query I rowsort label-1353
SELECT CAST ( 41 AS INTEGER ) + + col1 FROM tab1 AS cor0
----
51
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1354
SELECT + 49 DIV col0 FROM tab1 AS cor0
----
0
0
16

skipif mysql # not compatible
query I rowsort label-1354
SELECT + 49 / col0 FROM tab1 AS cor0
----
0
0
16

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

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

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

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

query I rowsort
SELECT + - col0 * - 25 AS col2 FROM tab1 cor0
----
1600
2000
75

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

skipif mysql # not compatible
query I rowsort label-1359
SELECT + col0 + col1 / + col2 AS col1 FROM tab0 AS cor0
----
132
26
90

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

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

query I rowsort
SELECT + 30 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

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

query I rowsort
SELECT DISTINCT - ( + col2 ) * - 58 * - col2 AS col2 FROM tab1 AS cor0
----
-169128
-188442
-534528

query I rowsort
SELECT - 7 FROM tab1
----
-7
-7
-7

query I rowsort
SELECT - - col2 * + 10 + - col0 AS col1 FROM tab1 AS cor0
----
506
537
880

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

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab0, tab0 AS cor0
----
93

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1368
SELECT DISTINCT - tab2.col0 * + CAST ( col1 AS INTEGER ) col2 FROM tab2
----
-1343
-217
-4602

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

query I rowsort
SELECT ALL - col1 * 83 AS col0 FROM tab1 AS cor0
----
-1079
-2158
-830

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

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

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

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

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

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

query I rowsort
SELECT + ( + col2 ) - col2 * col2 AS col0 FROM tab1
----
-2862
-3192
-9120

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

query I rowsort
SELECT DISTINCT - col1 - - col0 * + col0 * 12 AS col0 FROM tab0 AS cor0
----
14603
6826
94961

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 * col1 + + col1 AS col0 FROM tab2 AS cor0
----
205438
29822
4930

query I rowsort
SELECT ALL - - 83 * + col2 AS col1 FROM tab2 cor0
----
2158
2241
3154

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

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

query I rowsort
SELECT DISTINCT - - cor0.col2 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + 87 - col0 AS col1 FROM tab1
----
23
7
84

query I rowsort
SELECT DISTINCT 99 AS col2 FROM tab0
----
99

query I rowsort
SELECT ALL cor1.col0 FROM tab1, tab0, tab0 AS cor0, tab0 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT ALL + tab0.col1 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-1388
SELECT - col1 DIV col2 - col1 * + col1 FROM tab1
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-1388
SELECT - col1 / col2 - col1 * + col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - col1 * + col1 + + col2 AS col0 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL col1 * 35 AS col0 FROM tab0 cor0
----
3010
3185
3395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 70 col2 FROM tab0 AS cor0
----
103
152
71

query I rowsort
SELECT DISTINCT + col0 * ( cor0.col2 ) + - col0 + + ( ( - col0 ) ) AS col2 FROM tab2 AS cor0
----
175
1872
2844

query I rowsort
SELECT DISTINCT - cor0.col0 * + col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + col0 * cor0.col0 + + col0 FROM tab0 cor0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1395
SELECT + col0 * cor0.col0 + ( col1 + - CAST( NULL AS DECIMAL ) ) * + cor0.col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1395
SELECT + col0 * cor0.col0 + ( col1 + - CAST ( NULL AS REAL ) ) * + cor0.col0 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col1 * + col1 * col1 FROM tab0 AS cor0
----
-636056
-753571
-912673

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1397
SELECT DISTINCT CAST( NULL AS SIGNED ) - tab1.col2 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-1397
SELECT DISTINCT CAST ( NULL AS INTEGER ) - tab1.col2 AS col2 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1398
SELECT - tab1.col1 DIV - 27 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1398
SELECT - tab1.col1 / - 27 FROM tab1
----
0
0
0

query I rowsort
SELECT 55 + - 88 FROM tab0
----
-33
-33
-33

query I rowsort
SELECT ( 4 ) * col1 FROM tab0 AS cor0
----
344
364
388

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1401
SELECT DISTINCT + CAST( + col2 AS SIGNED ) * col2 + col0 FROM tab1 AS cor0
----
2919
3313
9296

skipif mysql # not compatible
query I rowsort label-1401
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) * col2 + col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + col2 + col0 * - col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL 7 AS col0 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT DISTINCT - - ( 39 ) * - col1 FROM tab1 AS cor0
----
-1014
-390
-507

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT 92 FROM tab0 AS cor0
----
92

query I rowsort
SELECT ALL - ( - cor0.col1 ) * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL cor0.col0 + - col0 * 17 * cor0.col2 FROM tab1 AS cor0
----
-130480
-2751
-61952

query I rowsort
SELECT ALL + col1 * col0 + - col0 AS col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT - + ( + col2 ) * - col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - col0 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + 3 + col1 FROM tab1 AS cor0
----
13
16
29

query I rowsort
SELECT DISTINCT + col0 * col0 - 27 FROM tab1 cor0
----
-18
4069
6373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1415
SELECT + ( col2 ) * - CAST( - 26 AS SIGNED ) FROM tab0 AS cor0
----
2132
26
858

skipif mysql # not compatible
query I rowsort label-1415
SELECT + ( col2 ) * - CAST ( - 26 AS INTEGER ) FROM tab0 AS cor0
----
2132
26
858

query I rowsort
SELECT DISTINCT col2 + cor0.col0 AS col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1417
SELECT DISTINCT 17 DIV col2 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1417
SELECT DISTINCT 17 / col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - + 11 * col2 AS col2 FROM tab2 cor0
----
-286
-297
-418

query I rowsort
SELECT - 42 * + col1 * + ( - cor0.col0 ) FROM tab1 AS cor0
----
26880
3276
43680

query I rowsort
SELECT ALL + - 28 FROM tab0 AS cor0
----
-28
-28
-28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1421
SELECT DISTINCT + + col1 * col2 + ( + cor0.col2 + - col2 * CAST( NULL AS SIGNED ) ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1421
SELECT DISTINCT + + col1 * col2 + ( + cor0.col2 + - col2 * CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 31 * + col0 * col1 + col1 AS col0 FROM tab2 AS cor0
----
-142603
-41616
-6696

query I rowsort
SELECT - 77 * col1 + 31 AS col0 FROM tab1 AS cor0
----
-1971
-739
-970

query I rowsort
SELECT - col1 - col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col1 * + col0 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-1426
SELECT ALL - - col2 DIV 54 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1426
SELECT ALL - - col2 / 54 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + + col2 + 86 * col2 AS col2 FROM tab1 AS cor0
----
4698
4959
8352

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - cor0.col0 + 43 FROM tab0 cor0
----
132
67
78

query I rowsort
SELECT ALL - - col2 * + 91 FROM tab2 AS cor0
----
2366
2457
3458

query I rowsort
SELECT col0 + ( col2 ) AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT - col0 * col2 * col1 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-1433
SELECT 58 + col1 DIV + col0 FROM tab1 cor0
----
58
58
66

skipif mysql # not compatible
query I rowsort label-1433
SELECT 58 + col1 / + col0 FROM tab1 cor0
----
58
58
66

query I rowsort
SELECT DISTINCT + - ( + cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1436
SELECT tab0.col1 * 97 DIV - tab0.col2 + - col1 FROM tab0
----
-198
-338
-9506

skipif mysql # not compatible
query I rowsort label-1436
SELECT tab0.col1 * 97 / - tab0.col2 + - col1 FROM tab0
----
-198
-338
-9506

query I rowsort
SELECT DISTINCT tab2.col0 * 57 FROM tab2
----
399
4446
4503

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 + col2 * cor0.col0 col1 FROM tab0 AS cor0
----
7348
842
85

query I rowsort
SELECT - + cor0.col0 * cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + cor0.col1 * col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + - ( col0 ) * + col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - 2 * col0 + col1 FROM tab2 AS cor0
----
-141
-97
17

query I rowsort
SELECT ALL + col1 * + ( - col0 ) + col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-526
-848
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1444
SELECT - CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1444
SELECT - CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col0 + + ( - col2 ) AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT - col0 * - 23 FROM tab2 AS cor0
----
161
1794
1817

query I rowsort
SELECT - ( - col1 ) * - col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + col0 * col1 col1 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + + col0 * cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-1451
SELECT ALL - + col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-1451
SELECT ALL - + col2 / + col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT - - ( - col2 ) FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1453
SELECT DISTINCT + col2 DIV - 30 + cor0.col2 + - col1 * + cor0.col2 * col1 FROM tab2 AS cor0
----
-10945
-25920
-90480

skipif mysql # not compatible
query I rowsort label-1453
SELECT DISTINCT + col2 / - 30 + cor0.col2 + - col1 * + cor0.col2 * col1 FROM tab2 AS cor0
----
-10945
-25920
-90480

onlyif mysql # use DIV operator for integer division
query I rowsort label-1454
SELECT DISTINCT - CAST( - ( + cor0.col0 ) AS SIGNED ) DIV col1 + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-1454
SELECT DISTINCT - CAST ( - ( + cor0.col0 ) AS INTEGER ) / col1 + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1455
SELECT + CAST( - 38 AS SIGNED ) * col0 FROM tab2 AS cor0
----
-266
-2964
-3002

skipif mysql # not compatible
query I rowsort label-1455
SELECT + CAST ( - 38 AS INTEGER ) * col0 FROM tab2 AS cor0
----
-266
-2964
-3002

query I rowsort
SELECT - + 64 FROM tab2 AS cor0
----
-64
-64
-64

query I rowsort
SELECT DISTINCT - + 6 + + col1 FROM tab2 AS cor0
----
11
25
53

query I rowsort
SELECT DISTINCT + col2 * col2 + ( 43 ) FROM tab0
----
1132
44
6767

query I rowsort
SELECT DISTINCT 86 + + col2 FROM tab1 AS cor0
----
140
143
182

query I rowsort
SELECT ALL + col1 * col0 - col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT - + 73 * - col1 + - col0 AS col1 FROM tab0 AS cor0
----
6254
6554
7046

query I rowsort
SELECT DISTINCT - 33 + - col0 FROM tab2 cor0
----
-111
-112
-40

query I rowsort
SELECT + - 95 + col1 * + col0 FROM tab1 AS cor0
----
-17
545
945

query I rowsort
SELECT ALL + - 1 * + col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 * 34 col0 FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT col2 + + 43 * - 9 * col1 AS col2 FROM tab2 AS cor0
----
-11970
-22807
-6541

query I rowsort
SELECT DISTINCT col1 * cor0.col0 * + 32 AS col1 FROM tab2 AS cor0
----
147264
42976
6944

query I rowsort
SELECT ALL col0 * - 10 AS col1 FROM tab2 AS cor0
----
-70
-780
-790

query I rowsort
SELECT ALL + + cor0.col0 * 33 AS col2 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT DISTINCT + col1 + - col2 + - col2 FROM tab2 AS cor0
----
-23
-59
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1472
SELECT + col2 * col0 + + ( + col1 ) DIV - 10 col1 FROM tab1 AS cor0
----
160
3647
7679

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1472
SELECT + col2 * col0 + + ( + col1 ) / - 10 col1 FROM tab1 AS cor0
----
160
3647
7679

query I rowsort
SELECT + - col0 * - ( - col0 ) + col1 AS col0 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - - col2 * - col2 + col0 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL - col1 * col1 + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-1150
-3291
-5509

onlyif mysql # use DIV operator for integer division
query I rowsort label-1478
SELECT ALL + 7 * + col1 + + ( 78 ) DIV + col2 + 52 FROM tab0 cor0
----
656
689
809

skipif mysql # not compatible
query I rowsort label-1478
SELECT ALL + 7 * + col1 + + ( 78 ) / + col2 + 52 FROM tab0 cor0
----
656
689
809

query I rowsort
SELECT - + ( col1 ) + col2 * 10 FROM tab0 AS cor0
----
-87
244
729

query I rowsort
SELECT ALL 30 * + col0 + - col2 AS col2 FROM tab2 AS cor0
----
183
2314
2332

query I rowsort
SELECT DISTINCT + tab1.col1 * - col0 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT 82 + cor0.col1 * 16 AS col1 FROM tab1 AS cor0
----
242
290
498

query I rowsort
SELECT ( - col1 ) * 16 AS col0 FROM tab1 cor0
----
-160
-208
-416

query I rowsort
SELECT ( + col2 ) + + col1 * 48 AS col1 FROM tab0 AS cor0
----
4161
4450
4657

query I rowsort
SELECT + col1 + col2 * 54 AS col1 FROM tab0 AS cor0
----
151
1868
4519

query I rowsort
SELECT - - 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 ALL cor0.col0 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT 98 FROM tab1
----
98
98
98

query I rowsort
SELECT - 8 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col1 ) col0 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + cor0.col1 * 0 AS col1 FROM tab0, tab2 AS cor0
----
0

query I rowsort
SELECT - col2 + + cor0.col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 92 AS col1 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT ALL + col0 + col2 + - 75 FROM tab0
----
-18
-39
96

query I rowsort
SELECT ALL - col0 * col0 + 93 * + col2 + + col1 FROM tab2
----
-2690
-3607
2493

query I rowsort
SELECT ALL - 1 * + 76 FROM tab0
----
-76
-76
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 col0 FROM tab1
----
70
70
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1498
SELECT DISTINCT ( - 77 ) DIV - col2 AS col0 FROM tab0
----
0
2
77

skipif mysql # not compatible
query I rowsort label-1498
SELECT DISTINCT ( - 77 ) / - col2 AS col0 FROM tab0
----
0
2
77

query I rowsort
SELECT DISTINCT cor0.col1 * + col0 FROM tab0 AS cor0
----
2064
3395
8099

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT ALL - 43 AS col1 FROM tab0 AS cor0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT + tab1.col1 * col1 FROM tab1
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 * col0 col2 FROM tab0
----
1869
504
735

query I rowsort
SELECT DISTINCT - 91 FROM tab2, tab0, tab1 AS cor0
----
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1505
SELECT + CAST( NULL AS SIGNED ) * col0 col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1505
SELECT + CAST ( NULL AS INTEGER ) * col0 col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 40 FROM tab2 AS cor0
----
40
40
40

query I rowsort
SELECT - 7 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

query I rowsort
SELECT ALL col2 + - col0 AS col1 FROM tab2 cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 59 * - col1 + 62 col2 FROM tab1 AS cor0
----
-1472
-528
-705

onlyif mysql # use DIV operator for integer division
query I rowsort label-1510
SELECT ALL col1 DIV col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1510
SELECT ALL col1 / col0 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT tab2.col1 + col1 * ( ( + tab2.col0 ) ) FROM tab2
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-1512
SELECT ALL + col0 DIV + col0 + - ( + 71 ) FROM tab2
----
-70
-70
-70

skipif mysql # not compatible
query I rowsort label-1512
SELECT ALL + col0 / + col0 + - ( + 71 ) FROM tab2
----
-70
-70
-70

query I rowsort
SELECT DISTINCT col2 + col1 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT - col2 + - col0 * ( - col2 ) * col1 + - 26 FROM tab0
----
3368
664010
68053

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 88 * - col0 * 63 + + col2 col0 FROM tab2
----
-38781
-432406
-437938

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab1
----
93

query I rowsort
SELECT DISTINCT + ( col1 ) * + col0 + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT col0 - + tab0.col2 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
70

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1, tab0, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL 88 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT tab0.col0 * col2 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT + col1 * col0 - - col0 * + col2 AS col2 FROM tab2 cor0
----
406
4345
6630

query I rowsort
SELECT + col2 + 7 AS col1 FROM tab1 AS cor0
----
103
61
64

query I rowsort
SELECT cor0.col2 + col0 * - col0 * col1 FROM tab1 AS cor0
----
-180
-40903
-83104

query I rowsort
SELECT DISTINCT col1 * col2 + col1 * col2 FROM tab2 cor0
----
1292
1674
3068

query I rowsort
SELECT ALL - ( + cor0.col0 ) - - col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - col1 * 23 FROM tab1
----
-230
-299
-598

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col2 * col0 col1 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT col2 * 85 + col0 AS col0 FROM tab1
----
4593
4909
8240

query I rowsort
SELECT + cor0.col2 * - cor0.col1 + - col2 AS col0 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT + + col0 * col0 * col0 + - ( 6 + col0 ) FROM tab2 AS cor0
----
330
474468
492954

query I rowsort
SELECT - - cor0.col2 + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col1 + - col0 * col2 AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT + 56 + + col0 FROM tab2
----
134
135
63

query I rowsort
SELECT tab0.col0 + col2 AS col0 FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + cor0.col0 * col0 col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL col2 + col0 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL - col2 * col0 AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT + tab1.col2 + tab1.col0 * - col0 AS col1 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT tab0.col1 + tab0.col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + col2 + col2 * col2 FROM tab2 cor0
----
1482
702
756

query I rowsort
SELECT - - col2 * col0 * col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + - col1 * - col1 * cor0.col1 col2 FROM tab1 AS cor0
----
17550
2184
990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * col0 + + col2 col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT - cor0.col1 * cor0.col2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to c52f276f0448e9317aa4a2c462e0bab5

query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL col0 + - 21 FROM tab2
----
-14
57
58

query I rowsort
SELECT DISTINCT + 20 + 4 * - col1 * - col1 AS col1 FROM tab1
----
2724
420
696

query I rowsort
SELECT - ( 23 ) * tab2.col1 + col2 * col1 FROM tab2
----
124
177
255

query I rowsort
SELECT 7 + col0 FROM tab0
----
31
42
96

query I rowsort
SELECT - col1 * + 31 * col2 AS col0 FROM tab2
----
-20026
-25947
-47554

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab0, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT col0 + - 46 FROM tab1
----
-43
18
34

query I rowsort
SELECT ALL + col2 * 63 + col0 FROM tab0
----
2103
5255
98

query I rowsort
SELECT + tab0.col1 * col2 * tab0.col1 - - col2 AS col1 FROM tab0
----
244101
679124
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 + col2 + col0 col1 FROM tab2
----
117
130
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-1559
SELECT + col1 DIV - col1 + col2 * col0 * + col1 FROM tab1
----
36479
4211
99839

skipif mysql # not compatible
query I rowsort label-1559
SELECT + col1 / - col1 + col2 * col0 * + col1 FROM tab1
----
36479
4211
99839

query I rowsort
SELECT 18 AS col2 FROM tab0
----
18
18
18

query I rowsort
SELECT + 30 * - 95 * col1 + col1 AS col2 FROM tab0
----
-245014
-259259
-276353

query I rowsort
SELECT tab2.col1 * + col1 + - col2 FROM tab2
----
251
3455
934

query I rowsort
SELECT ALL + ( + col2 ) * col0 + col1 + col1 * col0 AS col1 FROM tab2 AS cor0
----
4362
437
6689

query I rowsort
SELECT 50 FROM tab2, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT + col0 + cor0.col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT ( cor0.col2 ) * + col2 * + col1 AS col0 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT - col1 * ( col0 ) AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT 8 * col2 FROM tab2 AS cor0
----
208
216
304

query I rowsort
SELECT ALL col0 * col1 * col1 - + col1 FROM tab0 AS cor0
----
177418
329218
736918

onlyif mysql # use DIV operator for integer division
query I rowsort label-1571
SELECT ALL col1 DIV + cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-1571
SELECT ALL col1 / + cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
35
83
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 97 col2 FROM tab2 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ALL + cor0.col1 + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + + 53 * col2 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT DISTINCT + 91 + cor0.col0 AS col2 FROM tab0 cor0
----
115
126
180

query I rowsort
SELECT DISTINCT col1 * col2 * col0 + + col0 AS col2 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT ALL - col2 + + col1 - col2 * - col0 * col0 FROM tab0 AS cor0
----
1321
19061
649531

query I rowsort
SELECT - 75 * + col2 FROM tab1 AS cor0
----
-4050
-4275
-7200

query I rowsort
SELECT ALL + col1 * + col0 - + cor0.col1 AS col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT - 68 * tab1.col0 FROM tab1
----
-204
-4352
-5440

query I rowsort
SELECT + ( - 53 ) * - tab2.col1 * - col1 AS col1 FROM tab2
----
-15317
-184493
-50933

query I rowsort
SELECT + 33 * - col1 AS col1 FROM tab2
----
-1023
-1947
-561

onlyif mysql # use DIV operator for integer division
query I rowsort label-1583
SELECT DISTINCT + 78 DIV col1 + - col2 DIV - col0 FROM tab2
----
1
4
5

skipif mysql # not compatible
query I rowsort label-1583
SELECT DISTINCT + 78 / col1 + - col2 / - col0 FROM tab2
----
1
4
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1584
SELECT DISTINCT - col2 + - col1 DIV col0 AS col2 FROM tab0
----
-3
-36
-83

skipif mysql # not compatible
query I rowsort label-1584
SELECT DISTINCT - col2 + - col1 / col0 AS col2 FROM tab0
----
-3
-36
-83

query I rowsort
SELECT 3 AS col1 FROM tab2 AS cor0
----
3
3
3

query I rowsort
SELECT ALL - cor0.col2 * col0 + col0 + + col0 AS col1 FROM tab0 AS cor0
----
-7120
-744
35

query I rowsort
SELECT ALL - + 97 FROM tab2 cor0
----
-97
-97
-97

query I rowsort
SELECT DISTINCT - + col1 + + col0 * col2 AS col0 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-1589
SELECT 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-1589
SELECT col2 / - col2 col0 FROM tab1 AS cor0
----
-1
-1
-1

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE col1 * + col0 NOT IN ( col2 * + col2 + col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT col0 * + col1 + col2 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT col0 + - tab0.col2 AS col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL col2 * + col2 + col1 FROM tab1
----
2942
3259
9229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 col2 FROM tab0 AS cor0 WHERE ( NULL ) <> - col0 / + col0
----

query I rowsort
SELECT col1 * col0 + + col1 * col0 + - col1 * col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col2 - col1 * + col0 AS col0 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 WHERE NOT NULL NOT IN ( col0 * - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1598
SELECT - tab2.col0 + - col0 DIV - col0 AS col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-1598
SELECT - tab2.col0 + - col0 / - col0 AS col0 FROM tab2
----
-6
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1599
SELECT + col2 DIV + col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1599
SELECT + col2 / + col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 - col0 AS col1 FROM tab2
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-1601
SELECT + tab2.col1 * + col0 DIV col0 + - col2 + - col0 AS col0 FROM tab2
----
-100
-3
-45

skipif mysql # not compatible
query I rowsort label-1601
SELECT + tab2.col1 * + col0 / col0 + - col2 + - col0 AS col0 FROM tab2
----
-100
-3
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col0 col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT cor0.col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 - - cor0.col0 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 * + col1 + - col2 AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT col2 + col1 * - col0 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-1607
SELECT + + col2 + + col2 + cor0.col1 DIV col1 col0 FROM tab0 AS cor0
----
165
3
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1607
SELECT + + col2 + + col2 + cor0.col1 / col1 col0 FROM tab0 AS cor0
----
165
3
67

query I rowsort
SELECT ALL + col1 * col2 * - col1 AS col0 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - + col1 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-1610
SELECT DISTINCT - cor0.col0 * cor0.col1 DIV col2 FROM tab0 AS cor0
----
-3395
-62
-98

skipif mysql # not compatible
query I rowsort label-1610
SELECT DISTINCT - cor0.col0 * cor0.col1 / col2 FROM tab0 AS cor0
----
-3395
-62
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1611
SELECT DISTINCT - + col0 DIV - col0 AS col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1611
SELECT DISTINCT - + col0 / - col0 AS col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + - col0 * col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + cor0.col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col2 + col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT - col0 * col1 + col2 + col0 AS col2 FROM tab0 cor0
----
-2007
-3359
-7928

query I rowsort
SELECT ALL tab1.col0 * tab1.col0 - tab1.col2 FROM tab1
----
-45
4039
6304

onlyif mysql # use DIV operator for integer division
query I rowsort label-1617
SELECT ALL + col0 DIV col2 + col2 - tab1.col1 FROM tab1
----
28
48
83

skipif mysql # not compatible
query I rowsort label-1617
SELECT ALL + col0 / col2 + col2 - tab1.col1 FROM tab1
----
28
48
83

query I rowsort
SELECT - col0 * col1 + - col2 FROM tab0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-1619
SELECT + - col0 DIV - col0 + - col2 + + col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1619
SELECT + - col0 / - col0 + - col2 + + col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + col2 - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 WHERE ( NULL ) NOT IN ( col0 - col0 )
----

query I rowsort
SELECT ALL tab2.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query III rowsort
SELECT * FROM tab1 WHERE NULL <= ( col2 / - col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT IN ( + col0 * - col0 )
----

query I rowsort
SELECT ALL + col1 + col1 + col2 * col0 * - col1 AS col2 FROM tab0
----
-3201
-663936
-67940

query I rowsort
SELECT ALL - col0 * + col1 * - col0 FROM tab1 AS cor0
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-1627
SELECT - col1 * col0 DIV col0 - cor0.col1 DIV col1 AS col1 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-1627
SELECT - col1 * col0 / col0 - cor0.col1 / col1 AS col1 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT DISTINCT - col2 + - col2 * col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT col1 + col2 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT - col1 + tab1.col0 * col0 + col2 * tab1.col2 AS col0 FROM tab1
----
15603
2899
7335

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL <= ( - col1 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT IN ( - tab1.col1 * col0 )
----

query I rowsort
SELECT DISTINCT - 86 * + tab2.col0 AS col0 FROM tab2, tab0 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT - 91 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 74 col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
74

query I rowsort
SELECT col0 * 63 FROM tab2
----
441
4914
4977

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to aeb56f097f17f262600266df7fcf8652

query I rowsort
SELECT - 8 + 71 FROM tab1 AS cor0
----
63
63
63

query I rowsort
SELECT ( col0 ) * + col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + 11 FROM tab1 AS cor0
----
11
11
11

query I rowsort
SELECT + 91 * - 41 + + cor0.col1 FROM tab2 AS cor0
----
-3672
-3700
-3714

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1642
SELECT ALL 80 + + ( cor0.col2 * CAST( - 94 AS SIGNED ) ) AS col2 FROM tab0 AS cor0
----
-14
-3022
-7628

skipif mysql # not compatible
query I rowsort label-1642
SELECT ALL 80 + + ( cor0.col2 * CAST ( - 94 AS INTEGER ) ) AS col2 FROM tab0 AS cor0
----
-14
-3022
-7628

query I rowsort
SELECT - 45 + col2 FROM tab1 AS cor0
----
12
51
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 54 * - col1 + col2 * cor0.col0 * + ( + col1 + col1 ) col0 FROM tab0 AS cor0
----
131580
1323322
1552

query I rowsort
SELECT - 64 * - col0 AS col1 FROM tab0 cor0
----
1536
2240
5696

query I rowsort
SELECT - col0 * col0 + - col0 * + col1 FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT + col0 + + 72 AS col2 FROM tab0 cor0
----
107
161
96

query I rowsort
SELECT ALL - col2 + + col1 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT + - 85 FROM tab0 AS cor0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - col0 + - col1 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + 88 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT ALL + tab2.col0 * + col2 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT tab2.col2 AS col1 FROM tab2, tab1 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + col2 * + col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 27 AS col0 FROM tab2 AS cor0
----
27
27
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-1656
SELECT ALL + + col2 + col0 DIV - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-1656
SELECT ALL + + col2 + col0 / - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT + - col0 + - col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT col1 * 7 AS col1 FROM tab1 AS cor0
----
182
70
91

query I rowsort
SELECT + col1 + - 89 FROM tab1 AS cor0
----
-63
-76
-79

query I rowsort
SELECT DISTINCT + + col1 + + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL col1 + + 53 AS col0 FROM tab1 AS cor0
----
63
66
79

query I rowsort
SELECT + + col0 * 49 + - col2 * - col1 FROM tab2 AS cor0
----
1180
4517
5356

onlyif mysql # use DIV operator for integer division
query I rowsort label-1663
SELECT col2 + 31 + - col2 DIV col0 AS col0 FROM tab2
----
55
57
69

skipif mysql # not compatible
query I rowsort label-1663
SELECT col2 + 31 + - col2 / col0 AS col0 FROM tab2
----
55
57
69

query I rowsort
SELECT - col0 * ( + cor0.col2 ) * col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT + + col2 * 36 FROM tab2 cor0
----
1368
936
972

query I rowsort
SELECT - 61 FROM tab2
----
-61
-61
-61

query I rowsort
SELECT ALL - col2 + 13 FROM tab2 AS cor0
----
-13
-14
-25

query I rowsort
SELECT - + col1 * 11 FROM tab1 AS cor0
----
-110
-143
-286

query I rowsort
SELECT DISTINCT col0 + col2 * 33 FROM tab2 AS cor0
----
1333
898
936

onlyif mysql # use DIV operator for integer division
query I rowsort label-1670
SELECT ALL + col1 + - col0 DIV col0 AS col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-1670
SELECT ALL + col1 + - col0 / col0 AS col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT + + ( - 24 ) * col1 AS col0 FROM tab2 cor0
----
-1416
-408
-744

query I rowsort
SELECT col1 * tab1.col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT col2 + + col0 * col0 * col0 FROM tab2 cor0
----
370
474578
493077

query I rowsort
SELECT ALL + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - col0 * cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col0 ) * col0 col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-1678
SELECT + col2 DIV tab0.col2 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1678
SELECT + col2 / tab0.col2 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT 62 * + cor1.col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ff6d7ddeb197a1698798622cd4bfd846

query I rowsort
SELECT ALL - col0 - + col2 AS col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT + 6 FROM tab2 cor0
----
6
6
6

query I rowsort
SELECT - 95 AS col1 FROM tab0 AS cor0
----
-95
-95
-95

query I rowsort
SELECT DISTINCT - col0 + + col0 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 35 * 13 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 3baa4b80db4fa6fc211f0a171751d41b

query I rowsort
SELECT DISTINCT - + 61 * + col1 FROM tab0 AS cor0
----
-5246
-5551
-5917

query I rowsort
SELECT - 79 + col1 FROM tab1 AS cor0
----
-53
-66
-69

query I rowsort
SELECT ALL - col2 + col0 * 25 FROM tab0 AS cor0
----
2143
567
874

query I rowsort
SELECT + 49 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT DISTINCT 6 FROM tab2
----
6

query I rowsort
SELECT 31 * - col0 + col0 AS col2 FROM tab2
----
-210
-2340
-2370

query I rowsort
SELECT - cor0.col0 * 55 FROM tab2, tab0 AS cor0
----
9 values hashing to 97fffb985b84746b3608ffd578bdb450

query I rowsort
SELECT + 23 + col1 * col0 FROM tab0 AS cor0
----
2087
3418
8122

query I rowsort
SELECT - ( - col0 ) * col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 + cor0.col2 * + col1 col0 FROM tab0 AS cor0
----
141
2882
7506

query I rowsort
SELECT ALL 3 AS col0 FROM tab1 AS cor0
----
3
3
3

query I rowsort
SELECT ALL + ( + cor0.col1 ) * - 84 + + 51 FROM tab0 AS cor0
----
-7173
-7593
-8097

query I rowsort
SELECT ALL - + 35 * - col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT ALL - 74 * col2 FROM tab1 AS cor0
----
-3996
-4218
-7104

query I rowsort
SELECT DISTINCT + - 45 + + col0 FROM tab2 AS cor0
----
-38
33
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col2 * ( col2 * col2 ) col2 FROM tab2 cor0
----
17517
19652
54855

query I rowsort
SELECT ALL 77 * col0 + - col0 FROM tab0
----
1824
2660
6764

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 * tab1.col2 col1 FROM tab1
----
4320
4560
7680

query I rowsort
SELECT ALL + 92 AS col0 FROM tab1
----
92
92
92

query I rowsort
SELECT ALL - col2 * col0 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col1 * col2 - 26 FROM tab2
----
1508
620
811

query I rowsort
SELECT DISTINCT + col0 * - col0 * col1 FROM tab0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-1708
SELECT ALL - ( col0 ) DIV 84 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1708
SELECT ALL - ( col0 ) / 84 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 44 AS col1 FROM tab2, tab1 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to 19a2b9512177749564ba22ea2213fe3f

query I rowsort
SELECT - 61 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT ALL - - 92 AS col0 FROM tab0 cor0
----
92
92
92

query I rowsort
SELECT DISTINCT - cor0.col0 * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col2 - ( + 5 ) AS col2 FROM tab0
----
-4
28
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * cor0.col1 col0 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 00f153c5d80e692faff5018d8701b92d

query I rowsort
SELECT DISTINCT - tab0.col2 + tab0.col2 - + col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT col2 * + ( tab1.col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT + col1 + + col2 + - col1 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL + - 81 * - 96 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
7777
7809
7858

query I rowsort
SELECT col2 + - col2 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1720
SELECT - col1 - col0 DIV - col1 AS col2 FROM tab2 AS cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-1720
SELECT - col1 - col0 / - col1 AS col2 FROM tab2 AS cor0
----
-13
-31
-58

query I rowsort
SELECT ALL - col2 - + 1 AS col0 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT ALL 56 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT - col1 * + 63 AS col0 FROM tab1
----
-1638
-630
-819

query I rowsort
SELECT - col1 * 39 AS col0 FROM tab1 AS cor0
----
-1014
-390
-507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1725
SELECT - CAST( - col0 AS SIGNED ) FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-1725
SELECT - CAST ( - col0 AS INTEGER ) FROM tab2 cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 * 59 col0 FROM tab2 AS cor0
----
1062

onlyif mysql # use DIV operator for integer division
query I rowsort label-1727
SELECT - 43 DIV - 66 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1727
SELECT - 43 / - 66 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 * col1 + - cor0.col1 * col2 + col2 col1 FROM tab0 AS cor0
----
-464
3731
7276

query I rowsort
SELECT DISTINCT + tab2.col1 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT + cor0.col2 + col1 * col2 AS col0 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + col0 * - 97 AS col1 FROM tab0 AS cor0
----
-2328
-3395
-8633

onlyif mysql # use DIV operator for integer division
query I rowsort label-1732
SELECT ALL col2 DIV col1 + - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1732
SELECT ALL col2 / col1 + - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1733
SELECT DISTINCT + ( ( + cor0.col2 ) ) DIV - cor0.col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1733
SELECT DISTINCT + ( ( + cor0.col2 ) ) / - cor0.col0 FROM tab0 AS cor0
----
-1
0

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 + - cor0.col1 * - col0 + + col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-1736
SELECT + cor0.col1 DIV + 11 FROM tab0 AS cor0
----
7
8
8

skipif mysql # not compatible
query I rowsort label-1736
SELECT + cor0.col1 / + 11 FROM tab0 AS cor0
----
7
8
8

query I rowsort
SELECT DISTINCT - 58 * - col2 + + col0 AS col1 FROM tab0 cor0
----
1938
4845
93

query I rowsort
SELECT ALL + tab1.col1 * - col1 + col2 AS col1 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT - 47 * 26 AS col1 FROM tab2
----
-1222
-1222
-1222

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1740
SELECT DISTINCT CAST( NULL AS DECIMAL ) + + col1 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-1740
SELECT DISTINCT CAST ( NULL AS REAL ) + + col1 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT - 6 * col2 AS col0 FROM tab0
----
-198
-492
-6

query I rowsort
SELECT col2 * + col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + - col0 - col1 * - col2 AS col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT + col1 * - col2 + col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col1 * 16 AS col0 FROM tab1 AS cor0
----
160
208
416

query I rowsort
SELECT col1 * col2 - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL - col0 * col1 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - + col2 + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + ( col2 ) * 77 + col0 AS col1 FROM tab0 cor0
----
-2517
-42
-6225

query I rowsort
SELECT ALL col2 * - col0 + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL - - cor0.col0 + col1 * col2 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT 6 + col1 FROM tab2 AS cor0
----
23
37
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + col2 + col1 * + col2 + 50 AS col2 FROM tab2 AS cor0
----
1610
734
914

query I rowsort
SELECT DISTINCT - col1 - - col1 AS col0 FROM tab2 cor0
----
0

query I rowsort
SELECT ALL + - 53 * + col0 AS col2 FROM tab0 AS cor0
----
-1272
-1855
-4717

query I rowsort
SELECT ALL - + col2 + col1 * - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 32 col2 FROM tab0, tab2 AS cor0
----
32

query I rowsort
SELECT + ( + col1 ) * - 79 * col0 + col1 FROM tab2 AS cor0
----
-106080
-17112
-363499

query I rowsort
SELECT + - 16 * col1 + col0 FROM tab1 AS cor0
----
-128
-413
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1761
SELECT + col0 DIV + 41 AS col1 FROM tab0 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1761
SELECT + col0 / + 41 AS col1 FROM tab0 AS cor0
----
0
0
2

query I rowsort
SELECT ALL + - col0 * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1763
SELECT ALL - col1 + + CAST( 3 AS SIGNED ) * col0 FROM tab2 AS cor0
----
-10
175
220

skipif mysql # not compatible
query I rowsort label-1763
SELECT ALL - col1 + + CAST ( 3 AS INTEGER ) * col0 FROM tab2 AS cor0
----
-10
175
220

query I rowsort
SELECT - + col0 * col0 + ( - col0 ) * col1 AS col1 FROM tab1 cor0
----
-4736
-7440
-87

query I rowsort
SELECT ALL + - col2 - col0 * - cor0.col2 AS col2 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT - col2 * - cor0.col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + col1 * + 99 FROM tab1 AS cor0
----
1287
2574
990

onlyif mysql # use DIV operator for integer division
query I rowsort label-1768
SELECT DISTINCT + + col2 DIV - col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-1768
SELECT DISTINCT + + col2 / - col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL + + col1 + + ( + ( col0 ) ) * + 88 AS col0 FROM tab0 AS cor0
----
2198
3177
7923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 22 col1 FROM tab1 cor0
----
-1408
-1760
-66

query I rowsort
SELECT - col2 + col1 * + 50 AS col2 FROM tab2 AS cor0
----
1523
2924
812

query I rowsort
SELECT + col0 * - col2 - + col2 FROM tab1
----
-216
-3705
-7776

query I rowsort
SELECT 68 + col1 AS col0 FROM tab0
----
154
159
165

query I rowsort
SELECT DISTINCT - col0 * ( + 18 * col2 ) AS col0 FROM tab1 AS cor0
----
-138240
-2916
-65664

query I rowsort
SELECT col0 * - ( col0 ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + + col0 * + 81 * col2 AS col2 FROM tab0 cor0
----
2835
591138
64152

query I rowsort
SELECT + + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + + col1 * 14 AS col0 FROM tab0 AS cor0
----
1204
1274
1358

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1779
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1779
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort
SELECT + col0 + CAST ( col0 AS REAL ) * - tab2.col2 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT - ( 32 ) - + col2 FROM tab0 AS cor0
----
-114
-33
-65

query I rowsort
SELECT + cor0.col2 * col1 + 74 FROM tab0 AS cor0
----
171
2912
7536

query I rowsort
SELECT - + col0 + - 75 * col1 * col0 AS col2 FROM tab0 AS cor0
----
-154824
-254660
-607514

query I rowsort
SELECT - col2 - + 23 AS col0 FROM tab0 cor0
----
-105
-24
-56

query I rowsort
SELECT ALL ( tab0.col2 * ( - col1 ) ) AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + 75 * - col0 AS col2 FROM tab1
----
-225
-4800
-6000

onlyif mysql # use DIV operator for integer division
query I rowsort label-1787
SELECT DISTINCT col0 + col2 DIV col1 AS col2 FROM tab2
----
7
78
81

skipif mysql # not compatible
query I rowsort label-1787
SELECT DISTINCT col0 + col2 / col1 AS col2 FROM tab2
----
7
78
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1788
SELECT DISTINCT + 16 DIV - col2 AS col0 FROM tab0
----
-16
0

skipif mysql # not compatible
query I rowsort label-1788
SELECT DISTINCT + 16 / - col2 AS col0 FROM tab0
----
-16
0

query I rowsort
SELECT + col0 * + tab0.col1 * - col0 AS col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab2, tab0 AS cor0
----
3

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
17
31
59

query I rowsort
SELECT DISTINCT - 34 AS col0 FROM tab1, tab0 AS cor0
----
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1793
SELECT + - col1 + CAST( NULL AS SIGNED ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1793
SELECT + - col1 + CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1794
SELECT col0 * 60 + - cor0.col2 * + col0 DIV + cor0.col0 - col0 FROM tab1 AS cor0
----
123
3719
4624

skipif mysql # not compatible
query I rowsort label-1794
SELECT col0 * 60 + - cor0.col2 * + col0 / + cor0.col0 - col0 FROM tab1 AS cor0
----
123
3719
4624

query I rowsort
SELECT cor0.col1 + - ( col2 + col1 ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col2 - + col0 * + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT - col1 + col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 + col2 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT - col2 - tab0.col1 FROM tab0 WHERE NULL IN ( col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT - col0 IN ( tab2.col1 * col0 + tab2.col1 * + tab2.col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1801
SELECT DISTINCT col2 DIV tab1.col0 - + col1 AS col2 FROM tab1
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-1801
SELECT DISTINCT col2 / tab1.col0 - + col1 AS col2 FROM tab1
----
-10
-12
-8

query I rowsort
SELECT + tab0.col0 + - col0 * - tab0.col0 AS col1 FROM tab0 WHERE ( col2 ) IN ( - col2 )
----

query I rowsort
SELECT - col2 + col2 AS col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1804
SELECT ALL + col0 + col1 * col0 DIV - col0 AS col2 FROM tab2
----
-24
19
62

skipif mysql # not compatible
query I rowsort label-1804
SELECT ALL + col0 + col1 * col0 / - col0 AS col2 FROM tab2
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-1805
SELECT + - 59 * col2 DIV - ( cor0.col0 * cor0.col2 + 51 ) FROM tab0 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1805
SELECT + - 59 * col2 / - ( cor0.col0 * cor0.col2 + 51 ) FROM tab0 cor0
----
0
0
2

query I rowsort
SELECT ALL - 84 + + cor0.col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to c3c89490be11091fb21c8bf630a48db0

query I rowsort
SELECT - cor0.col0 * + cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 82e15d5967b272804e574774895a0222

query I rowsort
SELECT 1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT + col1 - col0 AS col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - - col1 * cor0.col2 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + ( col2 ) * - col2 + + 1 * col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 - + tab0.col1 col0 FROM tab0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-1814
SELECT DISTINCT col0 DIV col0 + + tab0.col1 col2 FROM tab0
----
87
92
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1814
SELECT DISTINCT col0 / col0 + + tab0.col1 col2 FROM tab0
----
87
92
98

query I rowsort
SELECT - ( + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col0 + col1 AS col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT - col2 * col2 * col1 - col0 AS col0 FROM tab1
----
-119888
-32554
-75819

query I rowsort
SELECT cor1.col2 FROM tab2, tab2 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT + ( 65 ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * + 95 col1 FROM tab1 AS cor0
----
5156
5425
9133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 col2 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * + col0 * + col0 col1 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ( + col0 ) * + 14 AS col1 FROM tab2 AS cor0
----
1092
1106
98

query I rowsort
SELECT col2 * - col2 * + col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1825
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1825
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - cor0.col0 + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT col1 * - col1 + - cor0.col2 * - cor0.col2 - 86 FROM tab1 AS cor0
----
2154
3063
8961

query I rowsort
SELECT + col0 - col0 * + cor0.col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - col2 - 36 AS col2 FROM tab0 cor0
----
-118
-37
-69

query I rowsort
SELECT - 31 FROM tab1
----
-31
-31
-31

query I rowsort
SELECT ALL col2 + + 79 FROM tab0 AS cor0
----
112
161
80

query I rowsort
SELECT cor0.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 52c9380a39df7a744b9f2f2c5bf55dd5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col2 col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT - + ( col1 ) + - col2 * cor0.col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT - - 33 * - 17 FROM tab2 AS cor0
----
-561
-561
-561

query I rowsort
SELECT 93 FROM tab0, tab2 cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to bed80270d2bd273301f8ff63d7ef9f43

query I rowsort
SELECT - - 37 + col1 AS col0 FROM tab1 AS cor0
----
47
50
63

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL + 59 * col2 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT tab1.col1 * col1 * col1 FROM tab1
----
1000
17576
2197

query I rowsort
SELECT DISTINCT - 3 AS col0 FROM tab1, tab0 AS cor0
----
-3

query I rowsort
SELECT DISTINCT + 34 AS col0 FROM tab1 AS cor0
----
34

query I rowsort
SELECT DISTINCT cor0.col1 + 15 AS col2 FROM tab1, tab1 AS cor0
----
25
28
41

query I rowsort
SELECT ( - 64 ) FROM tab2
----
-64
-64
-64

query I rowsort
SELECT ALL ( col0 ) AS col2 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col1 ) * ( col0 * cor0.col1 ) col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - col1 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-1849
SELECT ALL + - 98 + col0 DIV + col2 AS col2 FROM tab1 AS cor0
----
-97
-98
-98

skipif mysql # not compatible
query I rowsort label-1849
SELECT ALL + - 98 + col0 / + col2 AS col2 FROM tab1 AS cor0
----
-97
-98
-98

query I rowsort
SELECT DISTINCT - + 6 AS col1 FROM tab1 AS cor0
----
-6

query I rowsort
SELECT - + 56 AS col1 FROM tab1 AS cor0
----
-56
-56
-56

query I rowsort
SELECT ALL - 2 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-28
-29
-40

query I rowsort
SELECT - tab2.col1 - - tab2.col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT ( - 42 * - col2 ) + + 81 AS col0 FROM tab2
----
1173
1215
1677

onlyif mysql # use DIV operator for integer division
query I rowsort label-1855
SELECT col0 DIV + col2 - - col0 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-1855
SELECT col0 / + col2 - - col0 FROM tab1
----
3
65
80

query I rowsort
SELECT DISTINCT 95 AS col0 FROM tab0
----
95

query I rowsort
SELECT - 33 FROM tab1
----
-33
-33
-33

query I rowsort
SELECT tab2.col0 + - 61 * col2 + col2 * 24 FROM tab2
----
-1327
-884
-992

query I rowsort
SELECT ALL + col0 + - col2 * 99 * col0 AS col0 FROM tab0 AS cor0
----
-3430
-722413
-78384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 * ( col2 ) AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - col2 + + 99 * col0 AS col0 FROM tab1 AS cor0
----
243
6279
7824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1863
SELECT + col0 * CAST( 40 AS SIGNED ) + - col2 AS col1 FROM tab0 AS cor0
----
1399
3478
927

skipif mysql # not compatible
query I rowsort label-1863
SELECT + col0 * CAST ( 40 AS INTEGER ) + - col2 AS col1 FROM tab0 AS cor0
----
1399
3478
927

onlyif mysql # use DIV operator for integer division
query I rowsort label-1864
SELECT ALL - + col0 DIV - col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1864
SELECT ALL - + col0 / - col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ( - ( cor0.col1 ) ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1866
SELECT - col1 * - CAST( NULL AS SIGNED ) + - 62 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1866
SELECT - col1 * - CAST ( NULL AS INTEGER ) + - 62 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * col0 + col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - - col2 col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT col0 + 82 FROM tab2 AS cor0
----
160
161
89

query I rowsort
SELECT ALL col1 * - col2 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + col1 - ( - ( col1 ) ) * col2 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT ALL + - col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + cor0.col0 + + col1 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + col1 - ( col1 + - cor0.col0 ) FROM tab2 AS cor0
----
-40
-55
45

query I rowsort
SELECT + col2 + col2 * col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - + col0 * col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col2 * - col0 + + col1 * col0 AS col0 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT DISTINCT col0 * - col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT - col1 * - ( - col0 ) - col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT ALL - + col0 * ( ( col2 ) ) + 87 FROM tab0 AS cor0
----
-705
-7211
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1881
SELECT DISTINCT + - col0 - - CAST( - cor0.col1 AS SIGNED ) * col2 AS col1 FROM tab0 AS cor0
----
-132
-2862
-7551

skipif mysql # not compatible
query I rowsort label-1881
SELECT DISTINCT + - col0 - - CAST ( - cor0.col1 AS INTEGER ) * col2 AS col1 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1882
SELECT + col0 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1882
SELECT + col0 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col0 * + col1 + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1885
SELECT ALL 97 / - cor0.col2 + col0 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1885
SELECT ALL 97 / - cor0.col2 + col0 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 9a402ad2669465fb284445c499a48f2c

query I rowsort
SELECT 68 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT ALL tab0.col2 + col2 * + col1 AS col1 FROM tab0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1889
SELECT CAST( NULL AS SIGNED ) / - 17 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1889
SELECT CAST ( NULL AS INTEGER ) / - 17 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + tab1.col2 * ( + col1 + col1 ) AS col1 FROM tab1
----
1140
2496
2808

query I rowsort
SELECT DISTINCT + - 3 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-30
-39
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1892
SELECT + col2 DIV col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1892
SELECT + col2 / col2 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL 11 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col2 + - ( - cor0.col1 ) col2 FROM tab2 AS cor0
----
1461
735
760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col1 + ( + ( col2 ) ) col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT ALL - + col2 * col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 30 * col2 FROM tab2 AS cor0
----
1140
780
810

query I rowsort
SELECT ( - cor0.col2 ) * 51 FROM tab1 AS cor0
----
-2754
-2907
-4896

onlyif mysql # use DIV operator for integer division
query I rowsort label-1899
SELECT - ( + col0 ) DIV + 5 FROM tab0 AS cor0
----
-17
-4
-7

skipif mysql # not compatible
query I rowsort label-1899
SELECT - ( + col0 ) / + 5 FROM tab0 AS cor0
----
-17
-4
-7

query I rowsort
SELECT DISTINCT - cor0.col2 * - col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT 24 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT - col0 - col2 * + col0 * + 99 FROM tab1
----
-16041
-361216
-760400

query I rowsort
SELECT DISTINCT + + col1 - - col0 * col2 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - + 36 AS col2 FROM tab2 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ALL + 39 AS col1 FROM tab2 AS cor0
----
39
39
39

query I rowsort
SELECT - tab2.col1 * tab2.col1 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 79ea663c5f468cc57a869fc826cf04a5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1907
SELECT + 32 + col1 + CAST( col0 * + col1 AS SIGNED ) FROM tab2
----
1392
280
4693

skipif mysql # not compatible
query I rowsort label-1907
SELECT + 32 + col1 + CAST ( col0 * + col1 AS INTEGER ) FROM tab2
----
1392
280
4693

query I rowsort
SELECT cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col1 * + col2 - - 15 FROM tab2
----
1549
661
852

query I rowsort
SELECT ALL 11 + - tab2.col1 FROM tab2
----
-20
-48
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 78 + tab2.col1 col0 FROM tab2
----
109
137
95

query I rowsort
SELECT + ( + cor0.col0 ) FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - 85 * 1 + - tab2.col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
-102
-116
-144

onlyif mysql # use DIV operator for integer division
query I rowsort label-1914
SELECT ALL 50 DIV tab0.col0 + - col2 FROM tab0
----
-31
-82
0

skipif mysql # not compatible
query I rowsort label-1914
SELECT ALL 50 / tab0.col0 + - col2 FROM tab0
----
-31
-82
0

query I rowsort
SELECT ALL - - 28 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab1 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 78077727601c056ad0d4f4c11c8daffb

query I rowsort
SELECT DISTINCT ( + col1 ) * tab1.col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL 19 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT ALL - 2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 20c9213316527d507e26425041e08387

query I rowsort
SELECT ALL + 72 + - tab2.col2 * tab2.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 9370856da1952e80dd0346c39bf72543

onlyif mysql # use DIV operator for integer division
query I rowsort label-1921
SELECT col2 DIV + ( - col0 ) AS col2 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-1921
SELECT col2 / + ( - col0 ) AS col2 FROM tab2
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1922
SELECT DISTINCT col0 DIV - col0 + - 69 * - col1 * - ( 54 ) FROM tab1
----
-37261
-48439
-96877

skipif mysql # not compatible
query I rowsort label-1922
SELECT DISTINCT col0 / - col0 + - 69 * - col1 * - ( 54 ) FROM tab1
----
-37261
-48439
-96877

query I rowsort
SELECT DISTINCT col1 + col0 + - 71 FROM tab2
----
-33
25
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 15 col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + 15 * + col2 col1 FROM tab2 AS cor0
----
416
432
608

onlyif mysql # use DIV operator for integer division
query I rowsort label-1926
SELECT - col0 - col2 DIV col1 FROM tab1 AS cor0
----
-5
-69
-87

skipif mysql # not compatible
query I rowsort label-1926
SELECT - col0 - col2 / col1 FROM tab1 AS cor0
----
-5
-69
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT ALL - 86 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 9d2e1e8eda15b3b83dd7136dfc4f19af

query I rowsort
SELECT - col2 * col1 * - col0 AS col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT - cor0.col1 * + 86 FROM tab2 AS cor0
----
-1462
-2666
-5074

query I rowsort
SELECT DISTINCT + col2 * + col1 FROM tab0 AS cor0
----
2838
7462
97

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 ALL 85 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT ( + 70 * - col1 ) AS col1 FROM tab2
----
-1190
-2170
-4130

query I rowsort
SELECT col1 + col2 * col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL - 98 AS col2 FROM tab1
----
-98
-98
-98

query I rowsort
SELECT ALL + col0 + + col1 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL + col2 + - col2 * col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT + - col0 * col1 - 38 AS col1 FROM tab1 AS cor0
----
-1078
-116
-678

query I rowsort
SELECT ALL cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1941
SELECT ALL col2 DIV + col2 AS col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1941
SELECT ALL col2 / + col2 AS col0 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT - 18 + col0 FROM tab0 AS cor0
----
17
6
71

query I rowsort
SELECT ALL - ( col1 ) + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - cor0.col2 * col1 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + + ( + col0 ) * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-1946
SELECT col1 DIV - col1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1946
SELECT col1 / - col1 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1947
SELECT + + col1 DIV cor0.col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1947
SELECT + + col1 / cor0.col0 FROM tab2 cor0
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1948
SELECT col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1948
SELECT col1 / cor0.col1 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT 34 * col0 * col2 AS col0 FROM tab2 cor0
----
102068
6426
68952

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1950
SELECT ALL + CAST( NULL AS SIGNED ) * + col1 * - col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1950
SELECT ALL + CAST ( NULL AS INTEGER ) * + col1 * - col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 13 * 29 AS col1 FROM tab0 AS cor0
----
-377
-377
-377

onlyif mysql # use DIV operator for integer division
query I rowsort label-1952
SELECT ALL 19 DIV cor0.col1 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

skipif mysql # not compatible
query I rowsort label-1952
SELECT ALL 19 / cor0.col1 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1953
SELECT ALL CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1953
SELECT ALL CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col1 AS REAL ) + - col1 * col0 col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT - - col1 * + col2 - + col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL 4 AS col1 FROM tab0 cor0
----
4
4
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1957
SELECT - - ( + col0 ) - + col2 DIV - col1 col2 FROM tab1 AS cor0
----
5
69
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1957
SELECT - - ( + col0 ) - + col2 / - col1 col2 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT DISTINCT - - ( - col1 ) AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + 20 FROM tab1, tab1 cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT DISTINCT col2 * ( col2 ) * + col0 AS col2 FROM tab2
----
114076
5103
52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1961
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-1961
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - - col2 col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 73 + + col2 AS col0 FROM tab2 cor0
----
100
111
99

query I rowsort
SELECT ALL + 91 + col0 FROM tab1 AS cor0
----
155
171
94

query I rowsort
SELECT + ( col1 ) + col2 * - 58 * - col1 AS col2 FROM tab0 AS cor0
----
164690
432887
5723

query I rowsort
SELECT ALL + 91 - col0 FROM tab2 AS cor0
----
12
13
84

query I rowsort
SELECT 47 - + col1 AS col0 FROM tab1 AS cor0
----
21
34
37

query I rowsort
SELECT ALL - col0 * col0 * col2 + - col0 AS col2 FROM tab0 AS cor0
----
-1260
-19032
-649611

query I rowsort
SELECT DISTINCT 85 * - col2 - col1 AS col2 FROM tab0 AS cor0
----
-182
-2891
-7061

query I rowsort
SELECT + ( - col0 * - col1 ) AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 63 FROM tab2
----
63

query I rowsort
SELECT ALL 0 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT col0 * 57 AS col2 FROM tab2 AS cor0
----
399
4446
4503

onlyif mysql # use DIV operator for integer division
query I rowsort label-1974
SELECT - - col2 DIV col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1974
SELECT - - col2 / col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT - - col1 + + ( + 64 ) * col0 FROM tab0 AS cor0
----
1622
2337
5787

query I rowsort
SELECT - col1 + + 29 * - 35 FROM tab0 AS cor0
----
-1101
-1106
-1112

query I rowsort
SELECT 6 + tab0.col0 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to e772ef2029a1a7582a24be1ab4283618

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab0 AS cor0, tab2 AS cor1
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

query I rowsort
SELECT col1 + 65 FROM tab2 AS cor0
----
124
82
96

query I rowsort
SELECT ALL - 23 * col2 AS col0 FROM tab2
----
-598
-621
-874

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1981
SELECT + cor0.col1 * - CAST( + cor0.col1 * col0 + 59 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-14287
-3562
-6990

skipif mysql # not compatible
query I rowsort label-1981
SELECT + cor0.col1 * - CAST ( + cor0.col1 * col0 + 59 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-14287
-3562
-6990

query I rowsort
SELECT col2 * + ( + col0 ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1
----
243 values hashing to 098e223d780e18b6582523fd6f55eec9

query I rowsort
SELECT ALL col0 * - col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL - - 53 FROM tab1 AS cor0
----
53
53
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 33 * + col1 col2 FROM tab2 AS cor0
----
-1023
-1947
-561

query I rowsort
SELECT + col0 + + col1 * col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT - col0 * - 23 * col1 FROM tab0 AS cor0
----
186277
47472
78085

query I rowsort
SELECT ALL + 90 AS col2 FROM tab1 AS cor0
----
90
90
90

query I rowsort
SELECT ALL col0 * col1 + cor0.col1 * + col0 + + 18 FROM tab1 cor0
----
1298
174
2098

query I rowsort
SELECT DISTINCT - - col0 + 93 * col1 AS col1 FROM tab1 AS cor0
----
1289
2421
994

query I rowsort
SELECT DISTINCT col2 + + ( - tab0.col0 * col0 ) FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT ALL col2 + 49 AS col2 FROM tab1
----
103
106
145

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT col0 * tab2.col0 + tab2.col0 + col0 FROM tab2
----
6240
63
6399

query I rowsort
SELECT - tab1.col1 * + 56 FROM tab1
----
-1456
-560
-728

query I rowsort
SELECT - tab2.col2 * cor0.col1 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 3f5ea019223361c8c7a5502ecc1aeefb

query I rowsort
SELECT col2 + + 47 FROM tab1
----
101
104
143

query I rowsort
SELECT tab2.col0 + 83 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to ad5914783859f845ad379e2d910d7e0d

query I rowsort
SELECT DISTINCT + - 82 FROM tab2 AS cor0
----
-82

query I rowsort
SELECT 99 * 12 FROM tab1 AS cor0
----
1188
1188
1188

query I rowsort
SELECT + cor0.col1 * col0 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL + ( col0 ) + col0 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2004
SELECT DISTINCT col1 * - col2 DIV col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2004
SELECT DISTINCT col1 * - col2 / col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + 77 * - col1 AS col2 FROM tab1 AS cor0
----
-1001
-2002
-770

query I rowsort
SELECT ALL col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + 28 * col2 AS col0 FROM tab0 AS cor0
----
2296
28
924

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 19 col0 FROM tab2 cor0
----
19
19
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-2009
SELECT + 96 DIV + col1 col1 FROM tab2 AS cor0
----
1
3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2009
SELECT + 96 / + col1 col1 FROM tab2 AS cor0
----
1
3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 + + 46 - 91 col1 FROM tab1
----
2871
3204
9171

query I rowsort
SELECT + col0 * + col1 + ( + 86 + + col2 ) AS col1 FROM tab2 AS cor0
----
1467
330
4714

query I rowsort
SELECT + 45 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # use DIV operator for integer division
query I rowsort label-2013
SELECT ALL col0 DIV - col2 + col0 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-2013
SELECT ALL col0 / - col2 + col0 FROM tab0
----
0
24
88

query I rowsort
SELECT + col0 - - col1 * col1 * 97 AS col0 FROM tab1 AS cor0
----
16473
65575
9764

onlyif mysql # use DIV operator for integer division
query I rowsort label-2015
SELECT + + ( + col2 ) + 94 DIV 4 FROM tab0 cor0
----
105
24
56

skipif mysql # not compatible
query I rowsort label-2015
SELECT + + ( + col2 ) + 94 / 4 FROM tab0 cor0
----
105
24
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2016
SELECT DISTINCT - col1 + + CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-2016
SELECT DISTINCT - col1 + + CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT 55 AS col1 FROM tab2
----
55

query I rowsort
SELECT ALL - col2 * - 27 * - 6 FROM tab2 AS cor0
----
-4212
-4374
-6156

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2019
SELECT ALL - col0 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2019
SELECT ALL - col0 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + 70 + 45 AS col1 FROM tab2 AS cor0
----
1865
1935
2705

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - cor0.col2 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT col1 - 66 AS col0 FROM tab1
----
-40
-53
-56

query I rowsort
SELECT DISTINCT - col2 - 61 FROM tab2
----
-87
-88
-99

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0, tab1 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + 91 + - col2 FROM tab1 cor0
----
-5
34
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 35 ) col2 FROM tab2 AS cor0
----
-35

query I rowsort
SELECT + 91 AS col2 FROM tab1 AS cor0
----
91
91
91

query I rowsort
SELECT DISTINCT cor0.col1 + col1 * col1 AS col0 FROM tab2 AS cor0
----
306
3540
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2030
SELECT ALL - ( col0 ) * col1 * CAST( - ( - cor0.col0 ) + + col2 AS SIGNED ) FROM tab2 cor0
----
-157131
-478608
-7378

skipif mysql # not compatible
query I rowsort label-2030
SELECT ALL - ( col0 ) * col1 * CAST ( - ( - cor0.col0 ) + + col2 AS INTEGER ) FROM tab2 cor0
----
-157131
-478608
-7378

query I rowsort
SELECT + 96 * + 16 + col2 FROM tab0
----
1537
1569
1618

query I rowsort
SELECT DISTINCT + 62 FROM tab0, tab2 AS cor0
----
62

query I rowsort
SELECT ALL 77 * + col0 AS col2 FROM tab0 AS cor0
----
1848
2695
6853

onlyif mysql # use DIV operator for integer division
query I rowsort label-2034
SELECT + 94 + + col0 * - col1 * + col0 - col2 DIV + col0 AS col0 FROM tab2 AS cor0
----
-106003
-1428
-358862

skipif mysql # not compatible
query I rowsort label-2034
SELECT + 94 + + col0 * - col1 * + col0 - col2 / + col0 AS col0 FROM tab2 AS cor0
----
-106003
-1428
-358862

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2035
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2, tab2 cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-2035
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2, tab2 cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + 52 + + col0 + - 28 AS col2 FROM tab1 AS cor0
----
104
27
88

query I rowsort
SELECT ALL - + cor0.col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT - 34 + tab1.col2 AS col1 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 1ba612ef03e75e945ec278c3aee1a255

query I rowsort
SELECT + cor0.col2 - col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col0 + col0 * - 17 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
-1506
-417
-561

query I rowsort
SELECT + 41 * - col2 + 10 AS col1 FROM tab0 AS cor0
----
-1343
-31
-3352

query I rowsort
SELECT + col0 - + 7 AS col2 FROM tab2
----
0
71
72

query I rowsort
SELECT DISTINCT + col1 - + col1 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2044
SELECT - 63 DIV col2 FROM tab0 AS cor0
----
-1
-63
0

skipif mysql # not compatible
query I rowsort label-2044
SELECT - 63 / col2 FROM tab0 AS cor0
----
-1
-63
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 26 col0 FROM tab0 AS cor0
----
-26

query I rowsort
SELECT col0 * cor0.col1 + 61 FROM tab1 AS cor0
----
1101
139
701

query I rowsort
SELECT + col0 * + 59 * - 76 AS col1 FROM tab2 AS cor0
----
-31388
-349752
-354236

query I rowsort
SELECT DISTINCT col0 + - 62 * 7 AS col1 FROM tab1 AS cor0
----
-354
-370
-431

query I rowsort
SELECT DISTINCT + col2 + + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL col1 * 10 AS col0 FROM tab1 AS cor0
----
100
130
260

query I rowsort
SELECT DISTINCT + + col1 * 65 * + col2 FROM tab2 AS cor0
----
41990
54405
99710

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2052
SELECT - col0 + CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-2052
SELECT - col0 + CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + - col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col0 * - ( ( - cor0.col1 ) ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + col0 + - 1 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT ALL + col0 - + 14 FROM tab2 AS cor0
----
-7
64
65

query I rowsort
SELECT DISTINCT - cor0.col0 * 65 * + col1 + + col1 FROM tab1 AS cor0
----
-41590
-5044
-67587

onlyif mysql # use DIV operator for integer division
query I rowsort label-2058
SELECT ALL - cor0.col1 - + col0 DIV - col0 col2 FROM tab2 AS cor0
----
-16
-30
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2058
SELECT ALL - cor0.col1 - + col0 / - col0 col2 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT ALL cor0.col0 * col0 * + cor0.col0 FROM tab1 cor0
----
262144
27
512000

query I rowsort
SELECT - + col1 * + cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - + 96 + - 85 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-198
-212
-240

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2062
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col2 + col0 / + 11 col1 FROM tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2062
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col2 + col0 / + 11 col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT + 13 + + col2 AS col2 FROM tab0 AS cor0
----
14
46
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - + 23 * col0 col0 FROM tab0 AS cor0
----
-1965
-519
-804

onlyif mysql # use DIV operator for integer division
query I rowsort label-2065
SELECT ALL + - col2 * + cor0.col2 + - cor0.col0 DIV col1 FROM tab1 cor0
----
-2916
-3255
-9222

skipif mysql # not compatible
query I rowsort label-2065
SELECT ALL + - col2 * + cor0.col2 + - cor0.col0 / col1 FROM tab1 cor0
----
-2916
-3255
-9222

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + - col1 * - 40 + + cor0.col2 FROM tab1 AS cor0
----
1094
457
616

query I rowsort
SELECT DISTINCT 19 - col0 AS col2 FROM tab2 AS cor0
----
-59
-60
12

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + 78 AS REAL ) * + col0 FROM tab0 AS cor0
----
-1872
-2730
-6942

query I rowsort
SELECT DISTINCT - + col2 * + 49 FROM tab0 AS cor0
----
-1617
-4018
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 41 ) + - col2 col2 FROM tab0 AS cor0
----
-41
40
8

query I rowsort
SELECT + 64 * + col1 FROM tab2 AS cor0
----
1088
1984
3776

query I rowsort
SELECT DISTINCT 65 FROM tab0, tab0 AS cor0
----
65

query I rowsort
SELECT 54 * cor0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 037126adb74a9ed505b6073f6507d657

onlyif mysql # use DIV operator for integer division
query I rowsort label-2075
SELECT + ( - 79 ) DIV col1 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-2075
SELECT + ( - 79 ) / col1 FROM tab2 AS cor0
----
-1
-2
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab2, tab0 cor0
----
24
35
89

query I rowsort
SELECT - - 62 FROM tab1 cor0
----
62
62
62

query I rowsort
SELECT - col2 * + 68 FROM tab2 AS cor0
----
-1768
-1836
-2584

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL + + 95 AS col1 FROM tab1 cor0
----
95
95
95

query I rowsort
SELECT DISTINCT + - 99 + + 12 * col1 AS col2 FROM tab1 AS cor0
----
21
213
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2082
SELECT - 13 + col0 DIV col0 FROM tab1 AS cor0
----
-12
-12
-12

skipif mysql # not compatible
query I rowsort label-2082
SELECT - 13 + col0 / col0 FROM tab1 AS cor0
----
-12
-12
-12

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
54
57
96

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL ( 92 ) FROM tab2
----
92
92
92

query I rowsort
SELECT DISTINCT + 2 * - col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT DISTINCT + 14 AS col1 FROM tab0, tab1 cor0
----
14

query I rowsort
SELECT 11 AS col1 FROM tab2
----
11
11
11

query I rowsort
SELECT ALL ( + col0 ) + col0 * + col1 FROM tab1 cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 44 * + 4 col2 FROM tab1, tab2, tab0 AS cor0
----
-176

query I rowsort
SELECT 92 AS col1 FROM tab1
----
92
92
92

query I rowsort
SELECT col1 * col2 + + ( + col0 ) FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT - + col2 + + col1 * cor0.col1 * + cor0.col0 FROM tab0 cor0
----
177471
329314
736927

onlyif mysql # use DIV operator for integer division
query I rowsort label-2095
SELECT + - col2 DIV + 64 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2095
SELECT + - col2 / + 64 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT 60 + col0 * + col0 FROM tab2
----
109
6144
6301

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col1 + + 41 col1 FROM tab0
----
7437
8322
9450

query I rowsort
SELECT DISTINCT 20 + - tab0.col0 FROM tab0
----
-15
-4
-69

query I rowsort
SELECT col2 + col2 + tab1.col0 FROM tab1
----
111
178
272

query I rowsort
SELECT + tab1.col1 * + col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT col0 * col1 + - ( col0 ) AS col1 FROM tab2
----
1264
210
4524

query I rowsort
SELECT DISTINCT + ( 49 ) AS col0 FROM tab0, tab1 AS cor0
----
49

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0, tab2 AS cor0
----
1
33
82

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab2, tab2 AS cor1
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT DISTINCT - cor0.col0 + - col1 * col1 * + col1 AS col1 FROM tab2 AS cor0
----
-205457
-29798
-4992

onlyif mysql # use DIV operator for integer division
query I rowsort label-2106
SELECT - cor0.col1 DIV - col2 FROM tab0 cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2106
SELECT - cor0.col1 / - col2 FROM tab0 cor0
----
1
2
97

query I rowsort
SELECT - + col0 * 39 * - col2 + cor0.col1 + - col2 * + col0 FROM tab1 AS cor0
----
138634
291853
6182

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 52 * + col0 col2 FROM tab1 AS cor0
----
189696
399360
8424

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT + cor0.col1 + col2 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2111
SELECT ALL - col0 DIV col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2111
SELECT ALL - col0 / col2 AS col0 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + col2 * - 21 FROM tab2 cor0
----
-546
-567
-798

query I rowsort
SELECT DISTINCT + cor0.col0 + + 55 * cor0.col2 AS col2 FROM tab0 AS cor0
----
1839
4599
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2114
SELECT + - cor0.col2 DIV + 51 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2114
SELECT + - cor0.col2 / + 51 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT 18 + col1 FROM tab1
----
28
31
44

query I rowsort
SELECT col2 - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ( col0 ) + - tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + 67 * + col1 AS col2 FROM tab0
----
5762
6097
6499

query I rowsort
SELECT 76 FROM tab1
----
76
76
76

query I rowsort
SELECT + col2 * 35 * col0 FROM tab0 AS cor0
----
1225
255430
27720

onlyif mysql # use DIV operator for integer division
query I rowsort label-2121
SELECT ALL col1 * 22 + - cor0.col2 DIV cor0.col0 FROM tab0 AS cor0
----
1891
2002
2134

skipif mysql # not compatible
query I rowsort label-2121
SELECT ALL col1 * 22 + - cor0.col2 / cor0.col0 FROM tab0 AS cor0
----
1891
2002
2134

query I rowsort
SELECT ALL col1 + 66 * col1 * col1 FROM tab1 AS cor0
----
11167
44642
6610

onlyif mysql # use DIV operator for integer division
query I rowsort label-2123
SELECT ALL - + col2 DIV - 54 + col0 AS col1 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-2123
SELECT ALL - + col2 / - 54 + col0 AS col1 FROM tab0 AS cor0
----
24
35
90

query I rowsort
SELECT - 70 AS col2 FROM tab2 cor0
----
-70
-70
-70

skipif mysql # not compatible
query I rowsort
SELECT - ( + 1 ) / col1 + + CAST ( col0 * col0 AS REAL ) AS col1 FROM tab0 AS cor0
----
1225
576
7921

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT - + 47 * 47 * col0 AS col1 FROM tab0 AS cor0
----
-196601
-53016
-77315

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2128
SELECT + CAST( + col0 AS SIGNED ) + col1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-2128
SELECT + CAST ( + col0 AS INTEGER ) + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - + col2 * col1 AS col0 FROM tab2 cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 13 col2 FROM tab0 AS cor0
----
-1157
-312
-455

query I rowsort
SELECT + cor0.col0 - col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + col2 * 41 FROM tab1
----
2268
2394
4032

query I rowsort
SELECT - tab1.col0 + ( + col2 ) AS col2 FROM tab1
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + 41 AS col2 FROM tab2 AS cor0
----
41
41
41

query I rowsort
SELECT - - ( - col1 ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - col0 * - col1 + ( col0 ) * col0 FROM tab0 AS cor0
----
16020
2640
4620

query I rowsort
SELECT - + col1 + - col2 AS col0 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL - cor0.col1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT 72 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT ALL + ( + cor0.col0 ) + + ( 61 ) FROM tab0 AS cor0
----
150
85
96

query I rowsort
SELECT ALL + 96 + - col1 + 31 FROM tab2 AS cor0
----
110
68
96

query I rowsort
SELECT DISTINCT - col0 * + col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col2 * col2 + - col0 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT col0 + col1 * col0 + - 25 FROM tab1 AS cor0
----
1095
56
679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 44 col2 FROM tab2 AS cor0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT 22 + - col0 * 62 + 76 * - col1 * - 75 FROM tab1 AS cor0
----
148036
53054
69162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 + col2 col2 FROM tab2 cor0
----
-2
-3
9

query I rowsort
SELECT DISTINCT - col0 * - col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - + 5 AS col2 FROM tab0 AS cor0
----
-5

query I rowsort
SELECT col2 + cor0.col2 * - 58 * - 93 + - col1 FROM tab1 AS cor0
----
291304
307505
517907

query I rowsort
SELECT - 4 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( tab1.col0 ) * col1 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT ( ( - col1 ) * + col0 ) - + col1 FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL 82 AS col0 FROM tab0
----
82
82
82

query I rowsort
SELECT 69 * + col1 FROM tab2
----
1173
2139
4071

query I rowsort
SELECT ALL + + 36 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT + 61 * + col1 AS col0 FROM tab0
----
5246
5551
5917

query I rowsort
SELECT + + 2 * + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 * ( 79 * col0 ) col1 FROM tab2 cor0
----
14958
160238
237196

query I rowsort
SELECT ALL - col1 * col1 + col2 * col2 FROM tab2
----
-232
-2805
1155

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2, tab2 AS cor3
----
3645 values hashing to 9a8c5b685ae97f053cdce34c34044cb4

query I rowsort
SELECT DISTINCT + tab2.col1 * ( - col2 ) AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL - 37 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT - + 26 + cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f1de1184374248cb597a271935b2b003

onlyif mysql # use DIV operator for integer division
query I rowsort label-2167
SELECT + col1 DIV - ( col1 ) - col1 * CAST( 61 AS SIGNED ) AS col1 FROM tab0
----
-5247
-5552
-5918

skipif mysql # not compatible
query I rowsort label-2167
SELECT + col1 / - ( col1 ) - col1 * CAST ( 61 AS INTEGER ) AS col1 FROM tab0
----
-5247
-5552
-5918

query I rowsort
SELECT 70 * + col0 + - tab1.col1 * ( + col1 ) + - col1 AS col0 FROM tab1
----
-492
4370
5418

query I rowsort
SELECT tab1.col2 * tab1.col0 - + tab1.col0 AS col1 FROM tab1
----
159
3584
7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2170
SELECT - CAST( + 59 AS SIGNED ) + + col0 FROM tab0
----
-24
-35
30

skipif mysql # not compatible
query I rowsort label-2170
SELECT - CAST ( + 59 AS INTEGER ) + + col0 FROM tab0
----
-24
-35
30

query I rowsort
SELECT ( + col0 ) * - col2 + + col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT - 93 FROM tab2, tab2 AS cor0
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 46 * + col1 col0 FROM tab1 AS cor0
----
-1196
-460
-598

query I rowsort
SELECT DISTINCT col0 + - col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - 23 + - col1 FROM tab1 AS cor0
----
-33
-36
-49

query I rowsort
SELECT + cor0.col2 - col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - 24 + 36 * + col0 FROM tab1 AS cor0
----
2280
2856
84

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-2179
SELECT CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2179
SELECT CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2180
SELECT + CAST( + col2 AS SIGNED ) DIV col1 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2180
SELECT + CAST ( + col2 AS INTEGER ) / col1 AS col0 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT ALL - - col1 + col2 * + col2 AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT - + col1 * col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 64 col2 FROM tab2 AS cor0
----
-1088
-1984
-3776

onlyif mysql # use DIV operator for integer division
query I rowsort label-2184
SELECT + col2 DIV - col1 AS col0 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2184
SELECT + col2 / - col1 AS col0 FROM tab2 AS cor0
----
-2
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2185
SELECT ALL col2 DIV + 38 col1 FROM tab1
----
1
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2185
SELECT ALL col2 / + 38 col1 FROM tab1
----
1
1
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2186
SELECT CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2186
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 1 AS REAL ) + - col1 AS col1 FROM tab0
----
-87
-92
-98

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 021da207cdc2a046fb0a79bf7cfc38ae

query I rowsort
SELECT - + col1 + col0 * + col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT - - 41 + 19 * col0 AS col1 FROM tab2 AS cor0
----
1523
1542
174

query I rowsort
SELECT + ( col2 ) * col0 FROM tab2 cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( 24 AS REAL ) FROM tab1 AS cor0
----
24
24
24

query I rowsort
SELECT - col0 * - col1 * - col1 AS col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL + col2 * cor0.col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL tab0.col0 * 61 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to b1d38f0915c815b8c08c601794191b1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 6 * col2 + col2 col1 FROM tab1 AS cor0
----
17550
19551
55392

query I rowsort
SELECT ALL + ( - col1 ) + col2 + + 69 FROM tab1 cor0
----
116
152
97

query I rowsort
SELECT DISTINCT - 59 FROM tab2 AS cor0
----
-59

query I rowsort
SELECT + col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - col1 * - 61 AS col0 FROM tab1 AS cor0
----
1586
610
793

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab0 cor1, tab2, tab1 AS cor2
----
3645 values hashing to b2cff03af5bc7306c5e3322cc78563c1

query I rowsort
SELECT DISTINCT + + cor0.col2 + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + 84 FROM tab1, tab2 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT ALL + col2 * - ( col0 ) AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + + tab0.col2 AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - - col2 * + 75 FROM tab2 cor0
----
1950
2025
2850

query I rowsort
SELECT DISTINCT - - col2 + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2209
SELECT + col2 DIV - 24 FROM tab1 AS cor0
----
-2
-2
-4

skipif mysql # not compatible
query I rowsort label-2209
SELECT + col2 / - 24 FROM tab1 AS cor0
----
-2
-2
-4

query I rowsort
SELECT DISTINCT - - col2 * 18 * - 59 FROM tab1 AS cor0
----
-101952
-57348
-60534

query I rowsort
SELECT ALL + - col1 * col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2212
SELECT DISTINCT col1 DIV ( col2 + - col0 ) col1 FROM tab2 AS cor0
----
-1
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2212
SELECT DISTINCT col1 / ( col2 + - col0 ) col1 FROM tab2 AS cor0
----
-1
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2213
SELECT + col0 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-2213
SELECT + col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT + - col2 * - col1 + - ( col2 ) AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT - col0 + - cor0.col0 * col1 FROM tab2 AS cor0
----
-1422
-224
-4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2216
SELECT ALL + cor0.col0 + 6 DIV + col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2216
SELECT ALL + cor0.col0 + 6 / + col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - + col0 + col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT + + col1 + 48 AS col0 FROM tab0 AS cor0
----
134
139
145

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2220
SELECT + + col2 + - col1 * col1 + ( + ( + col1 ) ) * + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2220
SELECT + + col2 + - col1 * col1 + ( + ( + col1 ) ) * + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 2 FROM tab0 AS cor0
----
2

query I rowsort
SELECT - col1 * col2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL cor0.col0 * + cor1.col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to 6c1931f70f198942c9f8243a64f838ff

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col2 ) col0 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL 15 * - col0 FROM tab2
----
-105
-1170
-1185

query I rowsort
SELECT ( 9 ) AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT ALL ( 68 * - cor0.col2 ) + + cor0.col0 AS col0 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 372ee34029c6bd81c16cbbda2eb54067

query I rowsort
SELECT 97 AS col2 FROM tab1 cor0
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 52 col1 FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT ALL - col0 + tab0.col0 * col0 + - col2 AS col2 FROM tab0
----
1189
519
7750

query I rowsort
SELECT 60 + + col2 AS col1 FROM tab1
----
114
117
156

query I rowsort
SELECT - col0 - col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT col2 * - col2 + + 90 FROM tab0 AS cor0
----
-6634
-999
89

query I rowsort
SELECT DISTINCT + ( col0 ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT 68 * + col1 FROM tab1
----
1768
680
884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + tab1.col1 col2 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT - 81 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-81

query I rowsort
SELECT - col0 * - col0 + + col1 * col1 + col2 * col2 AS col1 FROM tab1
----
15785
3601
7445

query I rowsort
SELECT cor0.col2 * cor0.col1 + - 57 * col0 FROM tab1 cor0
----
-3078
-3312
1233

query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col2 * - col2 * - col2 FROM tab1
----
157490
185203
884749

query I rowsort
SELECT ALL - col1 * col1 + col2 AS col1 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT ALL 71 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2244
SELECT ALL col2 * col1 DIV tab0.col1 AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2244
SELECT ALL col2 * col1 / tab0.col1 AS col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2245
SELECT DISTINCT - col0 DIV - tab0.col0 AS col0 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-2245
SELECT DISTINCT - col0 / - tab0.col0 AS col0 FROM tab0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2246
SELECT DISTINCT + col1 DIV col1 AS col1 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-2246
SELECT DISTINCT + col1 / col1 AS col1 FROM tab2
----
1

query I rowsort
SELECT col0 * col2 + - col1 AS col0 FROM tab0
----
-62
706
7207

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL <> - col2
----

query I rowsort
SELECT + tab1.col0 FROM tab1 WHERE NOT ( NULL ) <= NULL
----

query I rowsort
SELECT - col1 * tab0.col2 + col0 * tab0.col1 FROM tab0
----
-774
3298
637

query I rowsort
SELECT - 23 FROM tab0
----
-23
-23
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2252
SELECT col1 DIV col2 + - col0 FROM tab0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-2252
SELECT col1 / col2 + - col0 FROM tab0
----
-22
-88
62

query I rowsort
SELECT + 2 * col2 + 43 * col1 FROM tab1
----
1226
544
751

query I rowsort
SELECT DISTINCT col1 * col2 + + col2 * - col1 + col1 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - col2 + + tab0.col2 AS col1 FROM tab0
----
0

query I rowsort
SELECT tab1.col1 - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT - col1 * - col0 - 4 FROM tab0
----
2060
3391
8095

query I rowsort
SELECT DISTINCT tab1.col0 + tab1.col0 FROM tab1
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2259
SELECT col0 * col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2259
SELECT col0 * col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2260
SELECT + 8 DIV - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2260
SELECT + 8 / - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 - + col0 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2262
SELECT col0 + + col0 DIV - col0 AS col2 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-2262
SELECT col0 + + col0 / - col0 AS col2 FROM tab0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col0 col0 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2264
SELECT col1 DIV col0 + + col2 DIV + col0 AS col1 FROM tab2
----
0
0
7

skipif mysql # not compatible
query I rowsort label-2264
SELECT col1 / col0 + + col2 / + col0 AS col1 FROM tab2
----
0
0
7

query I rowsort
SELECT ALL col2 - + tab0.col1 * - col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 WHERE NOT col0 <= ( NULL )
----

query III rowsort
SELECT * FROM tab2 cor0 WHERE NOT NULL >= - col0 + col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col0 + tab0.col0 * col0 col2 FROM tab0
----
1163
514
7919

query I rowsort
SELECT + col1 * - col0 + col1 * col0 AS col1 FROM tab2
----
0
0
0

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT col2 * + col0 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - col2 * tab1.col0 * - col2 FROM tab1
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + + col1 col2 FROM tab0
----
132
7389
878

query III rowsort
SELECT * FROM tab1 WHERE NOT + col0 + + col2 + + col1 * + col1 >= ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2275
SELECT - col2 DIV - col0 AS col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-2275
SELECT - col2 / - col0 AS col0 FROM tab1
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-2276
SELECT DISTINCT + tab2.col2 DIV + col0 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-2276
SELECT DISTINCT + tab2.col2 / + col0 FROM tab2
----
0
3

query I rowsort
SELECT DISTINCT col0 * col1 + col2 * col0 + col2 AS col2 FROM tab0
----
15479
2889
3431

query I rowsort
SELECT ALL + col2 + - col1 - - col0 FROM tab2
----
100
3
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2279
SELECT col2 DIV + col0 - col2 FROM tab0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-2279
SELECT col2 / + col0 - col2 FROM tab0
----
-1
-32
-82

query I rowsort
SELECT ALL - col0 * tab1.col1 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - col0 FROM tab0 WHERE NOT - col2 + - col0 >= ( col2 )
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + - col1 col0 FROM tab1
----
-1261
-1430
-580

query I rowsort
SELECT ALL - col2 * tab2.col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT col1 * col0 * + col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL tab2.col0 * col2 * - col0 FROM tab2
----
-1323
-158184
-237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 col0 FROM tab1
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2287
SELECT tab1.col0 * col2 DIV col0 - - col1 col2 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2287
SELECT tab1.col0 * col2 / col0 - - col1 col2 FROM tab1
----
109
67
80

query I rowsort
SELECT - tab0.col2 + + col0 * col0 + col0 AS col0 FROM tab0
----
1259
567
7928

query I rowsort
SELECT DISTINCT col1 * + col0 * col2 AS col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL tab2.col1 + + col1 * + col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT col1 * col0 * col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL + col1 / + col2 FROM tab2 WHERE NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL + col0 * + col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col1 * - col2 FROM tab1
----
-1248
-1404
-570

query III rowsort
SELECT ALL * FROM tab1 WHERE ( col0 + col2 ) > ( + col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT + 85 + 95 FROM tab1
----
180

query I rowsort
SELECT DISTINCT 72 FROM tab2, tab0, tab1 cor0
----
72

query I rowsort
SELECT ( - col2 * + col0 ) + col1 AS col2 FROM tab1
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-2299
SELECT col1 DIV - ( col0 ) + 69 AS col0 FROM tab0
----
66
67
68

skipif mysql # not compatible
query I rowsort label-2299
SELECT col1 / - ( col0 ) + 69 AS col0 FROM tab0
----
66
67
68

query I rowsort
SELECT - col2 + 96 + tab1.col1 FROM tab1
----
13
49
68

query I rowsort
SELECT + 0 + col1 * + col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL + - 26 + + 53 * col2 AS col2 FROM tab1 AS cor0
----
2836
2995
5062

query I rowsort
SELECT + - ( + 89 ) FROM tab1 AS cor0
----
-89
-89
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + 38 * cor0.col1 col1 FROM tab0 AS cor0
----
3354
3549
3783

query I rowsort
SELECT DISTINCT - + cor0.col2 + + cor0.col0 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 * + 82 - + col2 col1 FROM tab1 AS cor0
----
7858
7897
7900

onlyif mysql # use DIV operator for integer division
query I rowsort label-2307
SELECT ALL - 17 DIV + 3 + col1 FROM tab1 AS cor0
----
21
5
8

skipif mysql # not compatible
query I rowsort label-2307
SELECT ALL - 17 / + 3 + col1 FROM tab1 AS cor0
----
21
5
8

query I rowsort
SELECT ALL + - col0 * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col2 + col0 * - 33 FROM tab0 AS cor0
----
-1154
-2855
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col2 + col1 * 75 col1 FROM tab1 cor0
----
2112
4398
8655

onlyif mysql # use DIV operator for integer division
query I rowsort label-2311
SELECT ALL - col1 + cor0.col1 * col0 DIV col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2311
SELECT ALL - col1 + cor0.col1 * col0 / col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col1 + col1 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2313
SELECT ALL - col0 + + cor0.col2 - + cor0.col1 DIV - 97 AS col2 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-2313
SELECT ALL - col0 + + cor0.col2 - + cor0.col1 / - 97 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + 53 * col2 + - col0 FROM tab0 cor0
----
1725
18
4257

query I rowsort
SELECT DISTINCT + cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - 92 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-1196
-2392
-920

onlyif mysql # use DIV operator for integer division
query I rowsort label-2317
SELECT ALL - col2 * col0 DIV 11 FROM tab2 AS cor0
----
-17
-184
-272

skipif mysql # not compatible
query I rowsort label-2317
SELECT ALL - col2 * col0 / 11 FROM tab2 AS cor0
----
-17
-184
-272

query I rowsort
SELECT + 96 - col2 FROM tab1 cor0
----
0
39
42

query I rowsort
SELECT ALL + 97 * col0 + + col1 FROM tab2 AS cor0
----
710
7625
7680

query I rowsort
SELECT + - col2 * + col2 + - ( - col2 ) FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT ( cor0.col1 ) + + 63 - - ( + cor0.col1 ) AS col1 FROM tab0 cor0
----
235
245
257

query I rowsort
SELECT 20 FROM tab1, tab2 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT ALL - - col1 + - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * + col1 - - col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - 72 * - col0 + + col1 AS col0 FROM tab1 AS cor0
----
242
4618
5773

query I rowsort
SELECT ALL col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - - col2 * + col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col0 col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + col0 + 25 FROM tab0 AS cor0
----
114
49
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + 98 col0 FROM tab0 AS cor0
----
2352
3430
8722

query I rowsort
SELECT ALL + col1 - 3 FROM tab0 AS cor0
----
83
88
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2333
SELECT DISTINCT - col0 DIV ( cor0.col2 * cor0.col1 ) + 11 FROM tab0 cor0
----
11

skipif mysql # not compatible
query I rowsort label-2333
SELECT DISTINCT - col0 / ( cor0.col2 * cor0.col1 ) + 11 FROM tab0 cor0
----
11

query I rowsort
SELECT DISTINCT + 34 FROM tab1 AS cor0
----
34

query I rowsort
SELECT - tab2.col2 - 69 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 775469cf60ebe55e8a5307a19801bd80

query I rowsort
SELECT col2 * 60 FROM tab0 AS cor0
----
1980
4920
60

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - + col1 * col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + cor0.col2 + - col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2340
SELECT - 83 DIV col0 col0 FROM tab2 AS cor0
----
-1
-1
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2340
SELECT - 83 / col0 col0 FROM tab2 AS cor0
----
-1
-1
-11

query I rowsort
SELECT 40 * col0 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT + 42 * cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6dc014e0cf461f20a770606348d46229

onlyif mysql # use DIV operator for integer division
query I rowsort label-2343
SELECT ALL - cor0.col0 * cor0.col0 DIV + col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2343
SELECT ALL - cor0.col0 * cor0.col0 / + col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 + col0 * col1 AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL - + col2 + - cor0.col1 AS col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT ALL 72 FROM tab0 AS cor0
----
72
72
72

query I rowsort
SELECT ALL 25 * + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-115050
-33575
-5425

query I rowsort
SELECT - + col0 + col1 * 18 FROM tab0 AS cor0
----
1524
1549
1711

query I rowsort
SELECT ALL - col1 + col0 * col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - 95 AS col1 FROM tab0
----
-95
-95
-95

query I rowsort
SELECT DISTINCT - col1 + col1 * col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + col2 - col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - 76 FROM tab1
----
-76

query I rowsort
SELECT 68 * col2 + + col0 FROM tab0
----
103
2268
5665

query I rowsort
SELECT DISTINCT - 61 * col1 * + col0 FROM tab2 AS cor0
----
-13237
-280722
-81923

query I rowsort
SELECT ALL col1 - col0 FROM tab2
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2357
SELECT - col0 - + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2357
SELECT - col0 - + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2358
SELECT DISTINCT col0 - + CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2358
SELECT DISTINCT col0 - + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 cor2
----
972 values hashing to 2507aa9f48c3db94de9fec065edf3731

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to 0be13143d898cc667fe1a2dd93b34703

query I rowsort
SELECT ALL + - 27 * - 56 AS col2 FROM tab2 AS cor0
----
1512
1512
1512

query I rowsort
SELECT - - 86 * col2 AS col0 FROM tab1 AS cor0
----
4644
4902
8256

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2363
SELECT CAST( NULL AS SIGNED ) * col0 + + cor0.col2 + + ( + cor0.col0 ) * col2 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2363
SELECT CAST ( NULL AS INTEGER ) * col0 + + cor0.col2 + + ( + cor0.col0 ) * col2 AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - ( 83 ) AS col2 FROM tab2
----
-1411
-2573
-4897

query I rowsort
SELECT - col1 * + 96 * - 8 FROM tab1
----
19968
7680
9984

onlyif mysql # use DIV operator for integer division
query I rowsort label-2366
SELECT ALL col2 + col1 - + 85 DIV col1 FROM tab1
----
103
59
77

skipif mysql # not compatible
query I rowsort label-2366
SELECT ALL col2 + col1 - + 85 / col1 FROM tab1
----
103
59
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2367
SELECT DISTINCT - 78 + + col2 + + col2 DIV - ( col0 ) AS col1 FROM tab1
----
-21
-42
17

skipif mysql # not compatible
query I rowsort label-2367
SELECT DISTINCT - 78 + + col2 + + col2 / - ( col0 ) AS col1 FROM tab1
----
-21
-42
17

query I rowsort
SELECT ALL + col1 + col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT 30 + col1 + col2 AS col1 FROM tab2
----
115
85
88

query I rowsort
SELECT col0 + 5 FROM tab2
----
12
83
84

query I rowsort
SELECT DISTINCT 26 + tab0.col2 FROM tab0
----
108
27
59

query I rowsort
SELECT ( col2 + tab0.col2 ) * col0 FROM tab0
----
14596
1584
70

query I rowsort
SELECT DISTINCT 18 + col1 + col0 * - col2 AS col2 FROM tab1
----
-118
-3620
-7649

query I rowsort
SELECT - 55 * - 24 - + col1 FROM tab0 AS cor0
----
1223
1229
1234

query I rowsort
SELECT ALL - + col0 * - 74 FROM tab0 cor0
----
1776
2590
6586

query I rowsort
SELECT ALL col2 * 28 FROM tab2 AS cor0
----
1064
728
756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2377
SELECT ALL - CAST( NULL AS SIGNED ) * tab2.col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2377
SELECT ALL - CAST ( NULL AS INTEGER ) * tab2.col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * ( 81 ) * cor0.col2 + + 94 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 95baeeb96787fd22200bf3008e41be1e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 19 col1 FROM tab2 AS cor0
----
-19
-19
-19

query I rowsort
SELECT ALL - col0 * 12 + - tab0.col1 * col1 AS col0 FROM tab0
----
-7684
-9349
-9829

query I rowsort
SELECT DISTINCT - ( - col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + ( + 48 ) AS col1 FROM tab1 AS cor0
----
48
48
48

query I rowsort
SELECT ALL - - 61 * ( + col0 ) + col1 FROM tab1 AS cor0
----
209
3914
4893

onlyif mysql # use DIV operator for integer division
query I rowsort label-2384
SELECT ALL col1 * col2 DIV + ( col2 ) AS col0 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2384
SELECT ALL col1 * col2 / + ( col2 ) AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - 0 * - col0 + col1 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - - col1 + col2 * ( + col1 ) AS col0 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2387
SELECT DISTINCT col1 DIV + tab2.col1 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-2387
SELECT DISTINCT col1 / + tab2.col1 FROM tab2
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2388
SELECT ALL - CAST( NULL AS SIGNED ) - 16 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2388
SELECT ALL - CAST ( NULL AS INTEGER ) - 16 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + - 89 * col2 + col0 * col1 AS col1 FROM tab2 cor0
----
-2039
-2186
2288

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2391
SELECT ALL - col2 * CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-2391
SELECT ALL - col2 * CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - cor1.col2 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2393
SELECT DISTINCT - + col1 + ( 32 ) * - col2 * - CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2393
SELECT DISTINCT - + col1 + ( 32 ) * - col2 * - CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - 3 * + 64 + - col2 FROM tab0 AS cor0
----
-193
-225
-274

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) + + col0 * 67 col2 FROM tab1 AS cor0
----
227
4298
5373

query I rowsort
SELECT + ( - 30 ) * cor0.col2 FROM tab0 AS cor0
----
-2460
-30
-990

query I rowsort
SELECT 2 AS col2 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT + col2 + + 69 * col2 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT ALL - 93 FROM tab0 AS cor0
----
-93
-93
-93

query I rowsort
SELECT - 27 * + col1 - col2 AS col2 FROM tab1 AS cor0
----
-327
-447
-756

query I rowsort
SELECT DISTINCT ( col0 ) + - col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL + col1 + - 94 FROM tab0 AS cor0
----
-3
-8
3

query I rowsort
SELECT + ( 34 ) - col2 FROM tab1 cor0
----
-20
-23
-62

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0, tab2, tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT - ( col2 ) * cor0.col2 AS col0 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT + ( ( cor0.col1 ) ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + 23 AS col0 FROM tab1 AS cor0
----
23
23
23

query I rowsort
SELECT + - col0 * col1 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col2 * - ( col2 ) AS col0 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL col2 * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + + cor0.col2 + + ( col2 ) * cor0.col0 AS col0 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT col2 * + col1 * col1 AS col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT ALL - col2 * 17 AS col0 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT ALL - col2 * col2 AS col1 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT + cor0.col1 AS 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 + col0 * + col0 col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL + ( + col0 ) - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2418
SELECT - col1 * + 99 + col2 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
-8513
-9009
-9603

skipif mysql # not compatible
query I rowsort label-2418
SELECT - col1 * + 99 + col2 / cor0.col0 AS col0 FROM tab0 AS cor0
----
-8513
-9009
-9603

query I rowsort
SELECT ALL - col0 * 92 FROM tab2
----
-644
-7176
-7268

query I rowsort
SELECT - col0 * + col0 - ( + col0 ) AS col2 FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT - cor0.col2 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

onlyif mysql # use DIV operator for integer division
query I rowsort label-2422
SELECT DISTINCT - col2 DIV col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2422
SELECT DISTINCT - col2 / col0 FROM tab0
----
-1
0

query I rowsort
SELECT ALL + col2 - + ( + col1 ) * + col1 AS col0 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL cor0.col1 + col2 + - ( + col1 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + 89 AS col1 FROM tab0 AS cor0
----
89

query I rowsort
SELECT DISTINCT 34 * - tab0.col1 FROM tab0
----
-2924
-3094
-3298

query I rowsort
SELECT DISTINCT ( col1 ) * col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT 68 + + col0 + col0 AS col0 FROM tab0
----
116
138
246

query I rowsort
SELECT ALL - tab0.col2 * - col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT 7 * col0 AS col1 FROM tab1
----
21
448
560

query I rowsort
SELECT 20 * col0 FROM tab1 cor0
----
1280
1600
60

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 - tab2.col1 col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT + col1 + + col0 * col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - - col0 * cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - 46 * + col1 AS col1 FROM tab1 AS cor0
----
-1196
-460
-598

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 61 + cor0.col2 * + 98 AS col0 FROM tab0 AS cor0
----
3173
37
7975

query I rowsort
SELECT + col1 - col1 AS col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + tab2.col0 * - ( col2 ) col0 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT cor0.col0 + - cor0.col2 * - 10 FROM tab2 AS cor0
----
277
338
459

query I rowsort
SELECT ALL + + col2 + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - cor0.col1 * - ( - 50 ) * + col1 FROM tab1 AS cor0
----
-33800
-5000
-8450

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2444
SELECT DISTINCT - - col1 / + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2444
SELECT DISTINCT - - col1 / + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col2 + 1 * col2 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2446
SELECT DISTINCT + col0 + col0 DIV - col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2446
SELECT DISTINCT + col0 + col0 / - col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to a5677c50b23f70287df35c2388a1c9bf

query I rowsort
SELECT DISTINCT - col0 * - 50 * 26 AS col1 FROM tab2 AS cor0
----
101400
102700
9100

query I rowsort
SELECT DISTINCT + - col2 + + ( col0 ) * cor0.col1 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2450
SELECT DISTINCT - + col2 * + CAST( NULL AS SIGNED ) + + col1 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2450
SELECT DISTINCT - + col2 * + CAST ( NULL AS INTEGER ) + + col1 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + col1 * + 40 * + col2 FROM tab1 AS cor0
----
22800
49920
56160

query I rowsort
SELECT + + col2 + - 10 * col1 AS col1 FROM tab1 AS cor0
----
-206
-34
-43

query I rowsort
SELECT ALL - cor0.col0 * + col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + col1 * + 94 AS col1 FROM tab1 AS cor0
----
1222
2444
940

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - ( col1 * - col1 ) col1 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT 56 + - col0 FROM tab0 AS cor0
----
-33
21
32

query I rowsort
SELECT ALL + tab0.col2 + col1 AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL 86 FROM tab0 AS cor0
----
86
86
86

query I rowsort
SELECT ALL - col0 * - col2 + col2 + - col2 * + 61 FROM tab0 AS cor0
----
-1188
-25
2378

query I rowsort
SELECT ALL - 8 * 83 + col2 + col1 FROM tab2 AS cor0
----
-579
-606
-609

onlyif mysql # use DIV operator for integer division
query I rowsort label-2461
SELECT DISTINCT + + 85 DIV - 1 + col2 * + col2 - 21 FROM tab2 AS cor0
----
1338
570
623

skipif mysql # not compatible
query I rowsort label-2461
SELECT DISTINCT + + 85 / - 1 + col2 * + col2 - 21 FROM tab2 AS cor0
----
1338
570
623

query I rowsort
SELECT DISTINCT - 46 FROM tab1 AS cor0
----
-46

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - ( col0 ) AS REAL ) + - 97 * col0 AS col1 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) - + col1 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT - col0 + col1 * col0 * + col2 AS col2 FROM tab1 AS cor0
----
36416
4209
99760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2466
SELECT ( + col2 ) DIV col1 + col2 AS col0 FROM tab2 cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-2466
SELECT ( + col2 ) / col1 + col2 AS col0 FROM tab2 cor0
----
26
27
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2467
SELECT DISTINCT + col2 + - col0 DIV - col1 col2 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2467
SELECT DISTINCT + col2 + - col0 / - col1 col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - 96 + 73 * - col0 + - col2 * - cor0.col2 FROM tab2 AS cor0
----
-4419
-5114
122

query I rowsort
SELECT - col0 * + ( - col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + 51 + + cor0.col0 * - col1 * + ( cor0.col1 ) FROM tab0 AS cor0
----
-177453
-329264
-736958

query I rowsort
SELECT ALL + col1 + + col0 * col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT + - ( + col0 ) FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + col0 col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - cor0.col0 - cor0.col1 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2475
SELECT ALL - - ( - col1 ) * CAST( NULL AS SIGNED ) - 61 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2475
SELECT ALL - - ( - col1 ) * CAST ( NULL AS INTEGER ) - 61 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab0 AS cor1, tab0 cor2
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT DISTINCT - - col0 - col0 * - 57 FROM tab1 AS cor0
----
174
3712
4640

query I rowsort
SELECT + - 39 * - col0 FROM tab1 AS cor0
----
117
2496
3120

query I rowsort
SELECT DISTINCT - cor0.col1 + + col0 * 97 AS col1 FROM tab2 AS cor0
----
648
7507
7646

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2480
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2480
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - - col2 + cor0.col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + + col0 - col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + 2 FROM tab1, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT DISTINCT + col1 + + 44 FROM tab0
----
130
135
141

query I rowsort
SELECT tab1.col2 * 56 FROM tab1
----
3024
3192
5376

query I rowsort
SELECT DISTINCT tab2.col2 + ( - col2 * + col2 ) + col2 FROM tab2
----
-1368
-624
-675

query I rowsort
SELECT DISTINCT - col1 * - col0 + col1 FROM tab0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-2488
SELECT col2 + - 71 DIV + tab2.col1 AS col1 FROM tab2
----
25
25
34

skipif mysql # not compatible
query I rowsort label-2488
SELECT col2 + - 71 / + tab2.col1 AS col1 FROM tab2
----
25
25
34

query I rowsort
SELECT + + col1 + 75 FROM tab2 cor0
----
106
134
92

query I rowsort
SELECT DISTINCT + - col2 * + ( 91 ) FROM tab2 AS cor0
----
-2366
-2457
-3458

query I rowsort
SELECT + 49 * 90 FROM tab0, tab2 AS cor0
----
9 values hashing to 4f84c156997933b36e7570a0242d8d1d

query I rowsort
SELECT ALL - + col2 + col0 * + 56 + col1 AS col0 FROM tab2 AS cor0
----
396
4401
4403

query I rowsort
SELECT ALL + col0 * + 67 FROM tab2 AS cor0
----
469
5226
5293

query I rowsort
SELECT ALL + 4 * col2 FROM tab2 cor0
----
104
108
152

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2495
SELECT DISTINCT + CAST( ( + col1 ) AS SIGNED ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2495
SELECT DISTINCT + CAST ( ( + col1 ) AS INTEGER ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2496
SELECT - CAST( col2 AS SIGNED ) * col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-2496
SELECT - CAST ( col2 AS INTEGER ) * col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - ( 99 ) FROM tab2 cor0
----
-99
-99
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2498
SELECT ALL CAST( - col2 AS SIGNED ) + col1 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-2498
SELECT ALL CAST ( - col2 AS INTEGER ) + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + ( col1 ) * col2 + col2 * + cor0.col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
114722
54262
5940

query I rowsort
SELECT ALL - ( + ( col1 ) ) * col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT 57 + col2 AS col2 FROM tab1 cor0
----
111
114
153

query I rowsort
SELECT - 61 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2503
SELECT + CAST( + 80 AS SIGNED ) FROM tab1 AS cor0
----
80
80
80

skipif mysql # not compatible
query I rowsort label-2503
SELECT + CAST ( + 80 AS INTEGER ) FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT - 61 + col0 FROM tab1 AS cor0
----
-58
19
3

query I rowsort
SELECT ALL col1 * + cor0.col2 + ( - 91 ) FROM tab1 AS cor0
----
1157
1313
479

query I rowsort
SELECT ALL - + 54 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
1296
1890
4806

query I rowsort
SELECT - + 67 AS col0 FROM tab2 AS cor0
----
-67
-67
-67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2508
SELECT DISTINCT + cor0.col0 DIV col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-2508
SELECT DISTINCT + cor0.col0 / col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT + - cor0.col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - + col0 * cor0.col2 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + col1 - + cor0.col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * col1 + CAST ( - col0 + cor0.col0 AS REAL ) AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT cor0.col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL 60 FROM tab2 AS cor0
----
60
60
60

query I rowsort
SELECT DISTINCT - 45 * + col2 + + cor0.col2 * ( col2 ) FROM tab0 AS cor0
----
-396
-44
3034

query I rowsort
SELECT ALL 30 + + col0 * + col1 AS col2 FROM tab1 AS cor0
----
1070
108
670

query I rowsort
SELECT ALL - - col0 + + col2 * col2 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT - 41 AS col1 FROM tab2 AS cor0
----
-41
-41
-41

query I rowsort
SELECT ALL + - col0 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2520
SELECT - col0 DIV - 92 + - 19 DIV + col1 AS col1 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2520
SELECT - col0 / - 92 + - 19 / + col1 AS col1 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1, tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + cor0.col1 * - col0 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + col0 * 58 FROM tab0 AS cor0
----
-1392
-2030
-5162

query I rowsort
SELECT - - col1 + + col0 * 71 FROM tab1 AS cor0
----
239
4554
5693

query I rowsort
SELECT col2 * ( cor0.col1 ) FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT col0 * - ( col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + col0 + - 71 * - col1 AS col0 FROM tab0 cor0
----
6130
6550
6922

query I rowsort
SELECT + 16 FROM tab2, tab0 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 68 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

onlyif mysql # use DIV operator for integer division
query I rowsort label-2530
SELECT DISTINCT - col0 DIV col1 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-2530
SELECT DISTINCT - col0 / col1 FROM tab0 cor0
----
0

query I rowsort
SELECT - col2 * col2 + col0 FROM tab2 AS cor0
----
-1365
-598
-722

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 cor1, tab1 AS cor2
----
972 values hashing to 82e15d5967b272804e574774895a0222

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT col2 DIV tab1.col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-2533
SELECT col2 / tab1.col0 FROM tab1
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-2534
SELECT DISTINCT - tab2.col2 DIV + col0 - tab2.col0 AS col0 FROM tab2
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-2534
SELECT DISTINCT - tab2.col2 / + col0 - tab2.col0 AS col0 FROM tab2
----
-10
-78
-79

query I rowsort
SELECT + col0 * - 69 + + cor0.col1 FROM tab1 cor0
----
-181
-4406
-5507

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - 30 + col0 FROM tab0 AS cor0
----
-6
5
59

query I rowsort
SELECT - col2 * - col0 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT 80 FROM tab2
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 * - col2 col0 FROM tab0 AS cor0
----
-3267
-8118
-99

query I rowsort
SELECT + + col0 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2542
SELECT ( - col0 ) * col1 DIV col0 + col0 AS col0 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-2542
SELECT ( - col0 ) * col1 / col0 + col0 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + 94 * - 0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2544
SELECT DISTINCT - ( + col2 ) + + col2 * CAST( NULL AS SIGNED ) * - col0 col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2544
SELECT DISTINCT - ( + col2 ) + + col2 * CAST ( NULL AS INTEGER ) * - col0 col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( - col1 ) * col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col0 + 68 AS col1 FROM tab1 AS cor0
----
132
148
71

query I rowsort
SELECT DISTINCT - 46 * 24 + - col2 * + col0 AS col1 FROM tab1 AS cor0
----
-1266
-4752
-8784

query I rowsort
SELECT + - 63 AS col0 FROM tab2 AS cor0
----
-63
-63
-63

query I rowsort
SELECT ALL + 93 AS col1 FROM tab0 AS cor0
----
93
93
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 46 + + col0 * col0 col2 FROM tab1 AS cor0
----
-37
4050
6354

onlyif mysql # use DIV operator for integer division
query I rowsort label-2551
SELECT col1 DIV col0 + 13 - - cor0.col1 col2 FROM tab0 cor0
----
102
105
112

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2551
SELECT col1 / col0 + 13 - - cor0.col1 col2 FROM tab0 cor0
----
102
105
112

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col0 + ( col2 ) FROM tab2 cor0
----
100
3
45

query I rowsort
SELECT ALL + + col2 + + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL 87 AS col1 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT ALL 52 FROM tab1, tab0 cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT DISTINCT + cor0.col1 - - cor0.col2 * col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + + 49 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1274
-1323
-1862

query I rowsort
SELECT DISTINCT - 41 AS col2 FROM tab2 cor0
----
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 + cor0.col1 * - col0 + col2 col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + 0 AS col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT col2 + 29 * - col2 FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT col0 * - col2 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + + cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 - cor0.col0 col1 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2565
SELECT ALL + - ( col2 ) + col2 * + cor0.col0 DIV col0 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2565
SELECT ALL + - ( col2 ) + col2 * + cor0.col0 / col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 53 FROM tab1 AS cor0
----
-53

query I rowsort
SELECT DISTINCT - col0 + 71 FROM tab1 AS cor0
----
-9
68
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( col1 ) col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col0 + 37 FROM tab1
----
101
117
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col1 + col2 col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL - tab1.col1 + + tab1.col2 AS col2 FROM tab1
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2572
SELECT - col1 DIV + 86 + - col0 * col0 AS col0 FROM tab0
----
-1226
-577
-7922

skipif mysql # not compatible
query I rowsort label-2572
SELECT - col1 / + 86 + - col0 * col0 AS col0 FROM tab0
----
-1226
-577
-7922

query I rowsort
SELECT + col0 * 98 * col1 + - tab1.col0 AS col0 FROM tab1
----
101840
62656
7641

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - tab1.col0 col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT col1 + col2 * 58 * col2 FROM tab0
----
155
390083
63248

query I rowsort
SELECT cor0.col1 * cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 9708a433b981d9b5fd095bfe2ea45aea

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2, tab1 cor2
----
3645 values hashing to 35707ade138fec4b370f5140a4cd2963

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 + - 55 * - col0 col2 FROM tab0 AS cor0
----
1289
1894
4864

query I rowsort
SELECT - 12 * - ( - col2 ) AS col2 FROM tab1 AS cor0
----
-1152
-648
-684

query I rowsort
SELECT ALL - + 98 FROM tab1 AS cor0
----
-98
-98
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2581
SELECT - + ( - col2 ) * + col2 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2581
SELECT - + ( - col2 ) * + col2 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT 43 AS col2 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT - - ( col2 ) + - col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 27 FROM tab2 AS cor0
----
27

query I rowsort
SELECT - ( 15 ) * - col1 * 97 + col2 FROM tab0
----
125163
132487
141136

query I rowsort
SELECT ALL + ( tab0.col1 + + col1 ) * 95 AS col0 FROM tab0
----
16340
17290
18430

query I rowsort
SELECT + tab0.col0 * + col2 + - col1 FROM tab0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-2589
SELECT DISTINCT + col0 + col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-2589
SELECT DISTINCT + col0 + col0 / + col2 AS col0 FROM tab0 AS cor0
----
24
70
90

query I rowsort
SELECT ALL + - 78 * col1 + + col1 * ( col2 ) * - col1 FROM tab0 cor0
----
-16975
-250776
-686140

query I rowsort
SELECT 85 + - cor0.col1 * - cor0.col1 * - col2 FROM tab2 AS cor0
----
-10897
-25862
-90421

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT DISTINCT - 18 + + col1 * + col1 * - col1 FROM tab1 AS cor0
----
-1018
-17594
-2215

onlyif mysql # use DIV operator for integer division
query I rowsort label-2594
SELECT ALL - col1 DIV col0 + col1 AS col1 FROM tab0 AS cor0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-2594
SELECT ALL - col1 / col0 + col1 AS col1 FROM tab0 AS cor0
----
83
90
95

query I rowsort
SELECT ALL 80 - col1 AS col0 FROM tab2
----
21
49
63

query I rowsort
SELECT ALL + col2 * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col1 * + 65 + + 97 - - col2 * col1 FROM tab2 AS cor0
----
-1081
-2204
-362

query I rowsort
SELECT ALL + col2 * + col2 AS col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + 62 + + col1 AS col2 FROM tab2
----
121
79
93

query I rowsort
SELECT + - 27 - cor0.col1 FROM tab0 AS cor0
----
-113
-118
-124

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2601
SELECT ALL + 11 * + col0 - CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2601
SELECT ALL + 11 * + col0 - CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2602
SELECT ALL 31 DIV + col0 - - tab2.col0 AS col1 FROM tab2
----
11
78
79

skipif mysql # not compatible
query I rowsort label-2602
SELECT ALL 31 / + col0 - - tab2.col0 AS col1 FROM tab2
----
11
78
79

query I rowsort
SELECT ALL col0 * col1 - + 81 FROM tab2
----
1262
136
4521

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab2.col1 * - 12 + + col0 - tab2.col1 col0 FROM tab2
----
-11556
-3406
-41753

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 93 col2 FROM tab2 AS cor0
----
2418
2511
3534

query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - - col1 * - ( + col0 + - cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-3068
-697
620

onlyif mysql # use DIV operator for integer division
query I rowsort label-2608
SELECT - col2 DIV - col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2608
SELECT - col2 / - col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT - + col2 + col2 + 68 * col0 FROM tab0 AS cor0
----
1632
2380
6052

query I rowsort
SELECT ALL + - col0 + + col0 * - cor0.col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT col1 * 40 + col2 + - col2 * ( + col1 ) * col0 AS col0 FROM tab1 AS cor0
----
-3118
-36023
-99224

onlyif mysql # use DIV operator for integer division
query I rowsort label-2612
SELECT + + col2 + - 71 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
-1
31
82

skipif mysql # not compatible
query I rowsort label-2612
SELECT + + col2 + - 71 / cor0.col0 AS col2 FROM tab0 AS cor0
----
-1
31
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 30 + col1 col1 FROM tab0 AS cor0
----
1076
127
2551

query I rowsort
SELECT DISTINCT + - col0 * + 81 FROM tab0 AS cor0
----
-1944
-2835
-7209

query I rowsort
SELECT cor0.col0 * cor0.col2 + + 34 FROM tab2 AS cor0
----
2062
223
3036

query I rowsort
SELECT - - col2 * 29 AS col0 FROM tab2 cor0
----
1102
754
783

query I rowsort
SELECT col1 + ( + cor0.col0 ) AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT col2 * ( 48 ) + - col2 * - ( cor0.col0 ) FROM tab0 AS cor0
----
11234
2376
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 48 FROM tab1
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 * + col1 + - col0 col1 FROM tab1 AS cor0
----
-1511
-644
-834

query I rowsort
SELECT col0 + - col0 + - col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL tab1.col0 * - col2 + - col2 * col0 - col2 AS col2 FROM tab1
----
-15456
-378
-7353

query I rowsort
SELECT + tab2.col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + 72 FROM tab2
----
72
72
72

query I rowsort
SELECT DISTINCT + ( - 77 ) AS col1 FROM tab2 AS cor0
----
-77

query I rowsort
SELECT - 79 AS col0 FROM tab1 AS cor0
----
-79
-79
-79

query I rowsort
SELECT col0 + col0 * col0 * - tab2.col1 FROM tab2
----
-106018
-1512
-358878

query I rowsort
SELECT DISTINCT + ( 53 + tab1.col0 ) AS col2 FROM tab1
----
117
133
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-2631
SELECT DISTINCT ( + col2 ) DIV + col2 AS col1 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-2631
SELECT DISTINCT ( + col2 ) / + col2 AS col1 FROM tab0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 48 col2 FROM tab2
----
-48
-48
-48

query I rowsort
SELECT ALL tab1.col0 AS col2 FROM tab1, tab2 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT ALL 18 + col2 * + col0 FROM tab2 AS cor0
----
2046
207
3020

query I rowsort
SELECT ALL 46 * col2 AS col1 FROM tab0 AS cor0
----
1518
3772
46

query I rowsort
SELECT - 22 AS col1 FROM tab2 AS cor0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT - ( tab0.col2 ) * + col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
17
31
59

query I rowsort
SELECT cor0.col2 - - col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - 48 - - col2 FROM tab2 AS cor0
----
-10
-21
-22

query I rowsort
SELECT ALL cor0.col2 + col1 + col0 * - col0 FROM tab0 AS cor0
----
-1127
-457
-7748

query I rowsort
SELECT DISTINCT - + col2 * col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + ( col0 ) + + col2 * col0 AS col2 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT 28 - + cor0.col1 * col0 FROM tab0 cor0
----
-2036
-3367
-8071

query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 39 FROM tab1, tab0 AS cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT + col1 + 99 * - col0 AS col1 FROM tab2
----
-662
-7663
-7804

onlyif mysql # use DIV operator for integer division
query I rowsort label-2648
SELECT DISTINCT - col0 + + col0 * - 40 + col2 DIV + cor0.col2 AS col1 FROM tab0 cor0
----
-1434
-3648
-983

skipif mysql # not compatible
query I rowsort label-2648
SELECT DISTINCT - col0 + + col0 * - 40 + col2 / + cor0.col2 AS col1 FROM tab0 cor0
----
-1434
-3648
-983

onlyif mysql # use DIV operator for integer division
query I rowsort label-2649
SELECT DISTINCT col1 + - col2 * cor0.col1 DIV col0 AS col2 FROM tab1 AS cor0
----
-2
-442
2

skipif mysql # not compatible
query I rowsort label-2649
SELECT DISTINCT col1 + - col2 * cor0.col1 / col0 AS col2 FROM tab1 AS cor0
----
-2
-442
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + - col1 col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT col0 * + 1 + 93 FROM tab2 AS cor0
----
100
171
172

onlyif mysql # use DIV operator for integer division
query I rowsort label-2652
SELECT ALL - + col2 * col2 + col0 DIV + col2 FROM tab1 AS cor0
----
-2916
-3248
-9216

skipif mysql # not compatible
query I rowsort label-2652
SELECT ALL - + col2 * col2 + col0 / + col2 FROM tab1 AS cor0
----
-2916
-3248
-9216

query I rowsort
SELECT + col0 + 90 * col0 AS col1 FROM tab1 AS cor0
----
273
5824
7280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2654
SELECT DISTINCT + col2 * CAST( + 94 AS SIGNED ) + col0 FROM tab2 AS cor0
----
2522
2545
3651

skipif mysql # not compatible
query I rowsort label-2654
SELECT DISTINCT + col2 * CAST ( + 94 AS INTEGER ) + col0 FROM tab2 AS cor0
----
2522
2545
3651

onlyif mysql # use DIV operator for integer division
query I rowsort label-2655
SELECT DISTINCT - col2 DIV - col2 + - col0 * - col1 - - col2 FROM tab1 AS cor0
----
1137
133
698

skipif mysql # not compatible
query I rowsort label-2655
SELECT DISTINCT - col2 / - col2 + - col0 * - col1 - - col2 FROM tab1 AS cor0
----
1137
133
698

query I rowsort
SELECT - cor0.col2 * col1 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2657
SELECT ALL - + col2 + CAST( 97 + - col2 AS SIGNED ) AS col1 FROM tab1 cor0
----
-11
-17
-95

skipif mysql # not compatible
query I rowsort label-2657
SELECT ALL - + col2 + CAST ( 97 + - col2 AS INTEGER ) AS col1 FROM tab1 cor0
----
-11
-17
-95

query I rowsort
SELECT + col2 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + 3 + col2 FROM tab2 AS cor0
----
29
30
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-2661
SELECT DISTINCT - + col0 DIV 60 + - col2 - col1 * + col0 FROM tab1 AS cor0
----
-1137
-132
-698

skipif mysql # not compatible
query I rowsort label-2661
SELECT DISTINCT - + col0 / 60 + - col2 - col1 * + col0 FROM tab1 AS cor0
----
-1137
-132
-698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * col0 + - col1 * - col1 * - col1 col1 FROM tab0 AS cor0
----
-636848
-760869
-912708

query I rowsort
SELECT ALL - ( - col0 ) * - col2 * cor0.col2 + col1 * - cor0.col2 + col0 * cor0.col0 FROM tab2 AS cor0
----
-108481
-48178
-5891

query I rowsort
SELECT - 59 FROM tab1 cor0
----
-59
-59
-59

query I rowsort
SELECT DISTINCT + cor0.col2 + + 54 AS col0 FROM tab2 AS cor0
----
80
81
92

query I rowsort
SELECT ALL + - col0 + col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 52c9380a39df7a744b9f2f2c5bf55dd5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col1 col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT col0 + ( - col2 ) FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-2671
SELECT + col2 DIV 63 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2671
SELECT + col2 / 63 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT col1 * col2 * + col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT col2 * col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query III rowsort
SELECT * FROM tab2 WHERE + col0 IN ( + col1 )
----

query I rowsort
SELECT + cor0.col1 + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-2677
SELECT col0 DIV + col1 + - col1 col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2677
SELECT col0 / + col1 + - col1 col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + cor0.col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col2 * col1 + col0 * tab2.col1 FROM tab2
----
1054
1989
6136

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT - col0 FROM tab0 AS cor0 WHERE NOT + col2 > NULL
----

query I rowsort
SELECT DISTINCT - tab0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0
----
-86
-91
-97

query I rowsort
SELECT + cor0.col1 + col2 * + col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - col2 * - col2 * - col2 FROM tab2
----
-17576
-19683
-54872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + col2 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + col1 * col2 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 * + col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT - col1 + col1 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + - cor0.col1 * + col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col1 + - col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ( - 72 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT ALL ( col0 ) * - tab0.col0 + col1 * tab0.col2 * 63 FROM tab0
----
178218
462185
4886

onlyif mysql # use DIV operator for integer division
query I rowsort label-2693
SELECT - + 20 DIV - col0 FROM tab1 AS cor0
----
0
0
6

skipif mysql # not compatible
query I rowsort label-2693
SELECT - + 20 / - col0 FROM tab1 AS cor0
----
0
0
6

query I rowsort
SELECT - col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 - col2 AS col1 FROM tab1
----
-16
-51
7

query I rowsort
SELECT + col1 * + 91 + col1 * col2 AS col2 FROM tab0
----
10664
15743
8924

query I rowsort
SELECT DISTINCT + 79 FROM tab2, tab1 AS cor0
----
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2698
SELECT + + col2 DIV ( col1 ) FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2698
SELECT + + col2 / ( col1 ) FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT col1 * - 20 AS col2 FROM tab2 AS cor0
----
-1180
-340
-620

query I rowsort
SELECT DISTINCT col0 + ( col1 ) * col2 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT + + col0 + - col1 AS col2 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL - - col1 + - 89 + - 64 * col2 FROM tab2 AS cor0
----
-1694
-1786
-2504

query I rowsort
SELECT + col0 * 84 FROM tab2 AS cor0
----
588
6552
6636

onlyif mysql # use DIV operator for integer division
query I rowsort label-2705
SELECT DISTINCT + col1 DIV ( col0 + - col1 ) AS col2 FROM tab0 AS cor0
----
-1
-45

skipif mysql # not compatible
query I rowsort label-2705
SELECT DISTINCT + col1 / ( col0 + - col1 ) AS col2 FROM tab0 AS cor0
----
-1
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2706
SELECT ALL - ( col2 ) DIV col1 + ( tab1.col0 ) * + col2 * col2 col1 FROM tab1
----
207931
737273
8746

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2706
SELECT ALL - ( col2 ) / col1 + ( tab1.col0 ) * + col2 * col2 col1 FROM tab1
----
207931
737273
8746

query I rowsort
SELECT - 33 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

query I rowsort
SELECT ALL 26 + col2 * + col1 AS col1 FROM tab2
----
1560
672
863

query I rowsort
SELECT + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - 61 * - 70 + + col1 * col2 FROM tab1
----
4840
5518
5674

query I rowsort
SELECT tab0.col2 * col0 + col1 + 16 AS col1 FROM tab0
----
148
7405
894

query I rowsort
SELECT + cor0.col1 + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT col2 * - col2 * - col0 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL + ( col1 ) + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT col0 - - col1 * 54 * + col1 FROM tab2 AS cor0
----
15685
188052
51901

query I rowsort
SELECT col2 * cor0.col2 + col1 FROM tab0 cor0
----
1175
6815
98

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + - 83 * col0 FROM tab1 AS cor0
----
-1664
-87
1040

query I rowsort
SELECT ALL - 51 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT + - 42 + - col2 AS col1 FROM tab0 AS cor0
----
-124
-43
-75

query I rowsort
SELECT DISTINCT + ( col0 ) * ( - 2 ) - cor0.col2 FROM tab2 AS cor0
----
-182
-196
-41

query I rowsort
SELECT ALL + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + 21 + col2 + 54 AS col2 FROM tab2 cor0
----
101
102
113

query I rowsort
SELECT + + 64 FROM tab2 AS cor0
----
64
64
64

query I rowsort
SELECT - col2 * - cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - - col1 + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + tab2.col2 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL - 63 * col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

query I rowsort
SELECT DISTINCT + - 10 * - col1 FROM tab1 AS cor0
----
100
130
260

query I rowsort
SELECT DISTINCT tab0.col0 + - tab0.col1 FROM tab0
----
-2
-62

query I rowsort
SELECT DISTINCT col0 * col2 + + col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + 21 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col2 - + ( - col0 ) AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - + col0 + col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + - col0 * col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 * - tab0.col2 col1 FROM tab0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2737
SELECT tab0.col0 * col1 + - 12 DIV col1 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2737
SELECT tab0.col0 * col1 + - 12 / col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2738
SELECT DISTINCT - 77 DIV - col0 + - col2 * col1 * tab0.col1 FROM tab0
----
-244065
-679042
-9407

skipif mysql # not compatible
query I rowsort label-2738
SELECT DISTINCT - 77 / - col0 + - col2 * col1 * tab0.col1 FROM tab0
----
-244065
-679042
-9407

query I rowsort
SELECT DISTINCT col0 + - col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT DISTINCT - col1 + col2 + + col1 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2741
SELECT DISTINCT - cor0.col0 + ( + col0 ) + col2 DIV col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-2741
SELECT DISTINCT - cor0.col0 + ( + col0 ) + col2 / col0 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2742
SELECT DISTINCT - - col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2742
SELECT DISTINCT - - col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + + col1 AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL col1 * + col0 - - col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - col0 * - ( 19 ) FROM tab1 AS cor0
----
1216
1520
57

query I rowsort
SELECT ALL - cor0.col2 + - col1 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT 28 * + col1 AS col2 FROM tab1
----
280
364
728

onlyif mysql # use DIV operator for integer division
query I rowsort label-2748
SELECT DISTINCT + col2 DIV + col2 + + col2 AS col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2748
SELECT DISTINCT + col2 / + col2 + + col2 AS col1 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT 57 + col2 FROM tab2
----
83
84
95

query I rowsort
SELECT col0 + - tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * col0 * + col1 + col2 AS col2 FROM tab0
----
3396
664200
68145

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 + col1 * - col1 col1 FROM tab0
----
-7429
-8363
-9410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2753
SELECT tab0.col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2753
SELECT tab0.col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + cor0.col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - + 68 * + col2 FROM tab0 AS cor0
----
-2244
-5576
-68

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 36 AS REAL ) * + col1 AS col0 FROM tab0 AS cor0
----
3096
3276
3492

query I rowsort
SELECT ALL + 35 * 41 FROM tab1 cor0
----
1435
1435
1435

query I rowsort
SELECT DISTINCT - col0 + - col2 * - col2 * - 86 FROM tab1 AS cor0
----
-250779
-279478
-792656

query I rowsort
SELECT - - col0 * + 56 FROM tab0 AS cor0
----
1344
1960
4984

query I rowsort
SELECT ALL - col2 * - col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ( - ( col1 ) ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - 81 * + 41 AS col2 FROM tab2 cor0
----
-3321
-3321
-3321

query I rowsort
SELECT DISTINCT col2 * col0 + - col1 AS col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL - - 66 FROM tab1 AS cor0
----
66
66
66

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 ALL - col0 * + ( - col0 ) FROM tab1
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2767
SELECT DISTINCT col2 / - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2767
SELECT DISTINCT col2 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT ALL + tab0.col0 + - col2 + + tab0.col2 FROM tab0
----
24
35
89

query I rowsort
SELECT + ( col2 ) - col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL ( ( col0 ) ) + cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
3559
368
968

onlyif mysql # use DIV operator for integer division
query I rowsort label-2772
SELECT - 50 + col1 DIV col0 AS col2 FROM tab2 AS cor0
----
-46
-50
-50

skipif mysql # not compatible
query I rowsort label-2772
SELECT - 50 + col1 / col0 AS col2 FROM tab2 AS cor0
----
-46
-50
-50

query I rowsort
SELECT ALL + col1 * + col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-2774
SELECT - CAST( + col2 AS SIGNED ) DIV col2 - - 64 FROM tab1 cor0
----
63
63
63

skipif mysql # not compatible
query I rowsort label-2774
SELECT - CAST ( + col2 AS INTEGER ) / col2 - - 64 FROM tab1 cor0
----
63
63
63

query I rowsort
SELECT + 11 FROM tab0, tab1 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT + + 21 FROM tab0 AS cor0
----
21
21
21

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1, tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL + 5 AS col2 FROM tab1 AS cor0
----
5
5
5

query I rowsort
SELECT DISTINCT - col2 * col2 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-18432
-5832
-6498

query I rowsort
SELECT col2 + - 95 * col1 AS col2 FROM tab1 cor0
----
-1139
-2416
-893

query I rowsort
SELECT ALL + - col0 + - col0 + col2 AS col2 FROM tab2 AS cor0
----
-120
-130
13

query I rowsort
SELECT DISTINCT 99 - col1 FROM tab0 AS cor0
----
13
2
8

query I rowsort
SELECT - ( col1 ) + - col2 * - 14 FROM tab2 AS cor0
----
305
347
515

query I rowsort
SELECT + cor0.col2 + + tab2.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a451dbe509e87d1600234f39388c7bd3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2785
SELECT ALL + CAST( + col1 AS SIGNED ) FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2785
SELECT ALL + CAST ( + col1 AS INTEGER ) FROM tab2
----
17
31
59

query I rowsort
SELECT - + col0 + + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + ( + col2 + tab1.col0 ) FROM tab1
----
121
176
57

query I rowsort
SELECT ALL 67 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + ( 16 ) AS col2 FROM tab2
----
16
16
16

query I rowsort
SELECT DISTINCT - col1 * + col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT cor0.col2 + - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 * tab1.col1 * - tab1.col2 + ( tab1.col2 + - col0 ) FROM tab1
----
-36487
-4161
-99824

query I rowsort
SELECT 21 * - tab0.col2 FROM tab0
----
-1722
-21
-693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2794
SELECT - ( col1 ) * + col0 DIV - col0 + + col0 + + 56 * - col1 AS col1 FROM tab0
----
-4706
-4916
-5300

skipif mysql # not compatible
query I rowsort label-2794
SELECT - ( col1 ) * + col0 / - col0 + + col0 + + 56 * - col1 AS col1 FROM tab0
----
-4706
-4916
-5300

query I rowsort
SELECT - col0 + + ( + col2 ) AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab2
----
40

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2798
SELECT DISTINCT + col0 + + col2 + col1 DIV col1 FROM tab2
----
105
118
35

skipif mysql # not compatible
query I rowsort label-2798
SELECT DISTINCT + col0 + + col2 + col1 / col1 FROM tab2
----
105
118
35

query I rowsort
SELECT col0 * - col2 + col2 AS col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT col0 + - tab0.col0 FROM tab0
----
0

query I rowsort
SELECT ALL - cor0.col0 + cor0.col2 * + 1 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + cor0.col0 + 95 AS col1 FROM tab2 AS cor0
----
102
173
174

query I rowsort
SELECT ALL + col2 * 62 - col0 AS col0 FROM tab0 AS cor0
----
2022
27
4995

query I rowsort
SELECT + col0 * - 26 + + col0 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT col0 * 27 * - col1 FROM tab0 cor0
----
-218673
-55728
-91665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2806
SELECT DISTINCT + col0 + - CAST( + col0 AS SIGNED ) * - col0 FROM tab2 AS cor0
----
56
6162
6320

skipif mysql # not compatible
query I rowsort label-2806
SELECT DISTINCT + col0 + - CAST ( + col0 AS INTEGER ) * - col0 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-2807
SELECT cor0.col2 DIV - col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2807
SELECT cor0.col2 / - col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + col0 * ( col2 + - col0 ) FROM tab1 cor0
----
-448
1280
153

query I rowsort
SELECT - cor0.col1 + + col0 + col1 * - col1 AS col1 FROM tab0 cor0
----
-7458
-8283
-9471

onlyif mysql # use DIV operator for integer division
query I rowsort label-2810
SELECT ALL - tab0.col0 DIV 42 FROM tab0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2810
SELECT ALL - tab0.col0 / 42 FROM tab0
----
-2
0
0

query I rowsort
SELECT + 91 * + 23 FROM tab1, tab1 AS cor0
----
9 values hashing to ee689a7b3c3b7872028d018597cfc49a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 41 col2 FROM tab0 AS cor0
----
41

query I rowsort
SELECT - tab1.col0 * + 85 AS col1 FROM tab1
----
-255
-5440
-6800

query I rowsort
SELECT + col2 * 54 AS col2 FROM tab0 AS cor0
----
1782
4428
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - 61 col0 FROM tab0
----
-28
-60
21

query I rowsort
SELECT ALL - 71 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

query I rowsort
SELECT tab2.col0 * col1 AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - + ( + col2 ) * - cor0.col0 + - 19 FROM tab0 cor0
----
16
7279
773

onlyif mysql # use DIV operator for integer division
query I rowsort label-2819
SELECT - col0 DIV 46 AS col0 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2819
SELECT - col0 / 46 AS col0 FROM tab2 AS cor0
----
-1
-1
0

query I rowsort
SELECT ALL ( tab1.col1 ) * - col1 * col0 + tab1.col2 AS col2 FROM tab1
----
-13424
-1974
-6343

query I rowsort
SELECT cor0.col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col1 + - 86 * col2 FROM tab1 AS cor0
----
-4670
-4912
-8269

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col0 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - ( + col2 ) * cor0.col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-2825
SELECT + - 64 DIV + col2 col1 FROM tab0 cor0
----
-1
-64
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2825
SELECT + - 64 / + col2 col1 FROM tab0 cor0
----
-1
-64
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2826
SELECT + 32 DIV + cor0.col1 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2826
SELECT + 32 / + cor0.col1 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT - + cor0.col1 + 13 FROM tab0 AS cor0
----
-73
-78
-84

query I rowsort
SELECT DISTINCT + 85 * - 88 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-7480

query I rowsort
SELECT DISTINCT tab1.col0 AS col1 FROM tab1, tab0 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - - col0 + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL + 70 - col0 AS col1 FROM tab0 AS cor0
----
-19
35
46

query I rowsort
SELECT + 56 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT 84 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT ( col1 ) + col2 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + cor0.col2 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col0 + + 97 AS col1 FROM tab0 AS cor0
----
121
132
186

query I rowsort
SELECT DISTINCT - 77 FROM tab0, tab2 cor0
----
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2838
SELECT - - col1 + col2 DIV + col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2838
SELECT - - col1 + col2 / + col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT + col2 * + cor0.col1 + 24 FROM tab0 cor0
----
121
2862
7486

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 67 * col0 col0 FROM tab0
----
1608
2345
5963

query I rowsort
SELECT DISTINCT cor0.col0 + - 75 FROM tab2 AS cor0
----
-68
3
4

query I rowsort
SELECT + 43 + - col2 FROM tab1 AS cor0
----
-11
-14
-53

query I rowsort
SELECT + - col0 + - col0 AS col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT ALL + - 59 FROM tab1 cor0
----
-59
-59
-59

query I rowsort
SELECT - + 61 + col2 FROM tab2 AS cor0
----
-23
-34
-35

query I rowsort
SELECT DISTINCT + col1 + + col1 + ( + col1 ) AS col1 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT DISTINCT + col0 * + col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + + col2 - col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2849
SELECT col2 * col1 + CAST( NULL AS SIGNED ) * + 99 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2849
SELECT col2 * col1 + CAST ( NULL AS INTEGER ) * + 99 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 78 FROM tab2 AS cor0
----
-78
-78
-78

query I rowsort
SELECT DISTINCT - - col0 * cor0.col0 + col1 AS col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT - 17 + - col1 FROM tab0 AS cor0
----
-103
-108
-114

query I rowsort
SELECT ALL ( - col2 ) * - cor0.col2 + 34 - - col0 FROM tab2 cor0
----
1557
770
788

onlyif mysql # use DIV operator for integer division
query I rowsort label-2854
SELECT - - col2 DIV - col2 + - col1 + col2 FROM tab0 AS cor0
----
-10
-54
-97

skipif mysql # not compatible
query I rowsort label-2854
SELECT - - col2 / - col2 + - col1 + col2 FROM tab0 AS cor0
----
-10
-54
-97

query I rowsort
SELECT ALL - col1 * col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2856
SELECT DISTINCT + + col0 DIV - col1 AS col0 FROM tab1 cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-2856
SELECT DISTINCT + + col0 / - col1 AS col0 FROM tab1 cor0
----
-6
0

query I rowsort
SELECT col1 * - tab2.col2 AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - 62 FROM tab0, tab1 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT ALL ( 84 ) * - col1 AS col0 FROM tab1
----
-1092
-2184
-840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * col0 + + 39 col2 FROM tab0 AS cor0
----
-7259
-753
4

query I rowsort
SELECT + col0 * - cor0.col2 + 48 AS col1 FROM tab2 AS cor0
----
-141
-1980
-2954

query I rowsort
SELECT 56 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT DISTINCT + ( - col2 ) * - col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - + col2 * + col0 FROM tab0 AS cor0
----
-35
-7298
-792

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 04ab51615fd2c7e492de6a59e98226e1

query I rowsort
SELECT col1 * - ( + col1 + - col2 ) * 5 FROM tab1 AS cor0
----
2350
3640
5395

onlyif mysql # use DIV operator for integer division
query I rowsort label-2867
SELECT col0 + + col0 DIV - col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-2867
SELECT col0 + + col0 / - col0 FROM tab1
----
2
63
79

query I rowsort
SELECT + ( 32 ) FROM tab1 AS cor0
----
32
32
32

query I rowsort
SELECT ( + col0 ) - + col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + + col0 * 14 FROM tab2 AS cor0
----
1092
1106
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2871
SELECT ALL ( col2 * - col2 ) - CAST( 79 AS SIGNED ) col1 FROM tab1
----
-2995
-3328
-9295

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2871
SELECT ALL ( col2 * - col2 ) - CAST ( 79 AS INTEGER ) col1 FROM tab1
----
-2995
-3328
-9295

skipif mysql # not compatible
query I rowsort
SELECT CAST ( ( - col0 ) AS REAL ) + 23 + col1 FROM tab0
----
25
85
85

query I rowsort
SELECT ALL col2 + + 36 * col0 AS col2 FROM tab2
----
279
2834
2882

query I rowsort
SELECT ALL - col0 * - col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + + 74 AS col2 FROM tab0 AS cor0
----
74

query I rowsort
SELECT DISTINCT + + ( col2 ) * + cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT 84 * 12 FROM tab0
----
1008
1008
1008

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 CROSS JOIN tab1, tab2, tab2 AS cor1
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( col2 ) col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2880
SELECT DISTINCT - + cor0.col2 * col0 + col2 + CAST( 25 AS SIGNED ) * + cor0.col2 * + col2 FROM tab2 AS cor0
----
14898
18063
33136

skipif mysql # not compatible
query I rowsort label-2880
SELECT DISTINCT - + cor0.col2 * col0 + col2 + CAST ( 25 AS INTEGER ) * + cor0.col2 * + col2 FROM tab2 AS cor0
----
14898
18063
33136

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab2 AS cor0
----
61

query I rowsort
SELECT ALL + ( + cor0.col0 ) * + col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col2 * + col1 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + 56 AS col2 FROM tab1 AS cor0
----
56
56
56

query I rowsort
SELECT ALL 1 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + - ( 3 ) * col1 FROM tab1 cor0
----
-30
-39
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 * + col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - 81 * col1 FROM tab0 AS cor0
----
-6966
-7371
-7857

query I rowsort
SELECT 39 * - cor0.col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT ALL 66 * cor0.col1 AS col1 FROM tab0 AS cor0
----
5676
6006
6402

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - 16 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 71c8b08964ab47ce12158975c0ee1fd9

query I rowsort
SELECT ALL + + col2 * + ( - col2 ) + col1 * + 72 AS col0 FROM tab2 AS cor0
----
-220
1503
3572

query I rowsort
SELECT DISTINCT cor1.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 * + 39 col1 FROM tab0 AS cor0
----
-58
1201
3107

query I rowsort
SELECT + col2 + 17 * + col0 * col2 FROM tab0
----
124148
13497
596

query I rowsort
SELECT + col0 + + col2 * col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL col2 * - col0 + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + - col1 + + 57 AS col1 FROM tab2 AS cor0
----
-2
26
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2900
SELECT + col2 + CAST( NULL AS SIGNED ) * - col2 / + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2900
SELECT + col2 + CAST ( NULL AS INTEGER ) * - col2 / + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 - + col1 * + col1 AS col2 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT - col0 * 21 - col0 * col0 AS col1 FROM tab1 cor0
----
-5440
-72
-8080

query I rowsort
SELECT ALL + + col1 * cor0.col0 + + col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + cor0.col1 * + ( - 94 ) FROM tab2 AS cor0
----
-1598
-2914
-5546

query I rowsort
SELECT ALL - + 19 + col1 FROM tab0 AS cor0
----
67
72
78

query I rowsort
SELECT + + ( ( col2 ) ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL - cor0.col1 + + 89 FROM tab0 AS cor0
----
-2
-8
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2908
SELECT DISTINCT + CAST( col1 AS SIGNED ) * col2 FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-2908
SELECT DISTINCT + CAST ( col1 AS INTEGER ) * col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL + ( col0 ) * col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT col1 * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + col1 - ( - col1 ) AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT + + col2 + col0 AS col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col0 + + col1 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT 72 * + col1 AS col0 FROM tab0 AS cor0
----
6192
6552
6984

query I rowsort
SELECT DISTINCT + 52 * cor0.col2 + - col2 FROM tab0 AS cor0
----
1683
4182
51

query I rowsort
SELECT ALL - + col1 * 2 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL cor0.col2 + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + - 47 FROM tab0 cor0
----
-47
-47
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2919
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2919
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col1 * + 83 AS col0 FROM tab0
----
-7138
-7553
-8051

query I rowsort
SELECT col0 - col0 * + col0 * + col2 AS col1 FROM tab0
----
-1190
-18984
-649433

query I rowsort
SELECT + col1 - 98 * tab0.col1 AS col1 FROM tab0
----
-8342
-8827
-9409

query I rowsort
SELECT ALL + col2 * col0 + ( col1 + col1 ) FROM tab2 AS cor0
----
2146
251
3036

query I rowsort
SELECT ALL + + 8 + - col0 FROM tab1 AS cor0
----
-56
-72
5

query I rowsort
SELECT + col0 + cor0.col1 AS col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2926
SELECT + col0 DIV col2 + + 37 AS col2 FROM tab1 AS cor0
----
37
37
38

skipif mysql # not compatible
query I rowsort label-2926
SELECT + col0 / col2 + + 37 AS col2 FROM tab1 AS cor0
----
37
37
38

query I rowsort
SELECT DISTINCT - 1 * col0 + + ( - 77 ) FROM tab2 AS cor0
----
-155
-156
-84

query I rowsort
SELECT ( - col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 * - ( col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 59 * - tab2.col2 FROM tab2
----
-1534
-1593
-2242

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
58

query I rowsort
SELECT ALL 96 FROM tab2
----
96
96
96

query I rowsort
SELECT ALL - 10 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT ALL 4 FROM tab2
----
4
4
4

query I rowsort
SELECT ALL col0 * - tab1.col2 * col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT + 13 - + col0 AS col1 FROM tab1 AS cor0
----
-51
-67
10

query I rowsort
SELECT - cor0.col2 + + 54 AS col2 FROM tab2 AS cor0
----
16
27
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2938
SELECT + CAST( + col0 AS SIGNED ) + col1 * cor0.col0 * + cor0.col1 AS col1 FROM tab0 cor0
----
177528
329350
737098

skipif mysql # not compatible
query I rowsort label-2938
SELECT + CAST ( + col0 AS INTEGER ) + col1 * cor0.col0 * + cor0.col1 AS col1 FROM tab0 cor0
----
177528
329350
737098

query I rowsort
SELECT 84 - - col0 * + col2 FROM tab1 AS cor0
----
246
3732
7764

query I rowsort
SELECT DISTINCT 67 + + col1 AS col1 FROM tab1 AS cor0
----
77
80
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 * - 21 col1 FROM tab0 AS cor0
----
-672
-672
-672

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2942
SELECT ALL - + CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2942
SELECT ALL - + CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - + 99 AS col2 FROM tab1 cor0
----
-99
-99
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2944
SELECT ALL 74 * col1 DIV + col1 - + 97 FROM tab0 AS cor0
----
-23
-23
-23

skipif mysql # not compatible
query I rowsort label-2944
SELECT ALL 74 * col1 / + col1 - + 97 FROM tab0 AS cor0
----
-23
-23
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2945
SELECT + col2 DIV + col0 + col1 AS col1 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-2945
SELECT + col2 / + col0 + col1 AS col1 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT ALL + - col2 * 15 AS col1 FROM tab1 AS cor0
----
-1440
-810
-855

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2947
SELECT ALL + CAST( NULL AS DECIMAL ) * + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2947
SELECT ALL + CAST ( NULL AS REAL ) * + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 23 col2 FROM tab1
----
-41
-57
20

query I rowsort
SELECT 46 FROM tab2, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT 9 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT 78 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2952
SELECT CAST( ( col1 ) AS SIGNED ) DIV - 44 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2952
SELECT CAST ( ( col1 ) AS INTEGER ) / - 44 FROM tab1
----
0
0
0

query I rowsort
SELECT + col1 + + col2 * - col0 AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - 19 + - ( + col0 * - 68 ) FROM tab1 AS cor0
----
185
4333
5421

onlyif mysql # use DIV operator for integer division
query I rowsort label-2955
SELECT - cor0.col0 DIV 44 + col0 * - CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1225
-576
-7923

skipif mysql # not compatible
query I rowsort label-2955
SELECT - cor0.col0 / 44 + col0 * - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1225
-576
-7923

query I rowsort
SELECT ALL + - ( col0 ) * - cor0.col0 + + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + - col0 * col2 + col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - 82 + 47 AS col0 FROM tab1 AS cor0
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 22 * + 89 col1 FROM tab0 cor0
----
-1958
-1958
-1958

query I rowsort
SELECT DISTINCT col1 + + col0 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL col0 * ( - cor0.col1 ) * + col0 - + col0 * cor0.col2 FROM tab0 AS cor0
----
-118860
-50328
-728109

query I rowsort
SELECT ALL ( - ( col1 ) * + ( col2 ) ) + + col0 FROM tab1
----
-1168
-1401
-506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2963
SELECT ALL CAST( col1 AS SIGNED ) * col0 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-2963
SELECT ALL CAST ( col1 AS INTEGER ) * col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + - 23 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
1017
55
617

onlyif mysql # use DIV operator for integer division
query I rowsort label-2965
SELECT 60 DIV + 92 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2965
SELECT 60 / + 92 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2966
SELECT col2 + 7 DIV + col2 + - 81 col0 FROM tab0
----
-48
-73
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2966
SELECT col2 + 7 / + col2 + - 81 col0 FROM tab0
----
-48
-73
1

query I rowsort
SELECT - - cor0.col0 + + cor0.col2 * + ( 67 ) FROM tab0 AS cor0
----
102
2235
5583

query I rowsort
SELECT + col2 * cor0.col0 + 77 + 91 FROM tab0 cor0
----
203
7466
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-2969
SELECT - 98 DIV - col0 AS col0 FROM tab1
----
1
1
32

skipif mysql # not compatible
query I rowsort label-2969
SELECT - 98 / - col0 AS col0 FROM tab1
----
1
1
32

query I rowsort
SELECT + ( - 12 ) * col0 * col1 FROM tab0
----
-24768
-40740
-97188

query I rowsort
SELECT ALL ( + 92 ) AS col2 FROM tab0
----
92
92
92

query I rowsort
SELECT ALL + cor1.col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ( + col0 ) * + 64 * - col2 AS col1 FROM tab1
----
-10368
-233472
-491520

query I rowsort
SELECT DISTINCT + col2 * tab2.col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - 77 FROM tab1
----
-77
-77
-77

query I rowsort
SELECT DISTINCT - col2 * col1 * col1 AS col1 FROM tab2
----
-10982
-25947
-90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab1.col0 col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col0 - col0 AS col2 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - + col2 + col2 * - ( col2 ) FROM tab1 cor0
----
-2970
-3306
-9312

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1, tab2 cor1
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT + - ( - col1 ) + col0 * col1 + - cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT col1 + col2 * col2 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2984
SELECT DISTINCT - col1 DIV - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-2984
SELECT DISTINCT - col1 / - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT col1 * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col1 * + ( col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + col2 + col1 * + col2 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-2988
SELECT - col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2988
SELECT - col2 / col2 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col0 * + 97 AS col1 FROM tab2 AS cor0
----
679
7566
7663

onlyif mysql # use DIV operator for integer division
query I rowsort label-2990
SELECT - 39 DIV + col0 AS col0 FROM tab0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2990
SELECT - 39 / + col0 AS col0 FROM tab0
----
-1
-1
0

query I rowsort
SELECT + col0 * + 72 FROM tab0 AS cor0
----
1728
2520
6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-2992
SELECT col0 DIV CAST( + col2 AS SIGNED ) + - col2 * 8 FROM tab1
----
-432
-455
-768

skipif mysql # not compatible
query I rowsort label-2992
SELECT col0 / CAST ( + col2 AS INTEGER ) + - col2 * 8 FROM tab1
----
-432
-455
-768

query I rowsort
SELECT 53 * + col2 AS col1 FROM tab0 cor0
----
1749
4346
53

query I rowsort
SELECT - + col1 * col1 - + col2 AS col0 FROM tab2 AS cor0
----
-327
-3507
-988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2995
SELECT + col1 / + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2995
SELECT + col1 / + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + col2 * - col0 * col0 AS col2 FROM tab1 AS cor0
----
-233408
-483
-614320

query I rowsort
SELECT - col1 * ( 93 ) AS col0 FROM tab1 AS cor0
----
-1209
-2418
-930

query I rowsort
SELECT DISTINCT - col2 + cor0.col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - + col2 * - ( + col1 ) + - col2 AS col1 FROM tab1 AS cor0
----
1152
1350
513

onlyif mysql # use DIV operator for integer division
query I rowsort label-3000
SELECT ALL col2 DIV ( + ( col0 ) ) FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3000
SELECT ALL col2 / ( + ( col0 ) ) FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - + col0 * - ( col2 ) - + col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT - col0 * - col2 * col2 + - col2 * - ( cor0.col0 ) * col0 FROM tab1 AS cor0
----
1351680
441408
9234

query I rowsort
SELECT - - col2 + col2 * + 34 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT - col1 * col2 + col2 * + col2 FROM tab0 AS cor0
----
-1749
-738
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3005
SELECT - col2 * - 0 DIV 64 + col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3005
SELECT - col2 * - 0 / 64 + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col0 + + ( col2 ) AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT col2 * + col0 + + col0 - + cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col1 + col2 * col2 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT DISTINCT + ( col2 ) * - col2 * 25 + col0 AS col2 FROM tab1 AS cor0
----
-230320
-72897
-81161

query I rowsort
SELECT + col1 * 12 FROM tab1
----
120
156
312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3011
SELECT col0 * CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3011
SELECT col0 * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 26 * cor0.col0 FROM tab0 cor0
----
2314
624
910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col0 ) col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3014
SELECT ALL + cor0.col1 / CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3014
SELECT ALL + cor0.col1 / CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT - col0 - - 13 * col2 FROM tab1
----
1168
677
699

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3017
SELECT CAST( - 92 AS SIGNED ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

skipif mysql # not compatible
query I rowsort label-3017
SELECT CAST ( - 92 AS INTEGER ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

onlyif mysql # use DIV operator for integer division
query I rowsort label-3018
SELECT - tab2.col1 DIV col1 + tab2.col0 * + col0 * + CAST( - col0 * - col0 AS SIGNED ) - ( col1 * col1 ) FROM tab2
----
1439
37011574
38949791

skipif mysql # not compatible
query I rowsort label-3018
SELECT - tab2.col1 / col1 + tab2.col0 * + col0 * + CAST ( - col0 * - col0 AS INTEGER ) - ( col1 * col1 ) FROM tab2
----
1439
37011574
38949791

onlyif mysql # use DIV operator for integer division
query I rowsort label-3019
SELECT - col2 DIV CAST( + col2 + - col1 AS SIGNED ) AS col1 FROM tab2
----
-1
0
6

skipif mysql # not compatible
query I rowsort label-3019
SELECT - col2 / CAST ( + col2 + - col1 AS INTEGER ) AS col1 FROM tab2
----
-1
0
6

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 cor2
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

onlyif mysql # use DIV operator for integer division
query I rowsort label-3021
SELECT DISTINCT - col1 * cor0.col0 DIV - ( - col2 + col1 * 10 ) 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-3021
SELECT DISTINCT - col1 * cor0.col0 / - ( - col2 + col1 * 10 ) col0 FROM tab0 AS cor0
----
2
3
9

query I rowsort
SELECT - + 3 AS col0 FROM tab2 AS cor0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - 17 * col1 FROM tab1 AS cor0
----
-170
-221
-442

query I rowsort
SELECT + col1 + col1 * ( col1 ) AS col2 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT ( cor0.col0 ) AS col1 FROM tab0, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT 90 AS col1 FROM tab0
----
90

query I rowsort
SELECT - ( col2 + 1 ) AS col2 FROM tab2
----
-27
-28
-39

query I rowsort
SELECT ALL 78 AS col1 FROM tab1
----
78
78
78

query I rowsort
SELECT DISTINCT 86 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
86

query I rowsort
SELECT ALL tab1.col2 * + col1 FROM tab1
----
1248
1404
570

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab2 cor1, tab1, tab0 AS cor2
----
3645 values hashing to 95cc5fe1844e2fb00b447bbee94ccc5e

onlyif mysql # use DIV operator for integer division
query I rowsort label-3032
SELECT col1 DIV - cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-3032
SELECT col1 / - cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT + col1 - col0 AS col1 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT + - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3035
SELECT col2 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3035
SELECT col2 * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab0.col0 + tab0.col1 * - col2 + - col2 AS col0 FROM tab0
----
-133
-2895
-7633

query I rowsort
SELECT - col0 + + col0 AS col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col2 col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + + col0 * ( col1 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - 74 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT DISTINCT cor0.col1 * ( + col0 ) FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3042
SELECT ALL - col2 DIV ( 5 ) FROM tab0 AS cor0
----
-16
-6
0

skipif mysql # not compatible
query I rowsort label-3042
SELECT ALL - col2 / ( 5 ) FROM tab0 AS cor0
----
-16
-6
0

query I rowsort
SELECT ALL + col0 * 14 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT + - col0 + 60 * - ( col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
-10220
-40563
-6064

query I rowsort
SELECT + 21 FROM tab1, tab2 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT DISTINCT col1 * col2 + col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT - 89 * - tab0.col0 FROM tab0
----
2136
3115
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3048
SELECT DISTINCT col1 + col1 + - col0 DIV - 32 AS col2 FROM tab1
----
22
28
52

skipif mysql # not compatible
query I rowsort label-3048
SELECT DISTINCT col1 + col1 + - col0 / - 32 AS col2 FROM tab1
----
22
28
52

query I rowsort
SELECT - 48 + - tab2.col1 * col2 AS col1 FROM tab2
----
-1582
-694
-885

query I rowsort
SELECT DISTINCT - 72 FROM tab2, tab0, tab2 AS cor0, tab1
----
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3051
SELECT ALL + CAST( 92 AS SIGNED ) FROM tab2 AS cor0
----
92
92
92

skipif mysql # not compatible
query I rowsort label-3051
SELECT ALL + CAST ( 92 AS INTEGER ) FROM tab2 AS cor0
----
92
92
92

query I rowsort
SELECT - ( col0 ) + + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT 40 * - col0 FROM tab0 AS cor0
----
-1400
-3560
-960

query I rowsort
SELECT ALL - 99 FROM tab2, tab1 AS cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 24 col0 FROM tab1 cor0
----
-24

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL cor0.col1 * + cor0.col2 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 36 + - col0 * 78 * - cor0.col1 + - col2 col0 FROM tab0 AS cor0
----
160923
264773
631604

query I rowsort
SELECT ALL - col1 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - - 72 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT DISTINCT + + col0 * col0 + + ( ( col1 ) ) * col1 AS col0 FROM tab2 cor0
----
1010
6530
9565

query I rowsort
SELECT + - col1 * - col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - + 87 * col1 FROM tab0 AS cor0
----
-7482
-7917
-8439

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col0 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + col2 + - col0 * 10 FROM tab1 cor0
----
-697
-84
-896

onlyif mysql # use DIV operator for integer division
query I rowsort label-3066
SELECT ALL + col0 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3066
SELECT ALL + col0 / cor0.col1 AS col2 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT 60 AS col1 FROM tab0 AS cor0
----
60
60
60

query I rowsort
SELECT ALL + 61 FROM tab0 AS cor0
----
61
61
61

query I rowsort
SELECT ALL + col2 * - cor0.col1 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3070
SELECT DISTINCT + + 55 DIV + col2 + - col2 AS col2 FROM tab0 AS cor0
----
-32
-82
54

skipif mysql # not compatible
query I rowsort label-3070
SELECT DISTINCT + + 55 / + col2 + - col2 AS col2 FROM tab0 AS cor0
----
-32
-82
54

query I rowsort
SELECT DISTINCT + cor0.col2 + - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col2 * col0 + ( col2 ) AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT col2 - + col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT col0 + 22 AS col0 FROM tab2
----
100
101
29

query I rowsort
SELECT DISTINCT tab1.col1 + tab1.col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT col1 * - col1 + col2 AS col0 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT - + col1 * col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + 1 * + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL col1 * col0 + col2 + - col1 FROM tab2 cor0
----
1364
213
4569

query I rowsort
SELECT ALL cor0.col1 * + col2 + ( + col2 ) AS col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3081
SELECT DISTINCT - - col2 DIV col1 + col2 * 11 col0 FROM tab0 AS cor0
----
11
363
902

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3081
SELECT DISTINCT - - col2 / col1 + col2 * 11 col0 FROM tab0 AS cor0
----
11
363
902

query I rowsort
SELECT ALL tab1.col1 + - col0 * + ( col0 * - col2 ) + col1 FROM tab1
----
233492
538
614426

query I rowsort
SELECT - col2 * + col2 + col0 * - col2 * cor0.col0 - col2 FROM tab1 AS cor0
----
-236778
-3456
-623712

query I rowsort
SELECT + 51 FROM tab2, tab1 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 * cor0.col0 col1 FROM tab0 cor0
----
1800
2625
6675

query I rowsort
SELECT + col1 * + 52 FROM tab0
----
4472
4732
5044

query I rowsort
SELECT ALL + tab2.col2 * col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT 64 * - 77 AS col1 FROM tab2 AS cor0
----
-4928
-4928
-4928

query I rowsort
SELECT - col0 * + cor0.col1 + col1 FROM tab1 AS cor0
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 col1 FROM tab1
----
0

query I rowsort
SELECT ALL 44 + - col0 * ( 89 ) AS col1 FROM tab1 cor0
----
-223
-5652
-7076

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT DISTINCT + + col0 * + col0 + col0 DIV + col1 AS col1 FROM tab1 AS cor0
----
4102
6406
9

skipif mysql # not compatible
query I rowsort label-3092
SELECT DISTINCT + + col0 * + col0 + col0 / + col1 AS col1 FROM tab1 AS cor0
----
4102
6406
9

query I rowsort
SELECT + tab0.col0 + + col1 * col2 * - col2 AS col1 FROM tab0
----
-611795
-62
-93630

query I rowsort
SELECT DISTINCT + + col1 * - col1 - col2 * 68 * + col0 AS col0 FROM tab0 AS cor0
----
-11789
-504545
-61252

query I rowsort
SELECT col2 * col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - col1 + col0 FROM tab0 cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3097
SELECT DISTINCT + cor0.col1 DIV col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3097
SELECT DISTINCT + cor0.col1 / col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - 60 AS col2 FROM tab1 AS cor0
----
-60
-60
-60

query I rowsort
SELECT - col2 * col2 + 53 + - col0 FROM tab1 AS cor0
----
-2866
-3260
-9243

query I rowsort
SELECT + col2 * 95 FROM tab0 AS cor0
----
3135
7790
95

query I rowsort
SELECT col2 + 33 + - cor0.col2 FROM tab1 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT - + col0 + + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT - - col0 - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + col1 + cor0.col0 + - col1 AS col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3105
SELECT - col1 * col0 + ( + col0 ) + + col1 DIV + col2 col1 FROM tab0 cor0
----
-2038
-3263
-8009

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3105
SELECT - col1 * col0 + ( + col0 ) + + col1 / + col2 col1 FROM tab0 cor0
----
-2038
-3263
-8009

query I rowsort
SELECT - cor0.col0 + 84 - cor0.col1 AS col0 FROM tab0 AS cor0
----
-26
-48
-96

query I rowsort
SELECT ALL - col1 * tab1.col1 AS col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT ALL ( + col1 ) * + 63 AS col1 FROM tab0
----
5418
5733
6111

query I rowsort
SELECT - col2 - + col1 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT col1 + tab0.col2 * + col0 * col0 FROM tab0
----
1322
19094
649613

query I rowsort
SELECT ALL - col1 + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + + col1 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - col0 * col1 + col0 FROM tab1 AS cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - col1 + + col0 col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL + col2 + col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT + col1 - + col1 * col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3117
SELECT col1 - col1 DIV col0 AS col0 FROM tab1
----
10
13
18

skipif mysql # not compatible
query I rowsort label-3117
SELECT col1 - col1 / col0 AS col0 FROM tab1
----
10
13
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3118
SELECT - col0 DIV col0 AS col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3118
SELECT - col0 / col0 AS col1 FROM tab0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3119
SELECT col2 * col1 DIV + col0 FROM tab1
----
15
468
8

skipif mysql # not compatible
query I rowsort label-3119
SELECT col2 * col1 / + col0 FROM tab1
----
15
468
8

query I rowsort
SELECT + - col0 * - col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * cor0.col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3122
SELECT - 36 DIV col1 + - col0 * col2 FROM tab2 AS cor0
----
-190
-2028
-3004

skipif mysql # not compatible
query I rowsort label-3122
SELECT - 36 / col1 + - col0 * col2 FROM tab2 AS cor0
----
-190
-2028
-3004

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + col2 col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 71 * col1 col2 FROM tab1
----
-1846
-710
-923

query I rowsort
SELECT DISTINCT - 57 FROM tab1
----
-57

query I rowsort
SELECT ALL - ( col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + 5 * - 97 FROM tab1
----
-485

query I rowsort
SELECT 68 AS col2 FROM tab0
----
68
68
68

query I rowsort
SELECT + 63 + - col1 FROM tab2 AS cor0
----
32
4
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT DISTINCT col1 DIV ( - tab2.col1 ) AS col2 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-3130
SELECT DISTINCT col1 / ( - tab2.col1 ) AS col2 FROM tab2
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3131
SELECT ALL CAST( - col1 AS SIGNED ) FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-3131
SELECT ALL CAST ( - col1 AS INTEGER ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT ( col2 ) * + col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - 12 AS col1 FROM tab1
----
-12
-12
-12

query I rowsort
SELECT DISTINCT tab0.col1 * + 8 AS col1 FROM tab0
----
688
728
776

query I rowsort
SELECT DISTINCT + 33 FROM tab0
----
33

query I rowsort
SELECT ALL ( col1 ) * col2 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3137
SELECT ALL CAST( + col0 AS SIGNED ) * col0 + - 63 FROM tab1 AS cor0
----
-54
4033
6337

skipif mysql # not compatible
query I rowsort label-3137
SELECT ALL CAST ( + col0 AS INTEGER ) * col0 + - 63 FROM tab1 AS cor0
----
-54
4033
6337

query I rowsort
SELECT - cor0.col1 * - 62 AS col0 FROM tab1 AS cor0
----
1612
620
806

query I rowsort
SELECT - ( col2 ) + - col2 * + col0 FROM tab0 cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL + ( + col0 + - col0 ) AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 34 AS col0 FROM tab2
----
34
34
34

query I rowsort
SELECT - - col1 * col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 60 col0 FROM tab2 AS cor0
----
-60
-60
-60

query I rowsort
SELECT + 82 - + col1 FROM tab2 AS cor0
----
23
51
65

query I rowsort
SELECT + cor0.col0 * col1 * col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL ( + col1 ) + + col2 * cor0.col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 * + col2 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-3148
SELECT - col2 DIV - cor0.col0 col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3148
SELECT - col2 / - cor0.col0 col2 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - col2 * col0 + ( col0 ) AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - - col1 * - col0 + col2 AS col2 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT - col2 * col2 * - col1 AS col2 FROM tab2 AS cor0
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-3152
SELECT ALL + col0 DIV col2 col2 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3152
SELECT ALL + col0 / col2 col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL ( - col2 ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab2
----
61

query I rowsort
SELECT DISTINCT + ( - col1 ) * col1 * - col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - col0 * col2 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT ALL + cor0.col1 + col0 DIV - 56 AS col2 FROM tab0 AS cor0
----
86
90
97

skipif mysql # not compatible
query I rowsort label-3157
SELECT ALL + cor0.col1 + col0 / - 56 AS col2 FROM tab0 AS cor0
----
86
90
97

query I rowsort
SELECT ALL + 78 FROM tab2 AS cor0
----
78
78
78

query I rowsort
SELECT + + cor0.col2 + + 75 FROM tab1 AS cor0
----
129
132
171

query I rowsort
SELECT + + col2 * cor0.col1 + - col1 FROM tab0 AS cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col1 + ( - col2 ) AS col1 FROM tab1
----
-28
-47
-83

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab1, tab0 AS cor1 WHERE NULL >= ( NULL )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3164
SELECT ALL + col2 * - CAST( NULL AS SIGNED ) + - col2 col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3164
SELECT ALL + col2 * - CAST ( NULL AS INTEGER ) + - col2 col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + - ( ( + col0 ) * 27 ) FROM tab1 AS cor0
----
-135
-1785
-2256

query I rowsort
SELECT ALL - + col1 * ( - col1 ) - - col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT - - col2 * + 59 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT ALL + - cor0.col1 * ( + col0 ) + col1 * cor0.col0 * + 22 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
169990
43320
71260

query I rowsort
SELECT col1 * col1 + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT ALL - col2 * col0 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT cor0.col1 + + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT col2 * col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col2 + ( col0 ) + - col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + col1 - ( col1 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL - - col2 AS col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3177
SELECT DISTINCT col2 DIV - col1 + col0 * + cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-3177
SELECT DISTINCT col2 / - col1 + col0 * + cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3178
SELECT - 79 DIV col2 FROM tab0 AS cor0
----
-2
-79
0

skipif mysql # not compatible
query I rowsort label-3178
SELECT - 79 / col2 FROM tab0 AS cor0
----
-2
-79
0

query I rowsort
SELECT ALL + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT ( - col1 ) * - col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT col2 + + col2 + col1 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3183
SELECT ALL - col1 DIV - ( col1 ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3183
SELECT ALL - col1 / - ( col1 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - ( - 48 ) * col0 FROM tab0 AS cor0
----
1152
1680
4272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3185
SELECT ALL + CAST( + col0 AS SIGNED ) + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-3185
SELECT ALL + CAST ( + col0 AS INTEGER ) + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3186
SELECT DISTINCT - ( - col0 ) + + col2 DIV - col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3186
SELECT DISTINCT - ( - col0 ) + + col2 / - col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col1 + col2 AS col1 FROM tab0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3188
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * col2 + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3188
SELECT DISTINCT + CAST ( NULL AS REAL ) * col2 + col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 77 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT + 14 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT DISTINCT + + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

query I rowsort
SELECT ALL - - 33 * - col1 + col2 FROM tab2 AS cor0
----
-1921
-523
-996

query I rowsort
SELECT 36 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1307
-181
-4566

query I rowsort
SELECT + + ( - col1 ) FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3195
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * + col1 - col0 * - col1 / - col2 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3195
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * + col1 - col0 * - col1 / - col2 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 95 FROM tab0 cor0
----
95

query I rowsort
SELECT ALL + 4 * + col0 + col1 FROM tab1 AS cor0
----
266
333
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3198
SELECT + ( 93 ) * - cor0.col2 + CAST( NULL AS DECIMAL ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3198
SELECT + ( 93 ) * - cor0.col2 + CAST ( NULL AS REAL ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 95 * col1 * + col2 FROM tab1 AS cor0
----
118560
133380
54150

query I rowsort
SELECT - - col0 * 67 AS col0 FROM tab0 cor0
----
1608
2345
5963

query I rowsort
SELECT DISTINCT col1 + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL 60 * col0 FROM tab0 AS cor0
----
1440
2100
5340

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 + col0 col2 FROM tab1 AS cor0
----
14
75
91

query I rowsort
SELECT DISTINCT 61 AS col2 FROM tab2 AS cor0
----
61

query I rowsort
SELECT + tab2.col1 + tab2.col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL 52 * col2 FROM tab0 cor0
----
1716
4264
52

query I rowsort
SELECT - - 38 * col1 + - col0 AS col0 FROM tab2 AS cor0
----
1171
2164
567

query I rowsort
SELECT ALL 73 * 56 + - col1 * - 96 FROM tab1 AS cor0
----
5048
5336
6584

query I rowsort
SELECT - - 16 AS col1 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT - cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT 64 FROM tab2, tab1 cor0, tab0 AS cor1
----
64

query I rowsort
SELECT ALL + - col2 * 73 FROM tab1 AS cor0
----
-3942
-4161
-7008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * - 77 col2 FROM tab1 AS cor0
----
-231
-4928
-6160

query I rowsort
SELECT DISTINCT - col1 + - col2 * + col2 * cor0.col0 AS col1 FROM tab0 cor0
----
-132
-26222
-598527

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + ( ( col2 ) + 10 ) col0 FROM tab2 AS cor0
----
-23
31
6

query I rowsort
SELECT - col2 * cor0.col1 + - col1 AS col1 FROM tab1 AS cor0
----
-1261
-1430
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3218
SELECT col0 + + tab2.col1 + tab2.col0 DIV + col0 FROM tab2
----
138
39
97

skipif mysql # not compatible
query I rowsort label-3218
SELECT col0 + + tab2.col1 + tab2.col0 / + col0 FROM tab2
----
138
39
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3219
SELECT + col0 DIV col0 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3219
SELECT + col0 / col0 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT - col2 + col2 * - ( + 51 ) + col2 FROM tab1
----
-2754
-2907
-4896

query I rowsort
SELECT DISTINCT 59 AS col2 FROM tab1, tab2 AS cor0
----
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3222
SELECT + col2 + - CAST( NULL AS SIGNED ) * + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3222
SELECT + col2 + - CAST ( NULL AS INTEGER ) * + col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col2 * col2 + + col0 FROM tab2
----
-113997
-5096
-52650

onlyif mysql # use DIV operator for integer division
query I rowsort label-3224
SELECT col1 DIV + 1 + - tab2.col2 FROM tab2
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-3224
SELECT col1 / + 1 + - tab2.col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL col0 + - ( tab2.col0 ) FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + + col1 * + 8 AS col0 FROM tab1
----
154
23
8

query I rowsort
SELECT DISTINCT + col1 + 35 FROM tab0
----
121
126
132

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 77 col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c7e5f48ecd3843d54a76808ed1f43ff6

query I rowsort
SELECT col1 + ( + col1 ) * col0 * col1 FROM tab2 AS cor0
----
22848
271577
6758

query I rowsort
SELECT DISTINCT col1 * + 6 AS col1 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT ALL - col0 * - col2 * cor0.col0 + col1 FROM tab0 AS cor0
----
1322
19094
649613

query I rowsort
SELECT + col2 * ( + col1 ) * col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - col2 * ( col1 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL 26 * + tab1.col2 AS col0 FROM tab1
----
1404
1482
2496

query I rowsort
SELECT 72 AS col2 FROM tab1
----
72
72
72

query I rowsort
SELECT - col1 * + 59 FROM tab0
----
-5074
-5369
-5723

query I rowsort
SELECT col2 + + ( 86 ) + - col0 FROM tab2
----
106
34
45

query I rowsort
SELECT + tab2.col0 * - col1 FROM tab2
----
-1343
-217
-4602

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1, tab0 AS cor0, tab0 AS cor1
----
972 values hashing to 8420206d6932c454f05a38de634b3cb5

query I rowsort
SELECT + cor0.col2 * 33 AS col2 FROM tab1 AS cor0
----
1782
1881
3168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3241
SELECT col2 / CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3241
SELECT col2 / CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 4 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT DISTINCT + + 35 AS col2 FROM tab1, tab0, tab2 cor0
----
35

query I rowsort
SELECT DISTINCT + col0 * col1 * col1 AS col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT - 85 AS col2 FROM tab1, tab1 AS cor0
----
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3247
SELECT + tab1.col0 DIV col2 + col0 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-3247
SELECT + tab1.col0 / col2 + col0 FROM tab1
----
3
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3248
SELECT DISTINCT + col0 DIV col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3248
SELECT DISTINCT + col0 / col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT DISTINCT + + 65 * col1 FROM tab0 AS cor0
----
5590
5915
6305

query I rowsort
SELECT - cor1.col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3251
SELECT + CAST( + col1 AS SIGNED ) * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-3251
SELECT + CAST ( + col1 AS INTEGER ) * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - cor0.col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT cor0.col0 * + col1 AS col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL 83 FROM tab1 AS cor0
----
83
83
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3255
SELECT col1 DIV - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3255
SELECT col1 / - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 * col2 - col2 AS col2 FROM tab0
----
-36
-7380
-825

query I rowsort
SELECT - 59 AS col2 FROM tab2
----
-59
-59
-59

query I rowsort
SELECT + 14 + + col2 + + 86 AS col0 FROM tab2 AS cor0
----
126
127
138

query I rowsort
SELECT + 36 AS col0 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab2, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
7
78
79

query I rowsort
SELECT - + 12 FROM tab0 AS cor0
----
-12
-12
-12

query I rowsort
SELECT + + col0 * col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL cor0.col0 * - ( - col1 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - - col1 * col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3267
SELECT col0 DIV + col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3267
SELECT col0 / + col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2, tab0 cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT ALL - 20 AS col2 FROM tab1
----
-20
-20
-20

query I rowsort
SELECT ALL - cor0.col0 * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - - cor0.col1 + col1 * col1 AS col0 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT + + col2 + ( col2 ) FROM tab1 AS cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3273
SELECT DISTINCT - - col0 + + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3273
SELECT DISTINCT - - col0 + + CAST ( NULL AS REAL ) AS col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - 96 + - col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
1932
2906
93

query I rowsort
SELECT + ( col1 ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT 7 + col1 * col1 FROM tab1 AS cor0
----
107
176
683

query I rowsort
SELECT + col0 * 63 + col1 AS col1 FROM tab2 AS cor0
----
472
4973
4994

query I rowsort
SELECT + col2 + + ( cor0.col2 ) FROM tab0 AS cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3279
SELECT - CAST( NULL AS SIGNED ) * - ( col0 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3279
SELECT - CAST ( NULL AS INTEGER ) * - ( col0 ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col1 * + col2 * + col2 + col1 * col1 + ( col0 ) FROM tab0 AS cor0
----
101074
620254
9541

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab0, tab1 AS cor0, tab0 cor1
----
24
35
89

query I rowsort
SELECT ALL - col2 + + col2 + 99 AS col2 FROM tab0 AS cor0
----
99
99
99

query I rowsort
SELECT DISTINCT + col2 - col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT tab0.col2 - + col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab2 WHERE - col1 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + tab0.col1 * - col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT tab1.col2 + - col0 * col0 - col1 FROM tab1
----
-4049
-6317
19

query III rowsort
SELECT * FROM tab1 WHERE NOT col1 * col1 BETWEEN ( col2 ) AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3289
SELECT ALL - col1 * - col1 - - col0 DIV col0 FROM tab1
----
101
170
677

skipif mysql # not compatible
query I rowsort label-3289
SELECT ALL - col1 * - col1 - - col0 / col0 FROM tab1
----
101
170
677

query I rowsort
SELECT DISTINCT col0 * + col2 * - col0 + col1 FROM tab0
----
-1128
-18922
-649431

query I rowsort
SELECT col0 - - tab2.col0 FROM tab2 WHERE ( col1 + - col1 ) >= ( - col0 * + col2 )
----
14
156
158

query I rowsort
SELECT col1 * + col2 + col1 AS col0 FROM tab2
----
1593
663
868

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( col2 * col0 * - col0 + col0 / col1 ) = ( col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL + col0 + + col2 FROM tab0
----
171
36
57

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) IN ( - tab0.col0 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE ( NULL ) NOT IN ( - col0 - col1 * col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3297
SELECT + tab2.col2 DIV - col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-3297
SELECT + tab2.col2 / - col1 FROM tab2
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col1 + + col2 col0 FROM tab1
----
2
37
70

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) IN ( tab0.col2 * col1 )
----

query I rowsort
SELECT ALL - col2 * + tab0.col0 * + tab0.col1 AS col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT tab2.col0 - col0 FROM tab2
----
0
0
0

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT IN ( + tab1.col0 + - col0 )
----

query I rowsort
SELECT tab0.col0 - + col0 * + col0 FROM tab0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-3304
SELECT + tab1.col1 DIV + col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3304
SELECT + tab1.col1 / + col1 FROM tab1
----
1
1
1

query I rowsort
SELECT - col0 * tab2.col0 AS col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - col2 + col1 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - col1 * + tab1.col1 FROM tab1
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col1 col0 FROM tab2
----
1534
646
837

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) NOT IN ( - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col2 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL + tab0.col2 * - tab0.col0 - col2 FROM tab0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col1 FROM tab1 WHERE NOT + col0 = ( NULL )
----

query I rowsort
SELECT col2 + - col1 * col0 AS col0 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT tab1.col2 * col1 * col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT - col2 + col2 + col0 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT + col0 * col2 + + tab2.col0 * col1 - - col0 AS col1 FROM tab2
----
413
4424
6708

onlyif mysql # use DIV operator for integer division
query I rowsort label-3317
SELECT - col1 DIV - col1 - - tab0.col0 DIV - col1 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3317
SELECT - col1 / - col1 - - tab0.col0 / - col1 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT - + cor0.col0 + + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + col0 * col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - col2 * + cor0.col1 + + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT + col2 FROM tab0 AS cor0 WHERE NOT NULL >= col1
----

query III rowsort
SELECT * FROM tab2 WHERE col2 * - col2 + - col2 * col1 BETWEEN NULL AND ( col1 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( col2 * - col2 )
----

query I rowsort
SELECT col2 * col0 FROM tab2 AS cor0 WHERE NULL BETWEEN col2 AND NULL
----

query I rowsort
SELECT cor0.col1 * cor0.col2 * col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + col1 * - col0 * col0 AS col1 FROM tab0 cor0
----
-118825
-49536
-720811

query I rowsort
SELECT - cor0.col1 + - col2 * col1 / - col2 AS col1 FROM tab2 AS cor0 WHERE NULL > NULL
----

query I rowsort
SELECT DISTINCT - col1 + col1 FROM tab0 cor0
----
0

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 + col1 NOT BETWEEN ( col2 * + col2 ) AND - col1
----

query I rowsort
SELECT DISTINCT col1 * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col2 * col0 * col1 FROM tab0 AS cor0 WHERE NOT NULL = col1
----

query I rowsort
SELECT + - col1 + 79 AS col1 FROM tab2 AS cor0
----
20
48
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3333
SELECT DISTINCT col1 + CAST( NULL AS SIGNED ) * col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3333
SELECT DISTINCT col1 + CAST ( NULL AS INTEGER ) * col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + 45 + col0 col1 FROM tab0 AS cor0
----
-3846
-4006
-4330

query I rowsort
SELECT DISTINCT col0 * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort
SELECT ALL + cor0.col2 + + CAST ( - col2 AS REAL ) FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3337
SELECT - col2 DIV CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3337
SELECT - col2 / CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 46 * + 23 col1 FROM tab0 AS cor0
----
1082
1093
1147

query I rowsort
SELECT - + col0 * - col2 + - 3 * col0 * col2 FROM tab2 AS cor0
----
-378
-4056
-6004

query I rowsort
SELECT ALL - + col2 + col2 * 47 AS col0 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT col2 * + ( cor0.col0 ) FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL col0 + - 64 * - 62 * - col1 FROM tab2 AS cor0
----
-123001
-234034
-67377

query I rowsort
SELECT DISTINCT + col2 + col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL col2 * cor0.col2 + - col0 FROM tab0 cor0
----
-34
1065
6635

query I rowsort
SELECT - - col0 + - 20 AS col2 FROM tab2 AS cor0
----
-13
58
59

query I rowsort
SELECT ALL - col2 * + col2 - col2 FROM tab0 cor0
----
-1122
-2
-6806

query I rowsort
SELECT + - col2 + - 8 FROM tab0 AS cor0
----
-41
-9
-90

query I rowsort
SELECT ALL + - cor0.col2 + cor0.col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + col0 * + ( cor0.col0 ) + col2 * col1 FROM tab1 AS cor0
----
1413
4666
7648

query I rowsort
SELECT + col0 * - col0 + + col0 AS col1 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT - + 31 * - col2 AS col0 FROM tab1 AS cor0
----
1674
1767
2976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3353
SELECT ALL - 59 DIV - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3353
SELECT ALL - 59 / - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( 58 ) FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 793ce5fda3f22b0a251dca7e8a07baed

query I rowsort
SELECT ALL + 24 AS col1 FROM tab1 cor0
----
24
24
24

query I rowsort
SELECT ALL + cor2.col0 AS col2 FROM tab1, tab0 AS cor0, tab0 cor1, tab0, tab0 AS cor2
----
243 values hashing to ee8b23a58dda2d92e14ed437e06ed8d2

query I rowsort
SELECT DISTINCT - 20 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-20

query I rowsort
SELECT DISTINCT + 22 - col0 AS col1 FROM tab2 AS cor0
----
-56
-57
15

query I rowsort
SELECT - - 64 * col2 * col1 FROM tab2 AS cor0
----
41344
53568
98176

query I rowsort
SELECT ALL - 97 FROM tab2 AS cor0
----
-97
-97
-97

query I rowsort
SELECT + col2 * + col2 + col1 FROM tab0 cor0
----
1175
6815
98

query I rowsort
SELECT ALL - 15 + cor0.col0 FROM tab2 AS cor0
----
-8
63
64

query I rowsort
SELECT DISTINCT + 18 + col2 AS col1 FROM tab1 AS cor0
----
114
72
75

query I rowsort
SELECT ( 4 ) FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT + col0 * - tab0.col2 AS col2 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - - col1 col1 FROM tab0
----
110
132
180

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( tab2.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col0 * - col1 FROM tab2 WHERE NOT col1 >= NULL
----

query I rowsort
SELECT DISTINCT + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - - col1 AS col0 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + + cor0.col2 - + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + tab0.col0 + - col1 FROM tab0
----
-27
-38
87

query I rowsort
SELECT ALL col0 * col1 + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL col1 * - col2 + col2 * tab2.col1 * col0 FROM tab2
----
118118
5022
50388

query I rowsort
SELECT - - 82 * + cor0.col0 FROM tab0 AS cor0
----
1968
2870
7298

query I rowsort
SELECT cor0.col1 + + 97 AS col2 FROM tab1 cor0
----
107
110
123

query I rowsort
SELECT + + ( - col2 ) * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col2 + col0 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - + cor0.col0 * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + 24 AS col0 FROM tab0 AS cor0
----
24
24
24

query I rowsort
SELECT cor0.col2 * 67 * - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 646bb0ca039f80e680150cc5b36e1139

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-3384
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3384
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 51 FROM tab1, tab0 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT - 21 FROM tab1, tab2 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT ALL col0 + col0 * tab2.col0 + + 45 FROM tab2
----
101
6207
6365

query I rowsort
SELECT - col2 * col1 + col1 * - col1 FROM tab1 AS cor0
----
-1417
-2080
-670

query I rowsort
SELECT - 42 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 56f86ff01cd96a3511acd46e0e811e27

query I rowsort
SELECT - 62 * - cor0.col2 * cor0.col0 + + cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
2268
452649
49223

query I rowsort
SELECT DISTINCT 45 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
45

query I rowsort
SELECT col0 * + 29 * - 16 AS col2 FROM tab2
----
-3248
-36192
-36656

query I rowsort
SELECT + 76 FROM tab0 AS cor0
----
76
76
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3394
SELECT DISTINCT + cor0.col2 + + ( cor0.col0 ) DIV col1 FROM tab2 AS cor0
----
27
42

skipif mysql # not compatible
query I rowsort label-3394
SELECT DISTINCT + cor0.col2 + + ( cor0.col0 ) / col1 FROM tab2 AS cor0
----
27
42

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) * col0 * 58 + + col2 FROM tab2 AS cor0
----
-10935
-117598
-174078

query I rowsort
SELECT + col0 * + col0 + - col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT + 13 + - col2 AS col0 FROM tab2 AS cor0
----
-13
-14
-25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3399
SELECT DISTINCT CAST( NULL AS DECIMAL ) + col1 / col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3399
SELECT DISTINCT CAST ( NULL AS REAL ) + col1 / col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col1 * - 46 AS col2 FROM tab0
----
3956
4186
4462

query I rowsort
SELECT col0 * ( col1 ) AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ( + 26 + + col1 ) * - 3 * - col1 AS col2 FROM tab0
----
28896
31941
35793

query I rowsort
SELECT + ( + col2 ) + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT ( + col1 * + col2 ) + ( - col2 ) FROM tab1
----
1152
1350
513

query I rowsort
SELECT DISTINCT tab0.col0 + + 97 * + col1 FROM tab0
----
8366
8916
9444

query I rowsort
SELECT DISTINCT col2 * col1 + - col0 AS col2 FROM tab2
----
1456
567
830

query I rowsort
SELECT - 29 * - col0 + tab0.col0 FROM tab0
----
1050
2670
720

query I rowsort
SELECT - ( - 37 ) AS col0 FROM tab2 AS cor0
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col2 ) + + col1 col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + 31 + cor1.col0 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 0c97a5965620a9351ac92cda8712ad1b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 28 col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
28

query I rowsort
SELECT 55 AS col1 FROM tab1
----
55
55
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-3413
SELECT col2 DIV tab2.col0 col2 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3413
SELECT col2 / tab2.col0 col2 FROM tab2
----
0
0
3

query I rowsort
SELECT + 89 AS col0 FROM tab1
----
89
89
89

query I rowsort
SELECT cor0.col1 * + col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 16 * col0 - col2 col0 FROM tab0
----
1342
351
559

query I rowsort
SELECT DISTINCT - ( col0 ) * tab1.col2 - - 38 * + col0 AS col0 FROM tab1
----
-1216
-4640
-48

query I rowsort
SELECT ALL col1 + + col0 * - col1 - - col1 FROM tab1
----
-1014
-26
-620

query I rowsort
SELECT ALL 67 + col2 - - col1 * + col0 FROM tab2
----
1448
311
4695

query I rowsort
SELECT ALL col1 - col2 * + col2 AS col2 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + col1 + col2 * col1 * + tab1.col2 FROM tab1
----
119821
32500
75842

query I rowsort
SELECT tab2.col0 + ( + col0 ) AS col1 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + col0 * ( col1 ) + - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - cor0.col0 * cor0.col1 + + col2 + - col1 * col0 AS col1 FROM tab1 AS cor0
----
-102
-1223
-1984

query I rowsort
SELECT + - col1 - - 88 FROM tab0 AS cor0
----
-3
-9
2

query I rowsort
SELECT ALL cor0.col2 + 55 * col0 AS col1 FROM tab1 AS cor0
----
219
3577
4496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3428
SELECT - col1 + + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3428
SELECT - col1 + + CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( cor0.col2 ) col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT - col0 + col2 * - col0 * - col2 FROM tab1 AS cor0
----
207872
737200
8745

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + cor0.col1 + col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT DISTINCT + - 52 FROM tab0 cor0
----
-52

query I rowsort
SELECT ALL - col0 * - col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + col1 + - col2 * - 82 AS col0 FROM tab0 AS cor0
----
179
2792
6815

query I rowsort
SELECT ALL - 9 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT 83 + - col2 AS col2 FROM tab2 AS cor0
----
45
56
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3439
SELECT - + 76 + col0 DIV + col0 FROM tab1 AS cor0
----
-75
-75
-75

skipif mysql # not compatible
query I rowsort label-3439
SELECT - + 76 + col0 / + col0 FROM tab1 AS cor0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT - 26 * col2 FROM tab0 AS cor0
----
-2132
-26
-858

query I rowsort
SELECT ALL - 28 + col0 AS col0 FROM tab1 AS cor0
----
-25
36
52

query I rowsort
SELECT tab0.col1 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL 9 + col2 FROM tab0
----
10
42
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + cor0.col1 * ( 28 ) FROM tab2 AS cor0
----
1652
476
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + - col0 + 49 * - col1 AS col2 FROM tab0 cor0
----
-4238
-4548
-4788

query I rowsort
SELECT ALL - col0 + - col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col2 * - col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col2 * col0 + 21 * col0 * col0 AS col2 FROM tab0
----
12888
173639
25760

query I rowsort
SELECT 72 + col2 FROM tab0
----
105
154
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3453
SELECT + tab1.col2 + + col0 * CAST( col0 AS SIGNED ) AS col1 FROM tab1
----
4153
63
6496

skipif mysql # not compatible
query I rowsort label-3453
SELECT + tab1.col2 + + col0 * CAST ( col0 AS INTEGER ) AS col1 FROM tab1
----
4153
63
6496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col1 FROM tab1
----
89
89
89

query I rowsort
SELECT DISTINCT - 54 + + col2 AS col0 FROM tab2
----
-16
-27
-28

query I rowsort
SELECT ALL ( + col2 ) + - cor0.col2 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3457
SELECT DISTINCT ( - 82 ) * + col2 - 28 DIV + 93 FROM tab2 AS cor0
----
-2132
-2214
-3116

skipif mysql # not compatible
query I rowsort label-3457
SELECT DISTINCT ( - 82 ) * + col2 - 28 / + 93 FROM tab2 AS cor0
----
-2132
-2214
-3116

onlyif mysql # use DIV operator for integer division
query I rowsort label-3458
SELECT DISTINCT - col0 DIV + 11 FROM tab1 AS cor0
----
-5
-7
0

skipif mysql # not compatible
query I rowsort label-3458
SELECT DISTINCT - col0 / + 11 FROM tab1 AS cor0
----
-5
-7
0

query I rowsort
SELECT ALL 80 * + col2 AS col0 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT DISTINCT + ( + col1 ) * cor0.col0 + - 47 AS col0 FROM tab0 cor0
----
2017
3348
8052

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 + + col2 col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-3462
SELECT DISTINCT CAST( - col2 AS SIGNED ) + col1 DIV + 20 AS col0 FROM tab0 cor0
----
-29
-78
3

skipif mysql # not compatible
query I rowsort label-3462
SELECT DISTINCT CAST ( - col2 AS INTEGER ) + col1 / + 20 AS col0 FROM tab0 cor0
----
-29
-78
3

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 * - col0 AS col2 FROM tab0 cor0
----
-118825
-49536
-720811

query I rowsort
SELECT + 55 FROM tab0 AS cor0
----
55
55
55

query I rowsort
SELECT ALL - - ( + 97 ) + col1 AS col1 FROM tab0 AS cor0
----
183
188
194

query I rowsort
SELECT ALL + cor0.col0 + 88 AS col0 FROM tab0 cor0
----
112
123
177

query I rowsort
SELECT col0 - 73 * - col1 AS col0 FROM tab0
----
6302
6732
7116

onlyif mysql # use DIV operator for integer division
query I rowsort label-3468
SELECT ALL - col0 * 0 DIV 28 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3468
SELECT ALL - col0 * 0 / 28 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3469
SELECT - col0 + col1 * 31 DIV - tab0.col1 FROM tab0
----
-120
-55
-66

skipif mysql # not compatible
query I rowsort label-3469
SELECT - col0 + col1 * 31 / - tab0.col1 FROM tab0
----
-120
-55
-66

query I rowsort
SELECT ALL + col2 * 17 AS col0 FROM tab0
----
1394
17
561

query I rowsort
SELECT ALL + 51 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT DISTINCT + 21 + 76 FROM tab2
----
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3473
SELECT - CAST( NULL AS SIGNED ) / - col2 col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3473
SELECT - CAST ( NULL AS INTEGER ) / - col2 col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT DISTINCT 76 FROM tab2, tab0 AS cor0
----
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3476
SELECT DISTINCT - CAST( NULL AS SIGNED ) * cor0.col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3476
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL 40 AS col0 FROM tab2 cor0
----
40
40
40

query I rowsort
SELECT ( cor0.col0 ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + 93 FROM tab1 AS cor0
----
93
93
93

query I rowsort
SELECT + + col1 * - col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - + col2 + ( - col0 ) FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( 79 ) col0 FROM tab0 AS cor0
----
-79

query I rowsort
SELECT + 68 - + cor0.col1 * col1 FROM tab2 AS cor0
----
-221
-3413
-893

query I rowsort
SELECT ALL + - col0 + ( cor0.col1 ) AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - col1 + - col0 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT 47 * - col1 * - cor0.col2 + + col1 * + col2 FROM tab0 AS cor0
----
136224
358176
4656

query I rowsort
SELECT + ( col2 ) * col1 * - ( 29 ) AS col0 FROM tab1 AS cor0
----
-16530
-36192
-40716

query I rowsort
SELECT ALL col0 + - col1 + col2 FROM tab0
----
-29
-61
80

query I rowsort
SELECT cor0.col1 + - col2 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT cor0.col1 * - col2 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3491
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3491
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3492
SELECT ALL 80 + - 24 * col1 DIV - ( + col1 ) AS col2 FROM tab2 AS cor0
----
104
104
104

skipif mysql # not compatible
query I rowsort label-3492
SELECT ALL 80 + - 24 * col1 / - ( + col1 ) AS col2 FROM tab2 AS cor0
----
104
104
104

query I rowsort
SELECT + 24 FROM tab1, tab1 cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT ALL + ( col2 ) AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT + cor0.col0 - col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - ( + col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab2 AS cor0
----
58

query I rowsort
SELECT DISTINCT - 89 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3499
SELECT + 48 + - col0 DIV + 60 + - cor0.col1 col0 FROM tab0 AS cor0
----
-38
-44
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3499
SELECT + 48 + - col0 / + 60 + - cor0.col1 col0 FROM tab0 AS cor0
----
-38
-44
-49

query I rowsort
SELECT DISTINCT 21 AS col1 FROM tab1 AS cor0
----
21

query I rowsort
SELECT - col1 + cor0.col1 + ( col1 ) * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - + 78 * - col1 FROM tab2 AS cor0
----
1326
2418
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3503
SELECT DISTINCT + - ( col1 ) DIV - col0 AS col2 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-3503
SELECT DISTINCT + - ( col1 ) / - col0 AS col2 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT - 13 * col1 + 21 FROM tab2 AS cor0
----
-200
-382
-746

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 cor1, tab1 cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT DISTINCT + - col2 + 29 * + ( col2 ) * 58 AS col2 FROM tab1 AS cor0
----
161376
90774
95817

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3507
SELECT + cor0.col1 * + CAST( NULL AS SIGNED ) * col1 + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3507
SELECT + cor0.col1 * + CAST ( NULL AS INTEGER ) * col1 + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col0 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col0 - - cor0.col2 AS col2 FROM tab0 cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - col0 * + col0 + cor0.col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT - + col2 + - col0 + + 20 * col0 * - col0 FROM tab2 AS cor0
----
-1014
-121784
-124937

query I rowsort
SELECT ALL - col2 + - col2 AS col0 FROM tab1 AS cor0
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL - - col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL col0 * cor0.col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 11 * col1 col1 FROM tab2 AS cor0
----
-187
-341
-649

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3518
SELECT ALL + CAST( - 19 AS SIGNED ) * col0 AS col2 FROM tab1 cor0
----
-1216
-1520
-57

skipif mysql # not compatible
query I rowsort label-3518
SELECT ALL + CAST ( - 19 AS INTEGER ) * col0 AS col2 FROM tab1 cor0
----
-1216
-1520
-57

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
75

query I rowsort
SELECT cor0.col2 * + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - - ( - ( - col1 ) ) AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL + - 67 * + 89 FROM tab2 AS cor0
----
-5963
-5963
-5963

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - 45 FROM tab1 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - ( col1 ) * col0 * - 41 AS col0 FROM tab2 AS cor0
----
188682
55063
8897

query I rowsort
SELECT col1 + - col1 * - col1 FROM tab0 AS cor0
----
7482
8372
9506

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab1, tab2 AS cor1
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT - 2 AS col0 FROM tab1
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 col0 FROM tab1 AS cor0
----
87
87
87

query I rowsort
SELECT DISTINCT + + 98 * col2 FROM tab0 cor0
----
3234
8036
98

query I rowsort
SELECT ALL 59 * + col0 + - col2 FROM tab0 AS cor0
----
1383
2064
5169

query I rowsort
SELECT - 41 + - col2 AS col2 FROM tab2 AS cor0
----
-67
-68
-79

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT - cor0.col1 + col2 * col2 FROM tab2 AS cor0
----
1427
617
698

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT - col1 DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3535
SELECT - col1 / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - col2 + ( + col1 ) FROM tab1
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3538
SELECT - + col0 DIV 95 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3538
SELECT - + col0 / 95 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 88 * col2 * col2 AS col1 FROM tab0 cor0
----
591712
88
95832

query I rowsort
SELECT DISTINCT - - col1 + cor0.col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 41 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT - + 54 * + ( cor0.col2 * + 50 ) - + col0 AS col2 FROM tab0 AS cor0
----
-221489
-2735
-89124

query I rowsort
SELECT + - cor0.col1 + - 84 AS col0 FROM tab0 AS cor0
----
-170
-175
-181

query I rowsort
SELECT DISTINCT + col1 + ( - col0 + + col1 ) FROM tab2
----
-45
40
55

query I rowsort
SELECT - 48 + - col0 AS col1 FROM tab2 AS cor0
----
-126
-127
-55

query I rowsort
SELECT ALL cor0.col1 * - 29 FROM tab0, tab2 AS cor0
----
9 values hashing to 628e8369e5b01a0d3caff9d142959bf0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3548
SELECT + - col1 + col0 DIV + col0 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-3548
SELECT + - col1 + col0 / + col0 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT DISTINCT col2 + - col1 * + col2 * col1 AS col2 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT ALL + tab2.col0 + + tab2.col1 * - col1 FROM tab2
----
-210
-3403
-954

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3551
SELECT DISTINCT - ( + col2 ) * - tab1.col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3551
SELECT DISTINCT - ( + col2 ) * - tab1.col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3552
SELECT - cor0.col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3552
SELECT - cor0.col1 / - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT + - 83 + - col0 FROM tab0 AS cor0
----
-107
-118
-172

query I rowsort
SELECT + 28 * + col1 FROM tab1 AS cor0
----
280
364
728

query I rowsort
SELECT ( col0 * - col2 ) AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + 59 AS col2 FROM tab0
----
59
59
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3557
SELECT - col0 DIV 22 AS col2 FROM tab1
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-3557
SELECT - col0 / 22 AS col2 FROM tab1
----
-2
-3
0

query I rowsort
SELECT - ( col1 ) * col0 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ( col2 ) * tab1.col0 + + ( 98 ) AS col1 FROM tab1
----
260
3746
7778

onlyif mysql # use DIV operator for integer division
query I rowsort label-3560
SELECT col1 DIV col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3560
SELECT col1 / col2 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT - ( col2 * col2 ) AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - 15 FROM tab2, tab1 AS cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3563
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3563
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0, tab2 AS cor1
----
NULL

query I rowsort
SELECT ALL - col2 + + col2 * 30 AS col2 FROM tab2 AS cor0
----
1102
754
783

onlyif mysql # use DIV operator for integer division
query I rowsort label-3565
SELECT ALL col0 DIV col1 FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3565
SELECT ALL col0 / col1 FROM tab1 cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * - col1 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 19 * + col1 AS col2 FROM tab0 AS cor0
----
1634
1729
1843

onlyif mysql # use DIV operator for integer division
query I rowsort label-3568
SELECT col2 + cor0.col1 DIV - col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-3568
SELECT col2 + cor0.col1 / - col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT DISTINCT cor0.col2 + col0 * + 85 FROM tab1 cor0
----
309
5497
6896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3570
SELECT ALL + CAST( tab1.col2 AS SIGNED ) * col1 AS col2 FROM tab1
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-3570
SELECT ALL + CAST ( tab1.col2 AS INTEGER ) * col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + + col2 + 63 FROM tab1 AS cor0
----
117
120
159

query I rowsort
SELECT ALL 35 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT ALL 58 AS col2 FROM tab2
----
58
58
58

query I rowsort
SELECT - col2 * - col2 * + 77 FROM tab1
----
224532
250173
709632

query I rowsort
SELECT DISTINCT 82 FROM tab2, tab0, tab1 AS cor0
----
82

query I rowsort
SELECT ALL - col0 + + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col0 * col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - 11 FROM tab2 AS cor0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT - + 22 + - col2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-2050
-211
-3024

query I rowsort
SELECT + 86 * cor1.col1 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c045b929704da57e6873edc24133755e

query I rowsort
SELECT + 65 AS col2 FROM tab2
----
65
65
65

query I rowsort
SELECT DISTINCT - 52 * col0 AS col0 FROM tab1
----
-156
-3328
-4160

query I rowsort
SELECT + - 79 FROM tab0 AS cor0
----
-79
-79
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3584
SELECT - CAST( + col2 AS SIGNED ) + + col1 AS col0 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-3584
SELECT - CAST ( + col2 AS INTEGER ) + + col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT col1 + + 90 AS col0 FROM tab0
----
176
181
187

query I rowsort
SELECT ALL + col0 + - 30 + 95 AS col0 FROM tab1
----
129
145
68

query I rowsort
SELECT ALL cor1.col1 * + cor0.col2 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 6eca0fdf700a988d88ac850bac7633ab

query I rowsort
SELECT ALL - - cor0.col2 + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL col0 + + tab1.col2 + col1 * col1 FROM tab1
----
221
345
733

query I rowsort
SELECT ALL + col0 + 61 FROM tab1
----
125
141
64

query I rowsort
SELECT + col1 + 87 FROM tab1
----
100
113
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3592
SELECT tab0.col1 + - col0 DIV - col1 + + col1 * + col0 AS col2 FROM tab0
----
2150
3492
8190

skipif mysql # not compatible
query I rowsort label-3592
SELECT tab0.col1 + - col0 / - col1 + + col1 * + col0 AS col2 FROM tab0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-3593
SELECT DISTINCT + cor0.col1 DIV + cor0.col1 - cor0.col2 * - col2 col2 FROM tab2 AS cor0
----
1445
677
730

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3593
SELECT DISTINCT + cor0.col1 / + cor0.col1 - cor0.col2 * - col2 col2 FROM tab2 AS cor0
----
1445
677
730

query I rowsort
SELECT + col0 * - ( 86 ) - - col1 FROM tab0 AS cor0
----
-1978
-2913
-7563

query I rowsort
SELECT ALL + col2 * + col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT - col1 + - col2 + + col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - col1 * - col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3598
SELECT ALL + ( cor0.col0 ) DIV col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3598
SELECT ALL + ( cor0.col0 ) / col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL - ( - col2 ) + - col1 * col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT - cor0.col2 * 81 FROM tab1 AS cor0
----
-4374
-4617
-7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 46 * cor0.col1 col0 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT ALL - col0 + + cor0.col2 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) * col1 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col1 * col1 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-636056
-753571
-912673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + ( + col1 ) ) * cor0.col1 col2 FROM tab1 cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-3606
SELECT col2 + col0 + - col2 DIV 77 col2 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3606
SELECT col2 + col0 + - col2 / 77 col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT ( ( - col2 ) ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - - col2 + + 46 * + col1 FROM tab0 AS cor0
----
3989
4268
4463

query I rowsort
SELECT col2 * - 31 * col1 + 15 AS col2 FROM tab1 AS cor0
----
-17655
-38673
-43509

query I rowsort
SELECT ALL - 21 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to cdcb40c9e1bb9a33ce9167a0d2bac0b1

query I rowsort
SELECT - col2 + + 23 * + col2 - - col2 AS col2 FROM tab1
----
1242
1311
2208

query I rowsort
SELECT ALL + col1 - + ( col0 ) FROM tab0
----
2
62
62

query I rowsort
SELECT ALL - 62 * col1 AS col2 FROM tab1 AS cor0
----
-1612
-620
-806

query I rowsort
SELECT DISTINCT ( + col0 ) * - col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - 25 AS col0 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT ALL - col2 * col2 - + 80 AS col1 FROM tab1
----
-2996
-3329
-9296

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3617
SELECT ALL - col0 + col0 * + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
0
7209
768

skipif mysql # not compatible
query I rowsort label-3617
SELECT ALL - col0 + col0 * + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT + 16 + + col2 FROM tab2 cor0
----
42
43
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + cor0.col0 col1 FROM tab0 cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col1 ) col0 FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3621
SELECT DISTINCT + col1 DIV col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3621
SELECT DISTINCT + col1 / col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT + col2 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col1 * col0 + + col2 * col0 AS col1 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT ALL + + ( col1 ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - col0 + + col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 93 col1 FROM tab0 AS cor0
----
93
93
93

query I rowsort
SELECT ALL + 22 - + col0 FROM tab2 AS cor0
----
-56
-57
15

query I rowsort
SELECT DISTINCT + 24 * col1 AS col1 FROM tab0 AS cor0
----
2064
2184
2328

onlyif mysql # use DIV operator for integer division
query I rowsort label-3629
SELECT ALL col1 DIV col2 + ( - col0 ) FROM tab0 AS cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-3629
SELECT ALL col1 / col2 + ( - col0 ) FROM tab0 AS cor0
----
-22
-88
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
10
13
26

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab2, tab1 AS cor1
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query I rowsort
SELECT col1 + + cor0.col0 AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT + col0 * + 22 AS col1 FROM tab2 AS cor0
----
154
1716
1738

query I rowsort
SELECT ALL cor0.col0 * - cor0.col1 + col1 * col1 FROM tab0 AS cor0
----
182
5332
6014

query I rowsort
SELECT + 94 * - tab2.col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 98ada519d5f7121a5e3c34b5f5e0db77

query I rowsort
SELECT ALL 11 * col1 * + col2 FROM tab2
----
16874
7106
9207

query I rowsort
SELECT DISTINCT - col1 * + col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - 90 AS col2 FROM tab0
----
-90
-90
-90

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 cor1, tab2 AS cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT 32 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT + col2 + 55 FROM tab2
----
81
82
93

query I rowsort
SELECT ALL + - col1 + - col0 * col2 * col0 AS col2 FROM tab0 cor0
----
-1322
-19094
-649613

query I rowsort
SELECT DISTINCT + col2 * - 59 FROM tab1 AS cor0
----
-3186
-3363
-5664

query I rowsort
SELECT - cor0.col1 * + col2 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3646
SELECT ALL - col2 * + CAST( 70 + cor0.col1 AS SIGNED ) FROM tab2 AS cor0
----
-2727
-3306
-3354

skipif mysql # not compatible
query I rowsort label-3646
SELECT ALL - col2 * + CAST ( 70 + cor0.col1 AS INTEGER ) FROM tab2 AS cor0
----
-2727
-3306
-3354

query I rowsort
SELECT DISTINCT + col2 * ( col1 ) - + col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3648
SELECT DISTINCT col0 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3648
SELECT DISTINCT col0 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT ALL - col2 + col2 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 * - 84 + - col2 AS col1 FROM tab0 AS cor0
----
-7257
-7726
-8149

query I rowsort
SELECT - cor0.col2 * + col1 + col1 * col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 + + col2 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT - col0 + 78 * col1 FROM tab1
----
2025
716
934

query I rowsort
SELECT DISTINCT + 89 * col0 AS col0 FROM tab1 AS cor0
----
267
5696
7120

query I rowsort
SELECT - - 41 + col0 * - col2 FROM tab0 AS cor0
----
-7257
-751
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3656
SELECT ALL + CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3656
SELECT ALL + CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + 25 AS col1 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT + - 93 * col0 AS col0 FROM tab2 AS cor0
----
-651
-7254
-7347

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - + ( + col1 ) * + 37 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT - + 72 + col2 * + 33 FROM tab0 AS cor0
----
-39
1017
2634

query I rowsort
SELECT ALL + 59 * tab2.col0 FROM tab2
----
413
4602
4661

query I rowsort
SELECT DISTINCT + - ( col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + - ( - col2 ) + 15 AS col0 FROM tab1 AS cor0
----
111
69
72

query I rowsort
SELECT ALL + 92 + col1 AS col2 FROM tab0 AS cor0
----
178
183
189

query I rowsort
SELECT 43 * - col0 * col0 AS col1 FROM tab2 AS cor0
----
-2107
-261612
-268363

query I rowsort
SELECT DISTINCT + 94 * cor0.col2 FROM tab1 AS cor0
----
5076
5358
9024

query I rowsort
SELECT ALL + + 29 + + col1 FROM tab0 AS cor0
----
115
120
126

query I rowsort
SELECT - col2 * + cor0.col0 + col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - - col1 * col2 + + col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + + col1 + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3672
SELECT + 99 + col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3672
SELECT + 99 + col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( col2 ) * tab0.col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ( col1 * + tab1.col0 + col1 ) FROM tab1
----
104
1053
650

query I rowsort
SELECT 16 * + col1 AS col2 FROM tab2
----
272
496
944

query I rowsort
SELECT - 2 AS col2 FROM tab0
----
-2
-2
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 29 * cor0.col1 * + col0 col0 FROM tab2 AS cor0
----
-133458
-38947
-6293

query I rowsort
SELECT - col0 * col1 + 45 * + col2 FROM tab1 AS cor0
----
1925
2352
3280

query I rowsort
SELECT ALL 17 * + cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cf2c17a44041120e507fcd265ec5deea

query I rowsort
SELECT + tab2.col1 * + cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a499c3357b32340ea4100b46ab6f11f6

query I rowsort
SELECT - - col0 * ( col2 ) FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3682
SELECT col0 DIV ( - col2 ) AS col1 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-3682
SELECT col0 / ( - col2 ) AS col1 FROM tab0 AS cor0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + 96 col1 FROM tab2 cor0
----
103
174
175

query I rowsort
SELECT - col0 * - ( col0 ) FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3685
SELECT CAST( NULL AS SIGNED ) / - col2 - - col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3685
SELECT CAST ( NULL AS INTEGER ) / - col2 - - col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

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-3687
SELECT col0 DIV + 37 AS col1 FROM tab2 AS cor0
----
0
2
2

skipif mysql # not compatible
query I rowsort label-3687
SELECT col0 / + 37 AS col1 FROM tab2 AS cor0
----
0
2
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3688
SELECT ALL - CAST( NULL AS DECIMAL ) FROM tab0, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3688
SELECT ALL - CAST ( NULL AS REAL ) FROM tab0, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

onlyif mysql # use DIV operator for integer division
query I rowsort label-3689
SELECT - 46 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3689
SELECT - 46 / col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3690
SELECT CAST( col1 AS SIGNED ) * + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-3690
SELECT CAST ( col1 AS INTEGER ) * + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - 32 * col1 AS col0 FROM tab2
----
-1888
-544
-992

query I rowsort
SELECT ALL - 63 * col0 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-472
-4973
-4994

query I rowsort
SELECT ( col0 ) * col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3694
SELECT ALL + CAST( - col2 AS SIGNED ) + + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-3694
SELECT ALL + CAST ( - col2 AS INTEGER ) + + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - ( - 7 ) * - col2 - 40 FROM tab2 AS cor0
----
-222
-229
-306

query I rowsort
SELECT + - 90 * col2 AS col1 FROM tab2 AS cor0
----
-2340
-2430
-3420

query I rowsort
SELECT - - 97 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT ( - 45 ) FROM tab2 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT - 83 + - col2 * col0 FROM tab0 AS cor0
----
-118
-7381
-875

query I rowsort
SELECT - + col2 AS col2 FROM tab1 cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3701
SELECT + ( col0 ) + + col2 * col1 DIV col1 + - col0 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3701
SELECT + ( col0 ) + + col2 * col1 / col1 + - col0 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT 57 * cor0.col2 FROM tab2 AS cor0
----
1482
1539
2166

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3703
SELECT ALL + col1 + col0 * CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-3703
SELECT ALL + col1 + col0 * CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3704
SELECT ALL - CAST( - col0 AS SIGNED ) AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3704
SELECT ALL - CAST ( - col0 AS INTEGER ) AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL 18 * - col2 FROM tab2 AS cor0
----
-468
-486
-684

query I rowsort
SELECT ALL cor0.col1 * - 35 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 6080e370f86ce7edde8c44797e4affff

query I rowsort
SELECT + col0 * col1 + 68 * col2 + - col0 AS col2 FROM tab0 cor0
----
13586
3428
4284

query I rowsort
SELECT + - 23 + - 15 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT + col2 * + ( 12 ) AS col0 FROM tab1 cor0
----
1152
648
684

query I rowsort
SELECT - - col0 * 8 FROM tab0 AS cor0
----
192
280
712

query I rowsort
SELECT 65 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT - + col1 * + col2 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3713
SELECT - - col1 + col0 * col1 DIV col0 AS col2 FROM tab1 cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-3713
SELECT - - col1 + col0 * col1 / col0 AS col2 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT DISTINCT col0 + - 2 AS col0 FROM tab0 cor0
----
22
33
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + - col2 - + col1 col1 FROM tab1 cor0
----
-29
-3
-77

query I rowsort
SELECT + col1 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 97b43fbe79eecd0bc6921392403b666d

query I rowsort
SELECT DISTINCT - 61 AS col0 FROM tab2 AS cor0
----
-61

query I rowsort
SELECT ALL + 50 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT + 37 AS col0 FROM tab2, tab2 AS cor0, tab0 cor1
----
37

query I rowsort
SELECT DISTINCT - + cor0.col1 + + 88 FROM tab2 cor0
----
29
57
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + + col0 * + col0 col2 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-3723
SELECT ALL col1 DIV - cor0.col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3723
SELECT ALL col1 / - cor0.col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT ALL - col0 * col2 * + col2 AS col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT col2 + + tab1.col1 * + 70 AS col2 FROM tab1
----
1006
1874
757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col2 col0 FROM tab0
----
171
36
57

query I rowsort
SELECT + col0 - col0 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3728
SELECT cor0.col0 * cor0.col2 DIV col1 col1 FROM tab1 AS cor0
----
364
590
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3728
SELECT cor0.col0 * cor0.col2 / col1 col1 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT - col0 FROM tab1 cor0 WHERE NULL <> col0
----

query I rowsort
SELECT tab1.col1 FROM tab2 AS cor0 CROSS JOIN tab1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT tab1.col1 * tab1.col0 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT - col2 + + col1 AS col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL tab0.col0 * col2 AS col2 FROM tab0
----
35
7298
792

query III rowsort
SELECT * FROM tab2 WHERE NOT ( - col1 + col0 * - col0 ) NOT IN ( col0 )
----

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-3736
SELECT ALL col1 + col1 * - col2 DIV - col2 - - tab0.col0 AS col0 FROM tab0
----
196
229
271

skipif mysql # not compatible
query I rowsort label-3736
SELECT ALL col1 + col1 * - col2 / - col2 - - tab0.col0 AS col0 FROM tab0
----
196
229
271

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL NOT IN ( - col1 + + col0 )
----

query I rowsort
SELECT DISTINCT - col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col0 * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3740
SELECT ALL col1 DIV + col1 - col2 AS col2 FROM tab1 cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-3740
SELECT ALL col1 / + col1 - col2 AS col2 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT col0 * + tab0.col0 + col2 FROM tab0
----
1226
609
8003

query I rowsort
SELECT DISTINCT + col2 + col2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT - col1 * + col0 + tab0.col1 AS col1 FROM tab0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-3744
SELECT DISTINCT - col1 * tab0.col2 + + tab0.col0 DIV - col1 + + col2 DIV col1 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-3744
SELECT DISTINCT - col1 * tab0.col2 + + tab0.col0 / - col1 + + col2 / col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - col2 * col1 + - col0 + - col2 * + col0 FROM tab0
----
-14849
-167
-3654

query I rowsort
SELECT DISTINCT + col2 * col2 + - col1 AS col2 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT DISTINCT col0 + + col2 * - col0 AS col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT - col2 + - col0 * col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT + col0 * col2 + - col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT col1 + - col1 * + col1 * col2 AS col1 FROM tab2 AS cor0
----
-10965
-25916
-90447

onlyif mysql # use DIV operator for integer division
query I rowsort label-3751
SELECT col2 DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3751
SELECT col2 / - col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3752
SELECT ALL - col2 DIV col0 AS col1 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3752
SELECT ALL - col2 / col0 AS col1 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT + - cor0.col0 * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col1 * col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col0 * + cor0.col2 + + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col0 FROM tab2 cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 - col1 col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + - col2 + + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + - col1 + col1 * - col2 FROM tab0 AS cor0
----
-194
-2924
-7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3761
SELECT DISTINCT col2 + - col0 DIV col0 - col2 FROM tab0 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3761
SELECT DISTINCT col2 + - col0 / col0 - col2 FROM tab0 cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3762
SELECT ALL - col2 DIV col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3762
SELECT ALL - col2 / col0 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3763
SELECT - col1 DIV col2 - col1 FROM tab0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-3763
SELECT - col1 / col2 - col1 FROM tab0
----
-194
-88
-92

query I rowsort
SELECT ALL col0 + - col1 + - col0 * - col2 FROM tab2
----
165
2047
3064

onlyif mysql # use DIV operator for integer division
query I rowsort label-3765
SELECT DISTINCT col0 DIV - cor0.col0 col2 FROM tab2 cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3765
SELECT DISTINCT col0 / - cor0.col0 col2 FROM tab2 cor0
----
-1

query I rowsort
SELECT DISTINCT + - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL + col0 + + cor0.col0 * + col1 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT col0 * cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT DISTINCT + col0 * + cor0.col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + 77 AS col2 FROM tab0
----
77
77
77

query I rowsort
SELECT ALL + col2 * + col0 * col0 AS col0 FROM tab1
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-3773
SELECT - col2 DIV + col2 + ( - 33 ) AS col0 FROM tab1 AS cor0
----
-34
-34
-34

skipif mysql # not compatible
query I rowsort label-3773
SELECT - col2 / + col2 + ( - 33 ) AS col0 FROM tab1 AS cor0
----
-34
-34
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-3774
SELECT DISTINCT + col1 DIV - col0 AS col2 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-3774
SELECT DISTINCT + col1 / - col0 AS col2 FROM tab1 AS cor0
----
-8
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT ALL - ( col0 ) * - ( + 63 ) AS col1 FROM tab1 AS cor0
----
189
4032
5040

query I rowsort
SELECT 0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - + 81 + + col1 AS col1 FROM tab2 AS cor0
----
-22
-50
-64

query I rowsort
SELECT col2 * col0 AS col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + - col1 * 16 FROM tab2 AS cor0
----
-272
-496
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3782
SELECT - cor0.col2 DIV 58 col0 FROM tab1 cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3782
SELECT - cor0.col2 / 58 col0 FROM tab1 cor0
----
-1
0
0

query I rowsort
SELECT col2 * cor0.col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - cor0.col1 * col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL cor1.col0 * 88 AS col1 FROM tab0, tab2, tab1 AS cor0, tab0 AS cor1
----
81 values hashing to 30b12406ad9fe62435d4d79bcbe0ae21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col2 FROM tab0
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3787
SELECT tab2.col2 DIV tab2.col1 + col2 AS col1 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-3787
SELECT tab2.col2 / tab2.col1 + col2 AS col1 FROM tab2
----
26
27
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-3788
SELECT ALL + col1 DIV - col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3788
SELECT ALL + col1 / - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT col0 + tab2.col0 + col2 * + tab2.col2 AS col0 FROM tab2
----
1602
743
832

query I rowsort
SELECT + col1 - + col1 AS col0 FROM tab2
----
0
0
0

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3792
SELECT ALL + col1 DIV col0 col2 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3792
SELECT ALL + col1 / col0 col2 FROM tab2
----
0
0
4

query I rowsort
SELECT tab0.col2 * - col0 + + col1 AS col0 FROM tab0
----
-706
-7207
62

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( + col0 * + tab2.col1 )
----

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col1 FROM tab0
----
2838
7462
97

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL NOT IN ( + col2 )
----

query I rowsort
SELECT - col2 AS col1 FROM tab1 WHERE NOT NULL IN ( - col1 + - col1 )
----

query I rowsort
SELECT DISTINCT col1 * tab2.col1 * - tab2.col2 + col2 - - col1 FROM tab2
----
-10927
-25889
-90421

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - col0 * col2 - col0 IN ( - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3800
SELECT DISTINCT + col1 * tab1.col2 DIV col1 AS col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3800
SELECT DISTINCT + col1 * tab1.col2 / col1 AS col2 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3801
SELECT + col2 * - col1 DIV col1 AS col0 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3801
SELECT + col2 * - col1 / col1 AS col0 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3802
SELECT DISTINCT + col2 DIV - tab2.col0 col0 FROM tab2
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3802
SELECT DISTINCT + col2 / - tab2.col0 col0 FROM tab2
----
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3803
SELECT ALL - col0 DIV + col1 AS col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-3803
SELECT ALL - col0 / + col1 AS col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT - col0 * tab1.col0 * col0 FROM tab1
----
-262144
-27
-512000

onlyif mysql # use DIV operator for integer division
query I rowsort label-3805
SELECT ALL tab2.col0 DIV + col1 + - col1 * + col1 - - col1 * tab2.col2 * + col2 FROM tab2
----
21638
24263
36404

skipif mysql # not compatible
query I rowsort label-3805
SELECT ALL tab2.col0 / + col1 + - col1 * + col1 - - col1 * tab2.col2 * + col2 FROM tab2
----
21638
24263
36404

query I rowsort
SELECT DISTINCT - col0 * + col1 + col1 * col1 * + col0 FROM tab0
----
175440
325920
728910

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL IN ( col1 / + col1 )
----

query I rowsort
SELECT col1 * + tab0.col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 * - col1 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT tab2.col0 * - col0 * col0 AS col0 FROM tab2
----
-343
-474552
-493039

query I rowsort
SELECT DISTINCT + col1 FROM tab2 WHERE NOT NULL IN ( col0 )
----

query I rowsort
SELECT ALL + col0 * - col0 AS col1 FROM tab0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 * col0 + + col2 * - col2 col0 FROM tab0
----
1375
3394
975

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col2 + col2 * col0 FROM tab2 WHERE NOT col1 + col0 + col1 NOT BETWEEN col0 AND NULL
----

query I rowsort
SELECT + - col0 + + col1 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT col1 + + tab1.col0 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL col1 * col1 * + col1 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL + col1 - - col1 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT - col0 FROM tab1 WHERE NOT NULL BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3821
SELECT ALL col0 DIV tab0.col2 - col2 FROM tab0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-3821
SELECT ALL col0 / tab0.col2 - col2 FROM tab0
----
-33
-81
34

query I rowsort
SELECT col1 * + tab2.col0 + tab2.col0 * col2 FROM tab2
----
406
4345
6630

query I rowsort
SELECT + col1 + + col0 * - col0 AS col0 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT col0 * col2 + col1 AS col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT - col2 * + col1 + - col2 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT + - col0 * + 44 AS col1 FROM tab0 AS cor0
----
-1056
-1540
-3916

onlyif mysql # use DIV operator for integer division
query I rowsort label-3827
SELECT col2 DIV + col2 - cor0.col0 * col2 col1 FROM tab1 cor0
----
-161
-3647
-7679

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3827
SELECT col2 / + col2 - cor0.col0 * col2 col1 FROM tab1 cor0
----
-161
-3647
-7679

query I rowsort
SELECT - 14 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT ALL + 8 FROM tab0
----
8
8
8

query I rowsort
SELECT ALL col0 * - col0 * col0 FROM tab0
----
-13824
-42875
-704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT col1 * 68 FROM tab0 AS cor0
----
5848
6188
6596

query I rowsort
SELECT DISTINCT - 71 AS col1 FROM tab1 AS cor0
----
-71

query I rowsort
SELECT DISTINCT + 56 FROM tab1, tab1 cor0
----
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3835
SELECT ALL + - CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-3835
SELECT ALL + - CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3836
SELECT col2 * col2 DIV + col1 AS col1 FROM tab0
----
0
12
73

skipif mysql # not compatible
query I rowsort label-3836
SELECT col2 * col2 / + col1 AS col1 FROM tab0
----
0
12
73

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) FROM tab0, tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 81 col1 FROM tab1
----
81
81
81

query I rowsort
SELECT - - 38 FROM tab2 AS cor0
----
38
38
38

query I rowsort
SELECT DISTINCT + ( - ( tab1.col0 ) ) FROM tab1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT 69 AS col1 FROM tab0
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 48 col0 FROM tab1
----
48
48
48

query I rowsort
SELECT DISTINCT 20 AS col1 FROM tab2
----
20

query I rowsort
SELECT + 17 + - cor0.col2 FROM tab0 AS cor0
----
-16
-65
16

query I rowsort
SELECT - + 55 + col1 * col0 FROM tab1 AS cor0
----
23
585
985

query I rowsort
SELECT 5 * - 29 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to c79967bbfe31387e6d92241fdf1b18ff

query I rowsort
SELECT + col0 * cor0.col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + 75 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

onlyif mysql # use DIV operator for integer division
query I rowsort label-3850
SELECT ALL + cor0.col0 DIV - 47 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3850
SELECT ALL + cor0.col0 / - 47 FROM tab2 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3851
SELECT - - col0 DIV + ( + 22 ) AS col1 FROM tab0 cor0
----
1
1
4

skipif mysql # not compatible
query I rowsort label-3851
SELECT - - col0 / + ( + 22 ) AS col1 FROM tab0 cor0
----
1
1
4

query I rowsort
SELECT ALL col1 + + ( + 91 ) AS col1 FROM tab2 AS cor0
----
108
122
150

query I rowsort
SELECT ALL + col2 * + col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 95de14c88adc44eda4adb5267fe9ebd1

query I rowsort
SELECT DISTINCT + + cor0.col2 FROM tab1, tab0, tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 60 * col2 + - col1 + col1 col1 FROM tab2 AS cor0
----
1560
1620
2280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 + 39 + col2 * - col1 col0 FROM tab0
----
-2713
-7332
39

query I rowsort
SELECT 42 + - tab0.col2 FROM tab0
----
-40
41
9

query I rowsort
SELECT ALL - ( + 28 ) + col2 FROM tab2 AS cor0
----
-1
-2
10

query I rowsort
SELECT 33 AS col2 FROM tab2 AS cor0
----
33
33
33

query I rowsort
SELECT ( col2 ) * - col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + 12 FROM tab1 AS cor0
----
12

query I rowsort
SELECT - cor0.col2 * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col2 * - col0 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3865
SELECT + - cor0.col2 + + col2 DIV ( 50 ) AS col0 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3865
SELECT + - cor0.col2 + + col2 / ( 50 ) AS col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + + col1 + cor0.col1 * col1 AS col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL + ( 62 ) FROM tab2
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col0 col0 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 16 col0 FROM tab0
----
16
16
16

query I rowsort
SELECT ALL 16 + col2 FROM tab2 cor0
----
42
43
54

query I rowsort
SELECT - col0 + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT col0 * tab2.col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT - ( 71 ) AS col1 FROM tab2, tab0, tab1 AS cor0
----
-71

query I rowsort
SELECT ALL + cor1.col0 * + cor1.col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 24e20ca2b8a28088cc71698417e1f489

query I rowsort
SELECT + 6 AS col0 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT - cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3877
SELECT ALL 31 + + cor0.col2 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
31
32
49

skipif mysql # not compatible
query I rowsort label-3877
SELECT ALL 31 + + cor0.col2 / cor0.col0 AS col2 FROM tab1 AS cor0
----
31
32
49

query I rowsort
SELECT ALL + cor0.col0 + - col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL - + 10 * - col1 + + cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
1170
338
740

query I rowsort
SELECT ALL + - ( col2 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - 30 * col1 FROM tab0 AS cor0
----
-2580
-2730
-2910

query I rowsort
SELECT DISTINCT + + ( 30 ) + - col2 AS col0 FROM tab1 AS cor0
----
-24
-27
-66

query I rowsort
SELECT DISTINCT - 83 * col0 + - col1 FROM tab0 AS cor0
----
-2078
-3002
-7478

query I rowsort
SELECT + col2 * 55 + tab0.col0 FROM tab0
----
1839
4599
90

query I rowsort
SELECT + ( - cor1.col0 ) FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + 28 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT - 26 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT 81 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3889
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3889
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0
----
NULL

query I rowsort
SELECT ( tab1.col2 ) * col0 * + col1 + + 70 AS col0 FROM tab1
----
36550
4282
99910

query I rowsort
SELECT DISTINCT + 62 FROM tab0
----
62

query I rowsort
SELECT - ( + col2 ) + + tab2.col1 FROM tab2
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3893
SELECT DISTINCT CAST( NULL AS DECIMAL ) * col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3893
SELECT DISTINCT CAST ( NULL AS REAL ) * col1 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT col2 * - col1 + cor0.col0 * + cor0.col0 FROM tab1 AS cor0
----
-1395
3526
5152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * - col2 + + col2 * col0 col1 FROM tab2 AS cor0
----
-648
2356
494

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3896
SELECT ALL CAST( ( - col1 ) AS SIGNED ) col2 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3896
SELECT ALL CAST ( ( - col1 ) AS INTEGER ) col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL tab0.col1 - col2 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL + col2 + ( cor0.col0 ) * - col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL col2 * + 9 FROM tab0 AS cor0
----
297
738
9

query I rowsort
SELECT ALL - col1 * 22 - 13 FROM tab0 AS cor0
----
-1905
-2015
-2147

query I rowsort
SELECT col0 * - 87 + col0 AS col2 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT ALL - col0 - col1 * 43 FROM tab0
----
-3722
-4002
-4206

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 + col0 col0 FROM tab0
----
105
159
94

query I rowsort
SELECT + 85 * + tab2.col2 FROM tab2
----
2210
2295
3230

query I rowsort
SELECT ALL tab2.col0 + col1 * 69 FROM tab2
----
1252
2146
4149

query I rowsort
SELECT 86 - col2 AS col0 FROM tab2
----
48
59
60

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col0 FROM tab0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col2 + 91 col2 FROM tab0 AS cor0
----
-6633
-998
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3909
SELECT col0 * - 61 + col1 DIV + col1 col2 FROM tab0 cor0
----
-1463
-2134
-5428

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3909
SELECT col0 * - 61 + col1 / + col1 col2 FROM tab0 cor0
----
-1463
-2134
-5428

query I rowsort
SELECT - col1 * col0 + - col2 + col2 * + col1 * + col0 FROM tab2 AS cor0
----
115024
49653
5615

query I rowsort
SELECT DISTINCT - + col1 * + col1 * col1 AS col0 FROM tab1 cor0
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-3912
SELECT ALL cor0.col0 DIV + col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3912
SELECT ALL cor0.col0 / + col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - col0 * + ( - col0 ) FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT col2 + - col2 AS col1 FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * col1 + col0 * - col1 + + 15 col2 FROM tab2 AS cor0
----
-1039
-1106
759

query I rowsort
SELECT + - col1 + - ( col2 ) FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL - col2 * + 91 * col1 AS col1 FROM tab0 AS cor0
----
-258258
-679042
-8827

query I rowsort
SELECT - col2 + - col1 + 70 AS col0 FROM tab2 AS cor0
----
-15
12
15

query I rowsort
SELECT col0 * + col0 * + tab2.col1 AS col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + col1 * - tab1.col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT col0 + - ( col0 ) FROM tab1
----
0

query I rowsort
SELECT col1 * + ( + col2 * - col2 + + col2 * col2 ) AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - col0 * col1 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + tab2.col0 * - col0 AS col0 FROM tab2
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3925
SELECT - - col2 - - CAST( + cor0.col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-3925
SELECT - - col2 - - CAST ( + cor0.col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3926
SELECT DISTINCT + cor0.col1 + + 51 + 85 DIV col2 FROM tab0 AS cor0
----
139
143
233

skipif mysql # not compatible
query I rowsort label-3926
SELECT DISTINCT + cor0.col1 + + 51 + 85 / col2 FROM tab0 AS cor0
----
139
143
233

query I rowsort
SELECT ALL + col0 * 38 + 88 FROM tab2 cor0
----
3052
3090
354

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL col2 * - ( col2 ) FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col0 * col0 * col1 FROM tab1 AS cor0
----
234
40960
83200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3931
SELECT - CAST( cor0.col1 AS SIGNED ) + cor0.col1 FROM tab0, tab2 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-3931
SELECT - CAST ( cor0.col1 AS INTEGER ) + cor0.col1 FROM tab0, tab2 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3935
SELECT ALL - + ( + 55 ) DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-55
0

skipif mysql # not compatible
query I rowsort label-3935
SELECT ALL - + ( + 55 ) / col2 AS col2 FROM tab0 AS cor0
----
-1
-55
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3936
SELECT CAST( + col0 AS SIGNED ) + - col2 * + col2 FROM tab0 AS cor0
----
-1065
-6635
34

skipif mysql # not compatible
query I rowsort label-3936
SELECT CAST ( + col0 AS INTEGER ) + - col2 * + col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT - + col1 * - col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - col2 + col2 * col0 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3939
SELECT DISTINCT - + CAST( col2 AS SIGNED ) * col2 + + 53 FROM tab0 AS cor0
----
-1036
-6671
52

skipif mysql # not compatible
query I rowsort label-3939
SELECT DISTINCT - + CAST ( col2 AS INTEGER ) * col2 + + 53 FROM tab0 AS cor0
----
-1036
-6671
52

query I rowsort
SELECT ALL - + ( 97 ) * + col1 AS col1 FROM tab2 AS cor0
----
-1649
-3007
-5723

query I rowsort
SELECT + 62 + col0 AS col2 FROM tab0 AS cor0
----
151
86
97

query I rowsort
SELECT ALL - col0 + + cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT - col2 + tab1.col1 + tab1.col2 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3944
SELECT col0 + - CAST( NULL AS SIGNED ) * + tab2.col0 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3944
SELECT col0 + - CAST ( NULL AS INTEGER ) * + tab2.col0 AS col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3945
SELECT DISTINCT col0 DIV - col1 + - col1 col2 FROM tab1
----
-16
-19
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3945
SELECT DISTINCT col0 / - col1 + - col1 col2 FROM tab1
----
-16
-19
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3946
SELECT + - 18 DIV col1 AS col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3946
SELECT + - 18 / col1 AS col2 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT + cor0.col1 * 17 + + col2 * 25 + - ( + col0 ) * - cor0.col1 FROM tab2 AS cor0
----
1419
2582
6255

query I rowsort
SELECT 22 + 18 FROM tab0 AS cor0
----
40
40
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-3949
SELECT col0 DIV + 11 AS col1 FROM tab1 cor0
----
0
5
7

skipif mysql # not compatible
query I rowsort label-3949
SELECT col0 / + 11 AS col1 FROM tab1 cor0
----
0
5
7

query I rowsort
SELECT DISTINCT + + col1 * col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - - 64 * col2 + + 50 * - 13 AS col1 FROM tab0 cor0
----
-586
1462
4598

query I rowsort
SELECT DISTINCT - col1 + + col2 * col1 AS col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL - col1 * col1 + - ( 46 + + col2 * - col2 ) AS col2 FROM tab0 cor0
----
-1603
-6353
-9454

query I rowsort
SELECT DISTINCT 23 FROM tab0 AS cor0
----
23

query I rowsort
SELECT + col1 + col2 * - ( - cor0.col1 ) FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3956
SELECT CAST( col0 * - col1 AS SIGNED ) FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-3956
SELECT CAST ( col0 * - col1 AS INTEGER ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + col2 + + col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT cor0.col0 + cor0.col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3959
SELECT ALL col1 DIV cor0.col2 + + 67 + - col1 * - col1 AS col0 FROM tab1 AS cor0
----
167
236
743

skipif mysql # not compatible
query I rowsort label-3959
SELECT ALL col1 / cor0.col2 + + 67 + - col1 * - col1 AS col0 FROM tab1 AS cor0
----
167
236
743

query I rowsort
SELECT ALL + col1 * - col2 * - ( col1 ) AS col0 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT - col1 + + col2 * + col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT col1 + col1 * col2 + col2 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
-3068
-6419
1268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + 56 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT ALL + 7 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab2, tab1 AS cor1
----
972 values hashing to 4c46de5c1773124597e14f3b372fc4ea

query I rowsort
SELECT + tab2.col1 - col2 FROM tab2
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3968
SELECT - CAST( col1 AS SIGNED ) + + col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3968
SELECT - CAST ( col1 AS INTEGER ) + + col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + cor1.col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT cor0.col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col2 + - 12 FROM tab0 AS cor0
----
-11
21
70

query I rowsort
SELECT + 69 FROM tab0, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT ( - col1 ) * col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col2 * + cor0.col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT - + cor0.col1 + - cor0.col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT - 43 + + col1 * ( 89 ) AS col0 FROM tab2 AS cor0
----
1470
2716
5208

query I rowsort
SELECT DISTINCT 79 * col1 AS col1 FROM tab2 cor0
----
1343
2449
4661

query I rowsort
SELECT - 14 * - col0 AS col1 FROM tab0 AS cor0
----
1246
336
490

query I rowsort
SELECT - 37 * col2 AS col0 FROM tab0 AS cor0
----
-1221
-3034
-37

query I rowsort
SELECT - col0 + col0 * + ( col0 + col2 ) * - 98 FROM tab2 cor0
----
-23331
-795054
-905893

query I rowsort
SELECT - - col1 + + col2 * - col0 AS col2 FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT - 33 + col1 * col1 AS col0 FROM tab2 AS cor0
----
256
3448
928

query I rowsort
SELECT 1 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3984
SELECT ALL - - col0 + - col2 DIV 76 AS col2 FROM tab0 AS cor0
----
24
35
88

skipif mysql # not compatible
query I rowsort label-3984
SELECT ALL - - col0 + - col2 / 76 AS col2 FROM tab0 AS cor0
----
24
35
88

query I rowsort
SELECT ALL + 18 FROM tab0 AS cor0
----
18
18
18

query I rowsort
SELECT + col1 + col2 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT ALL - 45 * - col0 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT + col1 + - col2 AS col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + col0 + - ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3990
SELECT col2 + CAST( col0 AS SIGNED ) * col1 AS col1 FROM tab2 AS cor0
----
1381
244
4628

skipif mysql # not compatible
query I rowsort label-3990
SELECT col2 + CAST ( col0 AS INTEGER ) * col1 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT + col0 * 73 FROM tab1 cor0
----
219
4672
5840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - ( ( col0 ) ) col1 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT col1 + - ( + col1 ) * col2 AS col0 FROM tab2 cor0
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3994
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3994
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col2 + col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT - col0 + - 6 FROM tab1 AS cor0
----
-70
-86
-9

query I rowsort
SELECT col0 * col0 + - col1 FROM tab0 cor0
----
1128
490
7830

query I rowsort
SELECT - cor0.col0 * + col0 + - col0 FROM tab0 cor0
----
-1260
-600
-8010

query I rowsort
SELECT - cor0.col0 * + col0 + - col2 * + col1 AS col2 FROM tab2 AS cor0
----
-6887
-7618
-886

query I rowsort
SELECT ALL + + col2 * - 45 FROM tab0 AS cor0
----
-1485
-3690
-45

query I rowsort
SELECT DISTINCT + col2 + - col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - cor0.col0 + + col1 * col0 AS col2 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT + - 27 + - col0 * - col0 FROM tab2 AS cor0
----
22
6057
6214

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4004
SELECT DISTINCT CAST( col2 AS SIGNED ) + col1 FROM tab0 cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-4004
SELECT DISTINCT CAST ( col2 AS INTEGER ) + col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT - col0 + col1 * + col2 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL + ( ( + col0 ) ) * col0 AS col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT - col0 * col2 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + cor0.col1 * + col1 + col1 + + 48 AS col1 FROM tab1 AS cor0
----
158
230
750

query I rowsort
SELECT DISTINCT - cor0.col1 + 90 AS col1 FROM tab1 AS cor0
----
64
77
80

query I rowsort
SELECT ALL 64 FROM tab2 AS cor0
----
64
64
64

query I rowsort
SELECT ALL + col0 + col2 + col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT col2 - - cor0.col1 * col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + - col1 * + 20 AS col2 FROM tab1 AS cor0
----
-200
-260
-520

query I rowsort
SELECT + 14 AS col1 FROM tab2 AS cor0
----
14
14
14

query I rowsort
SELECT DISTINCT + 75 AS col2 FROM tab1 AS cor0
----
75

query I rowsort
SELECT ALL - + 36 * - 76 + col0 * + col2 AS col2 FROM tab1 AS cor0
----
10416
2898
6384

onlyif mysql # use DIV operator for integer division
query I rowsort label-4017
SELECT ALL - col2 DIV col2 - col2 FROM tab1
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4017
SELECT ALL - col2 / col2 - col2 FROM tab1
----
-55
-58
-97

query I rowsort
SELECT - col0 + 85 + col0 AS col0 FROM tab2
----
85
85
85

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2, tab1 AS cor0, tab2 cor1
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4020
SELECT DISTINCT - 17 * col0 * + col2 + + col0 DIV col1 FROM tab1 AS cor0
----
-130554
-2754
-62010

skipif mysql # not compatible
query I rowsort label-4020
SELECT DISTINCT - 17 * col0 * + col2 + + col0 / col1 FROM tab1 AS cor0
----
-130554
-2754
-62010

query I rowsort
SELECT - col2 + + col2 * cor0.col0 FROM tab1 AS cor0
----
108
3591
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * + col1 + col2 col0 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4023
SELECT ALL CAST( NULL AS SIGNED ) * + col2 + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4023
SELECT ALL CAST ( NULL AS INTEGER ) * + col2 + - col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 48 + + col1 FROM tab0
----
134
139
145

query I rowsort
SELECT ALL + 77 + - col0 FROM tab2
----
-1
-2
70

query I rowsort
SELECT + + 80 * col2 AS col0 FROM tab2 cor0
----
2080
2160
3040

query I rowsort
SELECT ALL + - col0 + + col2 * ( col2 ) AS col1 FROM tab1 AS cor0
----
2913
3185
9136

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1, tab0 cor1
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

onlyif mysql # use DIV operator for integer division
query I rowsort label-4029
SELECT ALL + col0 * - 14 + col0 - 71 DIV col1 col1 FROM tab1 cor0
----
-1045
-41
-839

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4029
SELECT ALL + col0 * - 14 + col0 - 71 / col1 col1 FROM tab1 cor0
----
-1045
-41
-839

query I rowsort
SELECT ALL + col2 * col1 + + col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT ALL + col2 + cor0.col0 * + ( col0 ) AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL - + cor0.col2 + - cor0.col2 * col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT col0 * + col1 + col1 AS col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT col2 - + tab0.col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT + ( col2 * - col1 ) FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + col0 * + col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT col0 * - col2 + - col2 * - col1 * + col2 AS col0 FROM tab1
----
112128
28842
75654

query I rowsort
SELECT col0 * + ( - tab0.col2 ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ( - tab2.col0 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT + col0 * col0 * 48 FROM tab1
----
196608
307200
432

query I rowsort
SELECT - col0 * - col2 - 51 * col0 FROM tab1 AS cor0
----
3600
384
9

query I rowsort
SELECT ALL tab2.col2 * col1 + 5 AS col0 FROM tab2
----
1539
651
842

query I rowsort
SELECT DISTINCT - col1 + - col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT + col2 * + 49 FROM tab0 cor0
----
1617
4018
49

query I rowsort
SELECT ALL - - col0 + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + ( + col1 ) FROM tab2 cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4047
SELECT - col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4047
SELECT - col2 / - col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - 93 AS col1 FROM tab1 AS cor0
----
-93
-93
-93

query I rowsort
SELECT ALL + cor0.col2 + col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT col2 + + col0 * - col2 * 55 + col1 AS col2 FROM tab0 AS cor0
----
-1827
-401217
-43441

query I rowsort
SELECT ALL - 78 FROM tab0 cor0
----
-78
-78
-78

query I rowsort
SELECT - - col0 - - col0 AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT + - col2 * - col0 * + col0 + - 11 * col1 FROM tab0 AS cor0
----
158
18062
648521

onlyif mysql # use DIV operator for integer division
query I rowsort label-4055
SELECT DISTINCT cor0.col1 DIV - col1 + ( + cor0.col0 ) FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-4055
SELECT DISTINCT cor0.col1 / - col1 + ( + cor0.col0 ) FROM tab2 AS cor0
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - col2 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4057
SELECT - - col1 DIV - col1 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4057
SELECT - - col1 / - col1 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + 15 * - col1 AS col2 FROM tab1 AS cor0
----
-150
-195
-390

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 16 * col0 col1 FROM tab2 AS cor0
----
112
1248
1264

query I rowsort
SELECT DISTINCT + col0 * col2 * col1 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4061
SELECT - col0 + + col1 DIV + col2 + - 69 AS col1 FROM tab0 AS cor0
----
-157
-7
-91

skipif mysql # not compatible
query I rowsort label-4061
SELECT - col0 + + col1 / + col2 + - 69 AS col1 FROM tab0 AS cor0
----
-157
-7
-91

query I rowsort
SELECT ALL col0 * cor0.col1 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL + - col2 + col2 * 65 AS col0 FROM tab1 AS cor0
----
3456
3648
6144

query I rowsort
SELECT + - cor0.col2 + col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - cor0.col2 + - ( 60 + col1 ) * col1 * - cor0.col2 FROM tab0 cor0
----
1126680
15228
414315

query I rowsort
SELECT DISTINCT - col2 + col0 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT ( 44 ) AS col2 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT ALL - tab0.col1 * - col2 * - tab0.col2 + col2 + col0 AS col1 FROM tab0
----
-61
-611713
-93597

query I rowsort
SELECT DISTINCT ( cor0.col1 ) + cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
118
34
48
62
76
90

query I rowsort
SELECT ALL - col0 * 93 + col1 AS col2 FROM tab2 cor0
----
-620
-7195
-7330

query I rowsort
SELECT ALL - col0 + + ( - col0 ) * 73 AS col1 FROM tab2 cor0
----
-518
-5772
-5846

query I rowsort
SELECT DISTINCT - + 74 AS col1 FROM tab2 AS cor0
----
-74

query I rowsort
SELECT ALL + col2 - ( cor0.col0 ) FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL - 21 + col2 FROM tab0 AS cor0
----
-20
12
61

query I rowsort
SELECT DISTINCT + ( col2 ) * - col1 + - 68 FROM tab1 AS cor0
----
-1316
-1472
-638

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - 74 - - col1 col1 FROM tab2 AS cor0
----
-136
-50
-93

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab0, tab0 cor0, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - ( - col1 ) * col2 + + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL + col1 + col2 + tab2.col1 FROM tab2
----
144
72
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4080
SELECT col2 + col1 DIV ( 86 + col0 ) col1 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4080
SELECT col2 + col1 / ( 86 + col0 ) col1 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - + 84 + col0 AS col1 FROM tab0 AS cor0
----
-49
-60
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4082
SELECT DISTINCT col2 DIV + 15 - col1 * col2 FROM tab2
----
-1533
-644
-836

skipif mysql # not compatible
query I rowsort label-4082
SELECT DISTINCT col2 / + 15 - col1 * col2 FROM tab2
----
-1533
-644
-836

query I rowsort
SELECT - 29 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4084
SELECT ALL + CAST( 31 AS SIGNED ) FROM tab1
----
31
31
31

skipif mysql # not compatible
query I rowsort label-4084
SELECT ALL + CAST ( 31 AS INTEGER ) FROM tab1
----
31
31
31

query I rowsort
SELECT DISTINCT + 77 AS col0 FROM tab0, tab2 AS cor0, tab1, tab2 AS cor1
----
77

query I rowsort
SELECT - ( - col1 ) * + col1 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT 38 * - col0 AS col0 FROM tab2
----
-266
-2964
-3002

query I rowsort
SELECT 79 - - col2 FROM tab1 AS cor0
----
133
136
175

query I rowsort
SELECT + col2 + + col1 * 66 AS col1 FROM tab1 AS cor0
----
1770
717
954

query I rowsort
SELECT ( - col0 ) * col1 - cor0.col2 AS col0 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL - 84 FROM tab2
----
-84
-84
-84

query I rowsort
SELECT ALL col2 * 15 AS col2 FROM tab1
----
1440
810
855

query I rowsort
SELECT DISTINCT col1 * ( 91 ) * col0 FROM tab0
----
187824
308945
737009

query I rowsort
SELECT + col0 + - 69 FROM tab1
----
-5
-66
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + 47 col0 FROM tab2 cor0
----
329
3666
3713

query I rowsort
SELECT 32 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4099
SELECT - col0 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4099
SELECT - col0 / cor0.col0 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col2 col1 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + 75 col1 FROM tab0
----
2475
6150
75

query I rowsort
SELECT ALL - - 87 * + 75 + - col1 FROM tab1 AS cor0
----
6499
6512
6515

query I rowsort
SELECT ALL + col0 + 0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col0 - + col0 AS col0 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4105
SELECT ALL - + CAST( col0 AS SIGNED ) AS col0 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4105
SELECT ALL - + CAST ( col0 AS INTEGER ) AS col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - col2 - - col2 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL - 53 * col2 AS col0 FROM tab0 AS cor0
----
-1749
-4346
-53

query I rowsort
SELECT DISTINCT + ( 39 ) * col1 + + col1 + + col2 * + col2 AS col2 FROM tab2 AS cor0
----
1969
2124
3036

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4109
SELECT - + CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4109
SELECT - + CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + col1 + 57 * col2 FROM tab1 AS cor0
----
3104
3259
5485

query I rowsort
SELECT col0 * - col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - 72 AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4114
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4114
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 51 AS col1 FROM tab1
----
51
51
51

query I rowsort
SELECT - tab2.col1 - col1 * col0 AS col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT ALL col0 * - col1 * - col1 + - 53 + + tab0.col2 AS col2 FROM tab0
----
177484
329263
737038

query I rowsort
SELECT ALL - 13 AS col1 FROM tab2
----
-13
-13
-13

query I rowsort
SELECT ALL - 6 * col0 FROM tab0
----
-144
-210
-534

query I rowsort
SELECT DISTINCT col0 + tab1.col2 * + col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - + col2 * + 23 FROM tab0 cor0
----
-1886
-23
-759

query I rowsort
SELECT - col1 + ( - ( cor0.col1 ) + col1 ) * + col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + col0 * + col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL cor0.col0 + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + cor0.col2 * + 50 FROM tab1 AS cor0
----
2700
2850
4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col2 * + col1 col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT col1 + + 35 FROM tab1 AS cor0
----
45
48
61

query I rowsort
SELECT DISTINCT + col2 + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - col2 * + col1 * col1 AS col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT col1 + - col0 * cor0.col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4131
SELECT + col2 + - CAST( NULL AS SIGNED ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4131
SELECT + col2 + - CAST ( NULL AS INTEGER ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor1.col2 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4133
SELECT ALL + 74 DIV + 11 FROM tab0
----
6
6
6

skipif mysql # not compatible
query I rowsort label-4133
SELECT ALL + 74 / + 11 FROM tab0
----
6
6
6

query I rowsort
SELECT ALL + 68 AS col0 FROM tab2, tab0 AS cor0, tab1, tab0 cor1
----
81 values hashing to 7ff6433dda3248dce73040b2c590f3da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - 46 + + col0 * col1 col1 FROM tab1 AS cor0
----
216
3584
4720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - col0 col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT - cor0.col1 - - col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ( col2 ) * cor0.col0 + + cor0.col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - - 92 + col0 * col1 FROM tab1 AS cor0
----
1132
170
732

query I rowsort
SELECT + 31 - ( col2 ) * col2 AS col1 FROM tab2 AS cor0
----
-1413
-645
-698

query I rowsort
SELECT 25 * + col2 FROM tab2 AS cor0
----
650
675
950

query I rowsort
SELECT - ( col2 ) * col1 - 40 * col1 AS col2 FROM tab2 AS cor0
----
-1326
-2077
-3894

onlyif mysql # use DIV operator for integer division
query I rowsort label-4143
SELECT - 82 + col2 DIV col2 AS col0 FROM tab0 AS cor0
----
-81
-81
-81

skipif mysql # not compatible
query I rowsort label-4143
SELECT - 82 + col2 / col2 AS col0 FROM tab0 AS cor0
----
-81
-81
-81

query I rowsort
SELECT - 93 FROM tab2 AS cor0
----
-93
-93
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col0 + - col0 col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col0 col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT col0 * tab1.col1 * col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT + 41 * col1 + col0 FROM tab2 AS cor0
----
1278
2497
776

query I rowsort
SELECT - col2 + col0 - + col2 AS col0 FROM tab2 AS cor0
----
-47
26
3

query I rowsort
SELECT ALL + col2 * col0 + col1 AS col2 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT ALL - - cor0.col2 + col1 * + cor0.col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL + 9 + - col2 FROM tab0 AS cor0
----
-24
-73
8

query I rowsort
SELECT + col2 * col0 + + tab2.col1 - + col1 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4154
SELECT + - col2 DIV col2 + col0 * col2 + col0 col1 FROM tab1 AS cor0
----
164
3711
7759

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4154
SELECT + - col2 / col2 + col0 * col2 + col0 col1 FROM tab1 AS cor0
----
164
3711
7759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - col2 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 + + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + - cor0.col2 * - col2 + + cor0.col2 - col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT col2 + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + + col0 + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - col1 + col2 + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-1322
-221
-4635

onlyif mysql # use DIV operator for integer division
query I rowsort label-4161
SELECT + ( col0 ) DIV col2 AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4161
SELECT + ( col0 ) / col2 AS col0 FROM tab1
----
0
0
1

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col1 + + cor0.col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col2 + + cor0.col1 * cor0.col1 * cor0.col0 FROM tab1 AS cor0
----
13424
1974
6343

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 col0 * col0 - + col2 AS col1 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL - + col0 * cor0.col1 * - col0 + - col0 * - col1 + col0 FROM tab0 AS cor0
----
122255
51624
728999

query I rowsort
SELECT + + col1 * - col0 * + cor0.col1 + + col2 * col0 FROM tab1 AS cor0
----
-1866
-2752
-5840

query I rowsort
SELECT col2 + cor0.col2 * col0 * + col2 FROM tab2 AS cor0
----
114114
5130
52754

query I rowsort
SELECT DISTINCT col2 * cor0.col1 + + col0 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT col1 * - col1 * + col2 AS col1 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT - col1 + + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col0 + col0 * + tab2.col1 + col2 AS col2 FROM tab2
----
1460
251
4706

onlyif mysql # use DIV operator for integer division
query I rowsort label-4173
SELECT - 27 DIV - col0 AS col1 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4173
SELECT - 27 / - col0 AS col1 FROM tab0
----
0
0
1

query I rowsort
SELECT DISTINCT + col0 + col0 AS col2 FROM tab0
----
178
48
70

query I rowsort
SELECT + 89 * col2 - + col1 FROM tab2
----
2255
2372
3365

query I rowsort
SELECT DISTINCT tab0.col1 + - tab0.col0 - + col1 * - col1 * - col0 FROM tab0
----
-177442
-329253
-737007

query I rowsort
SELECT - 70 FROM tab0, tab1 AS cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

query I rowsort
SELECT ALL - ( 54 ) + col0 * col0 FROM tab0 AS cor0
----
1171
522
7867

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4179
SELECT ALL + CAST( NULL AS SIGNED ) * - col0 - + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4179
SELECT ALL + CAST ( NULL AS INTEGER ) * - col0 - + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4180
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * 6 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4180
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * 6 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT ( col0 ) + cor0.col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4182
SELECT ALL + CAST( NULL AS DECIMAL ) + 12 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4182
SELECT ALL + CAST ( NULL AS REAL ) + 12 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab2 cor1
----
243 values hashing to d489341cd587fd6eb0b972c5464c6ddc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + col0 * + 81 AS col0 FROM tab0
----
1944
2835
7209

query I rowsort
SELECT ( - col0 ) * tab1.col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - ( 72 ) AS col2 FROM tab0
----
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4188
SELECT - CAST( NULL AS SIGNED ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4188
SELECT - CAST ( NULL AS INTEGER ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 10 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT - 14 FROM tab2
----
-14
-14
-14

query I rowsort
SELECT col2 - col0 * - tab1.col2 * - tab1.col1 FROM tab1
----
-36423
-4158
-99744

query I rowsort
SELECT DISTINCT 50 + tab2.col0 FROM tab2, tab1 AS cor0
----
128
129
57

query I rowsort
SELECT col2 * + ( ( col0 ) ) AS col0 FROM tab2
----
189
2028
3002

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT DISTINCT tab2.col2 + + 29 * 59 * tab2.col1 AS col0 FROM tab2
----
100975
29125
53068

query I rowsort
SELECT ALL - cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT tab0.col1 + col0 + - col0 * col1 FROM tab0
----
-1954
-3263
-7919

query I rowsort
SELECT + col1 + + col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT + col1 + - col0 * + col1 AS col0 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT - col1 * 26 AS col0 FROM tab0 AS cor0
----
-2236
-2366
-2522

query I rowsort
SELECT ALL col1 * col2 + col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + + 90 * - ( col2 ) col1 FROM tab0 AS cor0
----
-2946
-55
-7291

onlyif mysql # use DIV operator for integer division
query I rowsort label-4203
SELECT - col0 DIV cor0.col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4203
SELECT - col0 / cor0.col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4204
SELECT - col2 DIV ( col1 ) AS col2 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4204
SELECT - col2 / ( col1 ) AS col2 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT - 81 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + + col1 + col0 col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4207
SELECT ALL col2 * - CAST( + ( + col0 ) * col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

skipif mysql # not compatible
query I rowsort label-4207
SELECT ALL col2 * - CAST ( + ( + col0 ) * col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT - ( col0 ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col0 + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT col2 * 8 * col0 FROM tab0
----
280
58384
6336

query I rowsort
SELECT ALL + 42 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT DISTINCT col1 * - col0 + + col1 + 17 AS col2 FROM tab0 cor0
----
-1961
-3281
-7991

onlyif mysql # use DIV operator for integer division
query I rowsort label-4213
SELECT col1 DIV ( col0 ) + ( + col0 ) * + col2 + + 97 FROM tab0 AS cor0
----
134
7396
892

skipif mysql # not compatible
query I rowsort label-4213
SELECT col1 / ( col0 ) + ( + col0 ) * + col2 + + 97 FROM tab0 AS cor0
----
134
7396
892

query I rowsort
SELECT DISTINCT col2 - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL - + 72 * col1 FROM tab1 cor0
----
-1872
-720
-936

query I rowsort
SELECT + cor0.col1 * - 81 FROM tab2, tab0 AS cor0
----
9 values hashing to 912b9d807d842959d4cb969da39e7a9e

query I rowsort
SELECT - - 65 + + col2 * + col0 * - 97 AS col1 FROM tab2 AS cor0
----
-18268
-196651
-291129

query I rowsort
SELECT ALL 96 + col1 AS col0 FROM tab0 AS cor0
----
182
187
193

query I rowsort
SELECT DISTINCT - tab1.col0 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT - cor0.col2 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

query I rowsort
SELECT + 95 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT ALL - col0 + col0 + col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 97 - cor0.col1 FROM tab2 AS cor0
----
38
66
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT col0 + - col2 + - col1 * col0 AS col2 FROM tab2 AS cor0
----
-1302
-237
-4550

query I rowsort
SELECT ALL - col0 + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + - 66 + + cor0.col0 FROM tab2 AS cor0
----
-59
12
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col1 + - col0 col2 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT - cor0.col0 * + ( + col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col1 * + col0 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + col1 * + 69 AS col0 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT - - col2 * + col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL - + col1 * col0 + 18 AS col1 FROM tab0 AS cor0
----
-2046
-3377
-8081

query I rowsort
SELECT - col0 * + ( col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col1 + 91 * + col1 AS col0 FROM tab0 cor0
----
7740
8190
8730

query I rowsort
SELECT tab0.col1 * + col2 + + col1 * col1 * + col0 AS col1 FROM tab0
----
180342
329412
744471

query I rowsort
SELECT + 44 FROM tab0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 col2 FROM tab2
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 - col2 col1 FROM tab0
----
-25
24
56

query I rowsort
SELECT DISTINCT 0 FROM tab1
----
0

query I rowsort
SELECT - col2 + - tab1.col0 * ( + col0 ) FROM tab1
----
-4153
-63
-6496

query I rowsort
SELECT - 24 - tab2.col2 * - 66 AS col2 FROM tab2
----
1692
1758
2484

onlyif mysql # use DIV operator for integer division
query I rowsort label-4243
SELECT col2 DIV + tab0.col2 - 44 FROM tab0
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-4243
SELECT col2 / + tab0.col2 - 44 FROM tab0
----
-43
-43
-43

query I rowsort
SELECT ALL col0 * + col0 + - 10 AS col1 FROM tab1 cor0
----
-1
4086
6390

query I rowsort
SELECT ALL + col0 - - 21 FROM tab2 AS cor0
----
100
28
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * 9 + + col0 col0 FROM tab2 AS cor0
----
250
312
421

skipif mysql # not compatible
query I rowsort
SELECT ALL + + col1 * CAST ( 12 AS REAL ) * col1 + + col2 FROM tab2 AS cor0
----
11559
3506
41798

onlyif mysql # use DIV operator for integer division
query I rowsort label-4248
SELECT col1 DIV + col1 + + col0 AS col1 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4248
SELECT col1 / + col1 + + col0 AS col1 FROM tab1
----
4
65
81

query I rowsort
SELECT ALL - col0 * - col2 AS col1 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + tab0.col1 col1 FROM tab0, tab1, tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT 30 FROM tab2 cor0
----
30
30
30

query I rowsort
SELECT - 2 FROM tab1
----
-2
-2
-2

query I rowsort
SELECT + 97 * - 32 AS col2 FROM tab0
----
-3104
-3104
-3104

query I rowsort
SELECT DISTINCT ( col0 ) * col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT ( - 38 ) FROM tab0
----
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT + ( - col2 ) * col2 * tab1.col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT ALL - col2 + + col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - ( col2 + + tab1.col2 ) AS col0 FROM tab1
----
-108
-114
-192

query I rowsort
SELECT ALL ( - col1 ) + col1 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4261
SELECT DISTINCT - col1 DIV + col1 + col1 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-4261
SELECT DISTINCT - col1 / + col1 + col1 FROM tab2
----
16
30
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4262
SELECT ALL - + col2 * col2 * - CAST( - col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-157464
-185193
-884736

skipif mysql # not compatible
query I rowsort label-4262
SELECT ALL - + col2 * col2 * - CAST ( - col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-157464
-185193
-884736

onlyif mysql # use DIV operator for integer division
query I rowsort label-4263
SELECT col1 DIV + col1 + col1 AS col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4263
SELECT col1 / + col1 + col1 AS col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL - col1 * - col0 + + col2 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT ALL + col1 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + - col1 - col0 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT 69 + + col0 AS col1 FROM tab1 AS cor0
----
133
149
72

query I rowsort
SELECT - 41 FROM tab2 cor0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT - col2 * + col1 + 11 AS col1 FROM tab1 AS cor0
----
-1237
-1393
-559

onlyif mysql # use DIV operator for integer division
query I rowsort label-4270
SELECT DISTINCT + + col1 + cor0.col1 DIV - col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4270
SELECT DISTINCT + + col1 + cor0.col1 / - col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + + col2 + col0 * + 14 * col1 FROM tab0 cor0
----
113468
28929
47531

query I rowsort
SELECT DISTINCT + cor0.col1 - + col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL - 60 FROM tab0 AS cor0
----
-60
-60
-60

query I rowsort
SELECT ( - cor0.col1 ) * 37 + col2 AS col1 FROM tab1 AS cor0
----
-313
-385
-908

query I rowsort
SELECT ALL + + col2 * cor0.col0 + ( + col2 * col1 ) AS col1 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL 36 * col2 * + 9 FROM tab1 cor0
----
17496
18468
31104

query I rowsort
SELECT ALL + 34 AS col2 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT - 36 AS col1 FROM tab1 AS cor0
----
-36
-36
-36

query I rowsort
SELECT + + col1 + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + 30 + - col1 AS col0 FROM tab0 AS cor0
----
-56
-61
-67

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT 0 * - col0 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + 21 * tab0.col0 FROM tab0
----
1869
504
735

query I rowsort
SELECT ALL - 68 * + col1 FROM tab2
----
-1156
-2108
-4012

query I rowsort
SELECT ALL col2 + col1 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT col0 + + col2 * ( col2 ) AS col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT - + col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL col1 * - cor0.col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + cor0.col2 * + tab0.col0 AS col2 FROM tab0, tab1, tab2 cor0
----
27 values hashing to 902505fbcf7f17c64fec98cb613bf3ef

query I rowsort
SELECT col0 - - tab2.col2 * ( tab2.col2 ) FROM tab2
----
1523
736
754

query I rowsort
SELECT ALL + 16 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT - + ( col0 ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4295
SELECT ALL 85 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-4295
SELECT ALL 85 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1
-2
-5

query I rowsort
SELECT DISTINCT + ( col1 ) * + col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4297
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 45 * col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4297
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 45 * col0 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4298
SELECT DISTINCT + 83 DIV col0 AS col1 FROM tab1 AS cor0
----
1
27

skipif mysql # not compatible
query I rowsort label-4298
SELECT DISTINCT + 83 / col0 AS col1 FROM tab1 AS cor0
----
1
27

query I rowsort
SELECT ALL + tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - col2 * - 7 AS col1 FROM tab0
----
231
574
7

query I rowsort
SELECT DISTINCT + tab0.col2 * + col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 20 * - cor0.col0 * - cor0.col1 + + col1 FROM tab2 cor0
----
26877
4371
92099

query I rowsort
SELECT - - 4 AS col0 FROM tab1 AS cor0
----
4
4
4

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 ( tab1.col1 * - tab1.col2 ) AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + - 74 * + 78 FROM tab0 cor0
----
-5772
-5772
-5772

query I rowsort
SELECT DISTINCT + 29 AS col1 FROM tab1, tab1 AS cor0
----
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-4308
SELECT DISTINCT col0 DIV + ( col2 ) AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4308
SELECT DISTINCT col0 / + ( col2 ) AS col0 FROM tab1 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4309
SELECT 81 DIV + cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4309
SELECT 81 / + cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * col0 * col1 AS col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT tab0.col0 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL col1 + col0 * col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT 30 - col1 * col2 FROM tab1 AS cor0
----
-1218
-1374
-540

query I rowsort
SELECT ALL + 57 * col1 * - col1 + col0 FROM tab2 AS cor0
----
-16394
-198339
-54770

query I rowsort
SELECT DISTINCT col2 - + col2 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - - col1 * col0 + ( - col0 ) * - col1 AS col1 FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT DISTINCT col0 + - col1 AS col1 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4318
SELECT ALL + - 54 DIV col1 FROM tab1 cor0
----
-2
-4
-5

skipif mysql # not compatible
query I rowsort label-4318
SELECT ALL + - 54 / col1 FROM tab1 cor0
----
-2
-4
-5

query I rowsort
SELECT + 85 * + col0 - col1 AS col1 FROM tab2 cor0
----
564
6571
6698

query I rowsort
SELECT ALL col2 * - tab1.col2 + col0 * + col0 + tab1.col1 FROM tab1
----
-2803
-2881
857

onlyif mysql # use DIV operator for integer division
query I rowsort label-4321
SELECT + col1 DIV col0 + + col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-4321
SELECT + col1 / col0 + + col2 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT DISTINCT + 86 * - cor0.col0 * - 43 FROM tab2 AS cor0
----
25886
288444
292142

query I rowsort
SELECT ALL + col1 * cor0.col0 + + col2 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + 73 * - cor0.col1 + 28 * ( - col1 ) * - CAST ( ( col2 ) AS REAL ) FROM tab0 AS cor0
----
-4365
202293
73186

query I rowsort
SELECT ALL - col0 - + cor0.col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + col0 * + cor0.col2 * col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT ( col1 ) * cor0.col0 * + col2 + col0 * col0 * 51 FROM tab1 AS cor0
----
245376
426240
4671

query I rowsort
SELECT DISTINCT 89 FROM tab0 AS cor0
----
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col0 - ( col1 ) col1 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT - col2 * ( cor0.col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col1 + - 45 AS col0 FROM tab0 AS cor0
----
-131
-136
-142

query I rowsort
SELECT ALL 45 FROM tab1, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4333
SELECT - + col0 * CAST( NULL AS DECIMAL ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4333
SELECT - + col0 * CAST ( NULL AS REAL ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col1 * + ( col0 ) AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col0 + 47 AS col2 FROM tab2 AS cor0
----
-31
-32
40

query I rowsort
SELECT - col1 * col0 + cor0.col1 * col0 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + - col2 * - col2 col2 FROM tab0 AS cor0
----
1122
2
6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 39 col1 FROM tab2 AS cor0
----
-1014
-1053
-1482

onlyif mysql # use DIV operator for integer division
query I rowsort label-4339
SELECT - + col1 DIV + col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4339
SELECT - + col1 / + col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col1 * ( col1 ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - + col1 + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4342
SELECT DISTINCT - col0 + - ( - col1 ) DIV 80 - + col1 FROM tab0 AS cor0
----
-109
-131
-179

skipif mysql # not compatible
query I rowsort label-4342
SELECT DISTINCT - col0 + - ( - col1 ) / 80 - + col1 FROM tab0 AS cor0
----
-109
-131
-179

query I rowsort
SELECT DISTINCT + 71 FROM tab1 cor0
----
71

query I rowsort
SELECT ALL + - ( - col0 ) FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4345
SELECT - - CAST( 28 AS SIGNED ) + col0 AS col2 FROM tab1 AS cor0
----
108
31
92

skipif mysql # not compatible
query I rowsort label-4345
SELECT - - CAST ( 28 AS INTEGER ) + col0 AS col2 FROM tab1 AS cor0
----
108
31
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-4346
SELECT - - 1 DIV - col0 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4346
SELECT - - 1 / - col0 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4347
SELECT DISTINCT - ( col1 ) * col0 DIV - ( cor0.col1 ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4347
SELECT DISTINCT - ( col1 ) * col0 / - ( cor0.col1 ) AS col0 FROM tab0 AS cor0
----
24
35
89

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT col2 + col0 * col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT + col1 * col1 + - col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col2 + - 27 * - 50 FROM tab0 AS cor0
----
1351
1383
1432

query I rowsort
SELECT ALL - + col0 * col2 - - col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - col2 + + col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT + 94 AS col0 FROM tab1
----
94

query I rowsort
SELECT DISTINCT ( + col1 ) AS col0 FROM tab0
----
86
91
97

query I rowsort
SELECT col0 + col2 * + col1 * col2 FROM tab2
----
22606
24627
39962

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab0
----
4

query I rowsort
SELECT DISTINCT - col2 + - tab2.col2 * + 38 FROM tab2
----
-1014
-1053
-1482

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4360
SELECT - col2 + CAST( NULL AS SIGNED ) + col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4360
SELECT - col2 + CAST ( NULL AS INTEGER ) + col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4361
SELECT - CAST( NULL AS SIGNED ) FROM tab1, tab2 cor0, tab0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-4361
SELECT - CAST ( NULL AS INTEGER ) FROM tab1, tab2 cor0, tab0, tab1 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4362
SELECT + col2 * col2 DIV - col2 AS col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4362
SELECT + col2 * col2 / - col2 AS col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL + + cor0.col0 + 52 * col2 FROM tab2 AS cor0
----
1411
1430
2055

query I rowsort
SELECT DISTINCT + col2 * col1 + - ( cor0.col1 * - col0 + col1 ) FROM tab0 cor0
----
15470
3395
4816

query I rowsort
SELECT ALL cor0.col2 - + col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL col1 + ( + col2 ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4367
SELECT DISTINCT col0 * 22 DIV col2 + col2 FROM tab0
----
105
49
771

skipif mysql # not compatible
query I rowsort label-4367
SELECT DISTINCT col0 * 22 / col2 + col2 FROM tab0
----
105
49
771

query I rowsort
SELECT ( ( + col2 ) ) * col1 + 81 AS col1 FROM tab0 AS cor0
----
178
2919
7543

query I rowsort
SELECT ALL - tab0.col0 * + tab0.col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 88 + + cor0.col1 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 56a7db33e96a5fbc12c512f04e63bdff

query I rowsort
SELECT ALL - 85 FROM tab2
----
-85
-85
-85

query I rowsort
SELECT DISTINCT + + col0 * + col1 + + 44 FROM tab1 AS cor0
----
1084
122
684

query I rowsort
SELECT 44 * 72 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 90a3b78e448f4f69c8a4829527e6ecb7

query I rowsort
SELECT + - 8 + cor0.col2 FROM tab0 AS cor0
----
-7
25
74

query I rowsort
SELECT ALL + - col2 * col2 + + 83 FROM tab2 AS cor0
----
-1361
-593
-646

query I rowsort
SELECT ALL + col0 + + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - 47 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to a4d3a02c376c52ddb0a38a801f7b50d5

query I rowsort
SELECT + 88 FROM tab1
----
88
88
88

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT 0 + + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 * - 51 AS col0 FROM tab2 AS cor0
----
-103428
-153102
-9639

query I rowsort
SELECT - + 71 * + col2 AS col1 FROM tab1 AS cor0
----
-3834
-4047
-6816

query I rowsort
SELECT 74 * - col0 + - col1 FROM tab0 AS cor0
----
-1862
-2687
-6677

query I rowsort
SELECT - col1 * 75 FROM tab1 AS cor0
----
-1950
-750
-975

query I rowsort
SELECT + col0 * ( col1 ) AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + + col0 * + 1 * 6 FROM tab2 AS cor0
----
42
468
474

query I rowsort
SELECT - cor0.col0 + - 76 * col1 * - col0 FROM tab1 cor0
----
48576
5925
78960

query I rowsort
SELECT ALL + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL cor0.col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - ( - col1 * col2 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT ( - col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 * - col0 * - col2 + - col0 col0 FROM tab1 AS cor0
----
233418
509
614333

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4393
SELECT + - CAST( col0 AS SIGNED ) col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4393
SELECT + - CAST ( col0 AS INTEGER ) col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col1 + - col1 * - col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col2 + - col2 * col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT + col0 + - tab2.col2 * col1 AS col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT + ( - col0 ) + - col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + 14 * tab0.col0 * col1 FROM tab0
----
113386
28896
47530

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4399
SELECT DISTINCT + CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4399
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT 83 FROM tab1, tab1 cor0
----
83

query I rowsort
SELECT DISTINCT + col0 - - 32 * - col1 AS col2 FROM tab2
----
-1810
-465
-985

query I rowsort
SELECT ALL - - col1 * 30 AS col2 FROM tab2 AS cor0
----
1770
510
930

query I rowsort
SELECT - cor1.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT + cor0.col2 * col1 AS col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col2 * - col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - + col0 + 74 AS col0 FROM tab1 AS cor0
----
-6
10
71

query I rowsort
SELECT + - cor0.col0 * col1 + + col0 + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-10608
-259
-7505

query I rowsort
SELECT DISTINCT col1 * + col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4410
SELECT - col1 + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4410
SELECT - col1 + col0 / col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - col1 + col0 * col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT col0 + - col0 * cor0.col2 FROM tab2 cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL 81 + - col1 AS col1 FROM tab0 AS cor0
----
-10
-16
-5

query I rowsort
SELECT DISTINCT + - col2 * - 51 FROM tab0 AS cor0
----
1683
4182
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-4415
SELECT ALL col1 + - col1 DIV + col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-4415
SELECT ALL col1 + - col1 / + col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT DISTINCT - ( + col2 ) AS col2 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4417
SELECT + - col1 * col0 - + col0 DIV 88 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-4417
SELECT + - col1 * col0 - + col0 / 88 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + 34 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT + tab0.col1 * - 78 + + col2 FROM tab0
----
-6675
-7016
-7565

query I rowsort
SELECT DISTINCT 57 FROM tab1, tab2 AS cor0
----
57

query I rowsort
SELECT DISTINCT tab2.col1 * + ( 19 ) * - col2 FROM tab2
----
-12274
-15903
-29146

query I rowsort
SELECT - col0 * tab2.col0 * col1 AS col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4423
SELECT ALL + col1 DIV ( col0 ) AS col2 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4423
SELECT ALL + col1 / ( col0 ) AS col2 FROM tab0
----
1
2
3

query I rowsort
SELECT - col0 + + col1 * 2 * 84 FROM tab1 AS cor0
----
1616
2104
4365

query I rowsort
SELECT cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + - 57 * col2 AS col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

query I rowsort
SELECT + - 28 FROM tab2 cor0
----
-28
-28
-28

query I rowsort
SELECT DISTINCT - col0 * col0 + - 10 AS col2 FROM tab1 AS cor0
----
-19
-4106
-6410

query I rowsort
SELECT ALL - ( - col1 ) + cor0.col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - ( + 24 * - col2 ) FROM tab2
----
624
648
912

query I rowsort
SELECT DISTINCT + 9 FROM tab0, tab2 AS cor0
----
9

query I rowsort
SELECT ALL 75 AS col1 FROM tab0
----
75
75
75

query I rowsort
SELECT + col2 + - cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL col2 * + 34 AS col1 FROM tab2 AS cor0
----
1292
884
918

query I rowsort
SELECT ALL - col0 * 11 AS col2 FROM tab0 AS cor0
----
-264
-385
-979

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - col1 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 74 + tab0.col1 FROM tab0
----
12
17
23

query I rowsort
SELECT DISTINCT 9 AS col0 FROM tab0, tab2, tab1 AS cor0
----
9

query I rowsort
SELECT DISTINCT + ( col2 ) + + col0 * tab2.col0 AS col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT 4 * col1 AS col0 FROM tab2
----
124
236
68

query I rowsort
SELECT DISTINCT col0 * + tab2.col1 * col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT - 68 * col0 * col1 - - col0 AS col2 FROM tab1
----
-43456
-5301
-70640

query I rowsort
SELECT DISTINCT + 62 * + col1 + + ( + ( col0 ) ) AS col1 FROM tab2
----
1133
1929
3736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - tab2.col1 ) + - 4 col2 FROM tab2
----
13
27
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4446
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4446
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT - 45 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query I rowsort
SELECT + 96 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT ALL - + col1 + cor0.col0 * + 13 FROM tab2 AS cor0
----
1010
60
955

query I rowsort
SELECT DISTINCT - - col0 + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT col2 - col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL - col1 * + ( col1 ) FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - col2 * col0 + - 14 AS col1 FROM tab2 AS cor0
----
-203
-2042
-3016

query I rowsort
SELECT ALL - cor0.col2 + - col0 + 26 * - col0 FROM tab1 AS cor0
----
-135
-1785
-2256

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4455
SELECT - col2 * CAST( 94 * + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-274104
-305406
-866304

skipif mysql # not compatible
query I rowsort label-4455
SELECT - col2 * CAST ( 94 * + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-274104
-305406
-866304

query I rowsort
SELECT ALL + - col2 + 81 FROM tab2 AS cor0
----
43
54
55

query I rowsort
SELECT col0 + - ( + col2 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col1 * + ( col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - cor0.col0 + - col2 * + col0 col1 FROM tab2 AS cor0
----
-169
-2080
-3043

query I rowsort
SELECT DISTINCT col2 - col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + cor0.col1 * 68 + col2 AS col1 FROM tab1 AS cor0
----
1822
737
980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4462
SELECT ALL col2 * - CAST( ( col2 ) * col2 AS SIGNED ) + - cor0.col0 * - cor0.col0 AS col1 FROM tab1 cor0
----
-157455
-181097
-878336

skipif mysql # not compatible
query I rowsort label-4462
SELECT ALL col2 * - CAST ( ( col2 ) * col2 AS INTEGER ) + - cor0.col0 * - cor0.col0 AS col1 FROM tab1 cor0
----
-157455
-181097
-878336

query I rowsort
SELECT ALL + 70 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT col0 + 26 + + col1 AS col2 FROM tab2
----
122
163
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 72 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4466
SELECT DISTINCT - CAST( - 18 AS SIGNED ) + + tab1.col2 FROM tab1
----
114
72
75

skipif mysql # not compatible
query I rowsort label-4466
SELECT DISTINCT - CAST ( - 18 AS INTEGER ) + + tab1.col2 FROM tab1
----
114
72
75

query I rowsort
SELECT + + col0 * + col0 + col0 * col1 + - col2 AS col1 FROM tab0 AS cor0
----
15938
2607
4619

query I rowsort
SELECT - 85 + - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-1428
-302
-4687

query I rowsort
SELECT + 33 + - 86 * col0 + 80 * col2 FROM tab1 AS cor0
----
-911
4095
833

query I rowsort
SELECT ALL 2 AS col2 FROM tab2, tab1 cor0 CROSS JOIN tab0
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4471
SELECT - CAST( col1 AS SIGNED ) FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4471
SELECT - CAST ( col1 AS INTEGER ) FROM tab0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4472
SELECT + CAST( col0 AS SIGNED ) + col1 - col2 * cor0.col0 FROM tab1 AS cor0
----
-133
-3574
-7587

skipif mysql # not compatible
query I rowsort label-4472
SELECT + CAST ( col0 AS INTEGER ) + col1 - col2 * cor0.col0 FROM tab1 AS cor0
----
-133
-3574
-7587

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 15 col0 FROM tab0 AS cor0
----
-15
-15
-15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4474
SELECT DISTINCT - - col2 * - col2 + CAST( col2 * - col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-1352
-1458
-2888

skipif mysql # not compatible
query I rowsort label-4474
SELECT DISTINCT - - col2 * - col2 + CAST ( col2 * - col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-1352
-1458
-2888

query I rowsort
SELECT + cor0.col1 + - col1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4476
SELECT - cor0.col2 * cor0.col1 DIV - col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4476
SELECT - cor0.col2 * cor0.col1 / - col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col2 * + col2 + - 11 AS col2 FROM tab0 AS cor0
----
-10
1078
6713

query I rowsort
SELECT 67 * col1 AS col1 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT ALL + col0 * 83 FROM tab1 AS cor0
----
249
5312
6640

query I rowsort
SELECT - 26 FROM tab1 AS cor0
----
-26
-26
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4481
SELECT ALL + - 69 DIV - col0 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4481
SELECT ALL + - 69 / - col0 AS col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT col0 + - 95 FROM tab1 AS cor0
----
-15
-31
-92

query I rowsort
SELECT DISTINCT - - ( + col0 ) * + col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4484
SELECT col1 + + 69 DIV + col0 AS col2 FROM tab2 AS cor0
----
17
40
59

skipif mysql # not compatible
query I rowsort label-4484
SELECT col1 + + 69 / + col0 AS col2 FROM tab2 AS cor0
----
17
40
59

query I rowsort
SELECT col2 + - 44 + + col2 AS col2 FROM tab1 AS cor0
----
148
64
70

query I rowsort
SELECT DISTINCT col1 + 23 AS col2 FROM tab2 AS cor0
----
40
54
82

query I rowsort
SELECT - + 91 FROM tab1 AS cor0
----
-91
-91
-91

query I rowsort
SELECT ALL - col0 + - 43 AS col2 FROM tab0 AS cor0
----
-132
-67
-78

query I rowsort
SELECT 78 FROM tab2 cor0
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4490
SELECT DISTINCT - col1 DIV ( + col1 ) + 51 AS col2 FROM tab0 AS cor0
----
50

skipif mysql # not compatible
query I rowsort label-4490
SELECT DISTINCT - col1 / ( + col1 ) + 51 AS col2 FROM tab0 AS cor0
----
50

query I rowsort
SELECT DISTINCT + + col1 * - col2 + col1 - + ( - cor0.col0 ) FROM tab2 AS cor0
----
-1397
-550
-799

query I rowsort
SELECT ALL + 62 FROM tab1 AS cor0
----
62
62
62

query I rowsort
SELECT DISTINCT col1 * + col2 + + col0 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + col0 + + 45 * col2 FROM tab1
----
2433
2629
4400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4495
SELECT + CAST( col0 AS SIGNED ) * col0 FROM tab2 cor0
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-4495
SELECT + CAST ( col0 AS INTEGER ) * col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
-86
-91
-97

query I rowsort
SELECT + - cor0.col0 * + col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 65 AS col0 FROM tab1
----
-65
-65
-65

query I rowsort
SELECT ALL tab0.col2 * col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT - col2 + + ( col2 + - col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col2 - + col2 FROM tab1
----
0

query I rowsort
SELECT ALL - col1 + col2 + col2 FROM tab2 AS cor0
----
-7
23
59

query I rowsort
SELECT ALL - cor0.col0 * ( 48 ) FROM tab1 AS cor0
----
-144
-3072
-3840

query I rowsort
SELECT DISTINCT + + 60 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4505
SELECT + col2 + CAST( 91 AS SIGNED ) * + col1 * + col1 AS col0 FROM tab0
----
673069
753653
856220

skipif mysql # not compatible
query I rowsort label-4505
SELECT + col2 + CAST ( 91 AS INTEGER ) * + col1 * + col1 AS col0 FROM tab0
----
673069
753653
856220

query I rowsort
SELECT tab2.col2 + col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT + col0 + - tab0.col2 AS col1 FROM tab0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 89 col0 FROM tab2 AS cor0
----
1513
2759
5251

query I rowsort
SELECT ALL + cor0.col2 + ( 13 * col2 ) FROM tab2 AS cor0
----
364
378
532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + col0 * + col0 col2 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT DISTINCT 20 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
20

query I rowsort
SELECT + + col0 + - col2 * 73 AS col1 FROM tab2 cor0
----
-1820
-1964
-2695

query I rowsort
SELECT - 72 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

query I rowsort
SELECT col2 * col0 + - col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab2, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 54 AS col0 FROM tab1, tab0 cor0, tab0 cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT ALL - col1 * + cor0.col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - col2 * col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-4519
SELECT col2 DIV + col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4519
SELECT col2 / + col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - 24 AS col1 FROM tab2
----
-24
-24
-24

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL 77 AS col1 FROM tab2
----
77
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4523
SELECT ALL CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4523
SELECT ALL CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT tab0.col2 AS col2 FROM tab0, tab1 AS cor0
----
1
33
82

query I rowsort
SELECT tab2.col0 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + 89 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4528
SELECT - - col1 * col2 / - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4528
SELECT - - col1 * col2 / - 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-4529
SELECT - col2 * + col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4529
SELECT - col2 * + col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 + - cor0.col1 AS col2 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT - - col0 * col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + 23 * + col0 AS col2 FROM tab2 AS cor0
----
161
1794
1817

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col1 col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - cor0.col1 - - col1 * 33 FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT DISTINCT + + col1 + - 79 AS col1 FROM tab2 AS cor0
----
-20
-48
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * col2 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col1 * + col2 - col2 AS col1 FROM tab1 cor0
----
1152
1350
513

query I rowsort
SELECT - - col1 * + ( + col2 ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * + 67 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT cor0.col2 * + col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL + ( - tab0.col1 ) + + col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT col2 - col0 * col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT + + col0 * - col1 + + col2 * + col1 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT ALL + 32 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4546
SELECT col0 DIV - tab2.col0 col2 FROM tab2
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4546
SELECT col0 / - tab2.col0 col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT ALL - col1 + col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT + - ( col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 + col2 * - ( - col0 ) FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT col1 + - col0 FROM tab0
----
2
62
62

query I rowsort
SELECT DISTINCT + - 84 AS col2 FROM tab2 AS cor0
----
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4552
SELECT ALL - 59 * col0 DIV - 46 + + 79 DIV + col1 + cor0.col1 FROM tab1 cor0
----
121
32
99

skipif mysql # not compatible
query I rowsort label-4552
SELECT ALL - 59 * col0 / - 46 + + 79 / + col1 + cor0.col1 FROM tab1 cor0
----
121
32
99

query I rowsort
SELECT - + cor0.col2 * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + col1 * + col1 * 55 + col2 * + ( + ( col0 ) ) AS col0 FROM tab2
----
18897
193483
53044

query I rowsort
SELECT ALL - + 37 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT + col1 * + 43 AS col2 FROM tab0 AS cor0
----
3698
3913
4171

query I rowsort
SELECT ALL + col0 + - 4 * + col0 AS col0 FROM tab1
----
-192
-240
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4558
SELECT ALL + col2 + - 50 DIV col1 AS col0 FROM tab2
----
26
26
36

skipif mysql # not compatible
query I rowsort label-4558
SELECT ALL + col2 + - 50 / col1 AS col0 FROM tab2
----
26
26
36

query I rowsort
SELECT DISTINCT 2 AS col2 FROM tab1, tab2 AS cor0
----
2

query I rowsort
SELECT DISTINCT col2 * ( - cor0.col1 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT cor0.col1 * ( - col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - - col1 + 47 AS col1 FROM tab2 AS cor0
----
106
64
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4563
SELECT - 9 DIV - cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4563
SELECT - 9 / - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 30 * - col1 + col1 AS col2 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT - 69 * + col1 AS col2 FROM tab1 AS cor0
----
-1794
-690
-897

query I rowsort
SELECT ALL col1 - + col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4567
SELECT ALL CAST( cor0.col1 AS SIGNED ) + - col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4567
SELECT ALL CAST ( cor0.col1 AS INTEGER ) + - col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4568
SELECT DISTINCT + col1 DIV + ( col1 ) + col2 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-4568
SELECT DISTINCT + col1 / + ( col1 ) + col2 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT - col0 + col2 * - col1 AS col0 FROM tab0 cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT - + col1 * col2 * col2 + - 15 FROM tab1 AS cor0
----
-119823
-32505
-75831

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 * col0 col1 FROM tab2 cor0
----
637
7098
7189

query I rowsort
SELECT 0 * + col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 * - ( + col0 ) AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col0 * 75 FROM tab0
----
-1800
-2625
-6675

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 - + col0 FROM tab1 AS cor0
----
-2919
-3313
-9296

query I rowsort
SELECT - - 57 + 74 FROM tab1 AS cor0
----
131
131
131

query I rowsort
SELECT ALL - ( - cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 63 FROM tab2, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT DISTINCT + 73 * col0 FROM tab2 AS cor0
----
511
5694
5767

query I rowsort
SELECT DISTINCT + 55 FROM tab0
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col1 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT 40 FROM tab2, tab1 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4583
SELECT DISTINCT - CAST( NULL AS SIGNED ) / - col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4583
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / - col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col0 + + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + - ( - 54 ) AS col0 FROM tab0 AS cor0
----
54

query I rowsort
SELECT - col0 * cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col0 * - col0 + + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT + col0 + + 82 AS col1 FROM tab0
----
106
117
171

query I rowsort
SELECT + 82 * cor0.col1 FROM tab1 cor0
----
1066
2132
820

query I rowsort
SELECT ALL + - cor0.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT DISTINCT + - ( col1 ) * col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4592
SELECT + - 28 DIV ( col2 ) FROM tab0 AS cor0
----
-28
0
0

skipif mysql # not compatible
query I rowsort label-4592
SELECT + - 28 / ( col2 ) FROM tab0 AS cor0
----
-28
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4593
SELECT - ( col0 ) DIV - cor0.col1 AS col1 FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-4593
SELECT - ( col0 ) / - cor0.col1 AS col1 FROM tab1 cor0
----
0
6
6

query I rowsort
SELECT cor0.col1 * cor0.col0 - + cor1.col2 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 143d8abf91c0de28a0fd604536575813

query I rowsort
SELECT ALL - - ( - cor0.col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + 13 * - col1 + col0 FROM tab1
----
-335
-66
-89

query I rowsort
SELECT ALL - 78 * col1 + - col2 + + col0 AS col1 FROM tab2
----
-1285
-2438
-4550

query I rowsort
SELECT 97 * col0 FROM tab1
----
291
6208
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 22 * + col2 col2 FROM tab1 AS cor0
----
1188
1254
2112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 26 + + col1 col1 FROM tab0 AS cor0
----
112
117
123

onlyif mysql # use DIV operator for integer division
query I rowsort label-4601
SELECT + + 75 DIV + col2 AS col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4601
SELECT + + 75 / + col2 AS col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT ALL 17 FROM tab2 cor0
----
17
17
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-4603
SELECT - col0 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4603
SELECT - col0 / cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4604
SELECT + 36 DIV col1 + col1 * - col1 AS col2 FROM tab1
----
-167
-675
-97

skipif mysql # not compatible
query I rowsort label-4604
SELECT + 36 / col1 + col1 * - col1 AS col2 FROM tab1
----
-167
-675
-97

query I rowsort
SELECT - col0 * + tab2.col2 AS col0 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4606
SELECT ( + col1 ) - - col2 DIV col2 AS col0 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4606
SELECT ( + col1 ) - - col2 / col2 AS col0 FROM tab1
----
11
14
27

query I rowsort
SELECT + 51 AS col0 FROM tab0
----
51
51
51

query I rowsort
SELECT ALL ( - 55 ) + - col0 + + col1 FROM tab1
----
-109
-122
-32

query I rowsort
SELECT + ( col1 ) FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4610
SELECT ALL - col1 DIV col0 - cor0.col2 FROM tab2 AS cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-4610
SELECT ALL - col1 / col0 - cor0.col2 FROM tab2 AS cor0
----
-26
-31
-38

query I rowsort
SELECT + col2 + + cor0.col0 * + cor0.col1 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col0 + + col2 - + col0 * + col2 FROM tab0 AS cor0
----
-69
-7305
-783

query I rowsort
SELECT col2 - + col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col1 col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4616
SELECT col0 * 55 DIV col1 + - col0 * col0 FROM tab2 AS cor0
----
-37
-5986
-6012

skipif mysql # not compatible
query I rowsort label-4616
SELECT col0 * 55 / col1 + - col0 * col0 FROM tab2 AS cor0
----
-37
-5986
-6012

query I rowsort
SELECT ALL - col2 + col1 * cor0.col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + col2 - col2 * col2 AS col1 FROM tab2
----
-1406
-650
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-4619
SELECT + col1 DIV + tab0.col0 AS col2 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4619
SELECT + col1 / + tab0.col0 AS col2 FROM tab0
----
1
2
3

query I rowsort
SELECT tab0.col2 * + col2 + tab0.col0 FROM tab0
----
1113
36
6813

query I rowsort
SELECT DISTINCT - ( - col1 + col0 ) AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - 66 + col1 AS col0 FROM tab2
----
-35
-49
-7

query I rowsort
SELECT DISTINCT - tab0.col2 + ( + col0 ) FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
1
33
82

query I rowsort
SELECT ALL cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 + - 18 + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-12822
-16398
-9478

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * 62 col2 FROM tab2 AS cor0
----
1612
1674
2356

query I rowsort
SELECT - col1 * + col0 - - cor0.col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT DISTINCT + col2 + + ( - col2 ) FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT - - col1 + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col1 * col1 + col2 FROM tab2 cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-4632
SELECT DISTINCT col1 DIV 17 + + col0 AS col0 FROM tab2
----
8
80
81

skipif mysql # not compatible
query I rowsort label-4632
SELECT DISTINCT col1 / 17 + + col0 AS col0 FROM tab2
----
8
80
81

query I rowsort
SELECT + col1 * col1 - 52 FROM tab0 AS cor0
----
7344
8229
9357

query I rowsort
SELECT - col1 * + col1 AS col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - col1 * col0 * 0 AS col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4637
SELECT DISTINCT - col1 * col2 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4637
SELECT DISTINCT - col1 * col2 * - CAST ( NULL AS REAL ) AS col2 FROM tab0
----
NULL

query I rowsort
SELECT ALL - ( - cor0.col2 ) AS col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ( + col2 ) + col0 * tab2.col2 FROM tab2
----
2054
216
3040

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab0 AS cor0, tab2 cor1
----
972 values hashing to a9068b700464993db9fae6f630605fde

query I rowsort
SELECT DISTINCT + 15 AS col0 FROM tab1 AS cor0
----
15

query I rowsort
SELECT + 42 + col0 * - col2 FROM tab0 cor0
----
-7256
-750
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * col1 col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( cor0.col2 ) col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + + col1 + + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - col2 * - col1 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT col2 + 47 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT ALL + col2 + + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + col2 * + 3 * col1 AS col1 FROM tab0 AS cor0
----
22386
291
8514

query I rowsort
SELECT DISTINCT col0 * col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + - col1 + + ( - col2 ) FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - - cor0.col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col1 * + col2 AS col0 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + cor0.col0 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col0 + col2 AS col0 FROM tab2 cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col1 * CAST ( col1 + col2 * + col1 AS REAL ) FROM tab2 AS cor0
----
11271
26908
93987

onlyif mysql # use DIV operator for integer division
query I rowsort label-4657
SELECT DISTINCT - col2 DIV - 45 + col1 FROM tab1 AS cor0
----
11
15
27

skipif mysql # not compatible
query I rowsort label-4657
SELECT DISTINCT - col2 / - 45 + col1 FROM tab1 AS cor0
----
11
15
27

query I rowsort
SELECT DISTINCT - + col2 + 57 AS col0 FROM tab1 AS cor0
----
-39
0
3

query I rowsort
SELECT col2 * - ( col2 ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + cor0.col2 * - col1 + - col0 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-4661
SELECT - ( cor0.col0 ) DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4661
SELECT - ( cor0.col0 ) / col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT - 15 FROM tab1 AS cor0
----
-15
-15
-15

query I rowsort
SELECT - col1 * - 86 AS col2 FROM tab1 cor0
----
1118
2236
860

query I rowsort
SELECT ALL cor0.col0 * + 71 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT ( col0 ) * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - 45 FROM tab2 AS cor0
----
-45
-45
-45

query I rowsort
SELECT 58 * - cor0.col0 * col1 + - col0 * - col1 * col1 + col2 AS col2 FROM tab2 AS cor0
----
-55025
-5832
4628

query I rowsort
SELECT 76 + col0 * + col2 FROM tab0 cor0
----
111
7374
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4669
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4669
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT col1 * + 31 + tab0.col1 * - ( col2 ) + tab0.col0 AS col1 FROM tab0
----
-148
-4552
2945

query I rowsort
SELECT ALL + cor1.col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - 23 * cor0.col1 - cor0.col2 AS col2 FROM tab1 AS cor0
----
-287
-395
-652

query I rowsort
SELECT + col0 + col1 * col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT + ( col0 ) + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + + col1 - - col0 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4676
SELECT DISTINCT CAST( - 21 AS SIGNED ) AS col0 FROM tab0
----
-21

skipif mysql # not compatible
query I rowsort label-4676
SELECT DISTINCT CAST ( - 21 AS INTEGER ) AS col0 FROM tab0
----
-21

query I rowsort
SELECT ALL ( ( col1 ) ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT - col0 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 70 + cor0.col2 FROM tab1 AS cor0
----
124
127
166

query I rowsort
SELECT + + 62 AS col2 FROM tab0 AS cor0
----
62
62
62

query I rowsort
SELECT tab2.col2 * col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT - col2 + col1 + col0 * col2 FROM tab1 AS cor0
----
134
3601
7597

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 * 38 AS col2 FROM tab2 cor0
----
-1019
-1365
-910

query I rowsort
SELECT ALL + - col1 * col2 + col2 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4685
SELECT - col1 + - CAST( + col1 AS SIGNED ) * col2 col0 FROM tab2 AS cor0
----
-1593
-663
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4685
SELECT - col1 + - CAST ( + col1 AS INTEGER ) * col2 col0 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col0 * col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - 14 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 97 col2 FROM tab0, tab1 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to a85708f93e08f0a017b33cd7912642fd

query I rowsort
SELECT - 33 FROM tab0, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to a539377dccf415ca13c845420f532336

query I rowsort
SELECT - - 30 + 73 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 931550b92da9295c340a42d3441fe745

onlyif mysql # use DIV operator for integer division
query I rowsort label-4693
SELECT DISTINCT - col0 DIV + tab2.col0 AS col2 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-4693
SELECT DISTINCT - col0 / + tab2.col0 AS col2 FROM tab2
----
-1

query I rowsort
SELECT - ( 16 ) FROM tab2
----
-16
-16
-16

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 col0 FROM tab1
----
82
82
82

query I rowsort
SELECT + + 14 + + 47 FROM tab2 cor0
----
61
61
61

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
10
13
26

query I rowsort
SELECT + col2 * col1 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT - 58 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 897f42d096eff3935f4f50603850c23b

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT 91 * - 1 FROM tab1, tab0 AS cor0
----
-91

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 77ce60d8d42550cc1b5a38c7d1dc5d13

onlyif mysql # use DIV operator for integer division
query I rowsort label-4703
SELECT ALL cor0.col1 + col2 DIV cor0.col1 + ( - col2 ) * + col0 FROM tab2 AS cor0
----
-158
-1969
-2983

skipif mysql # not compatible
query I rowsort label-4703
SELECT ALL cor0.col1 + col2 / cor0.col1 + ( - col2 ) * + col0 FROM tab2 AS cor0
----
-158
-1969
-2983

query I rowsort
SELECT - cor0.col1 - 72 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 9aaef161996149095b1b8620692ae8a3

query I rowsort
SELECT col2 * col0 + + ( + col1 ) * + col2 FROM tab0
----
132
14760
3630

query I rowsort
SELECT ( tab0.col1 ) AS col2 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4707
SELECT ALL + col0 DIV + 5 AS col1 FROM tab0
----
17
4
7

skipif mysql # not compatible
query I rowsort label-4707
SELECT ALL + col0 / + 5 AS col1 FROM tab0
----
17
4
7

query I rowsort
SELECT - cor0.col1 - cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to daf01be24671583522e54ae801342b76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4709
SELECT CAST( + 85 AS SIGNED ) + + col1 * - 34 col0 FROM tab0
----
-2839
-3009
-3213

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4709
SELECT CAST ( + 85 AS INTEGER ) + + col1 * - 34 col0 FROM tab0
----
-2839
-3009
-3213

query I rowsort
SELECT - ( col1 ) + + col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT col2 + 53 FROM tab0
----
135
54
86

query I rowsort
SELECT ALL ( col2 * + col2 ) FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT 98 FROM tab0, tab1 AS cor0
----
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + col0 * col1 + + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT 11 FROM tab0, tab1 AS cor0
----
11

query I rowsort
SELECT DISTINCT - 4 FROM tab2
----
-4

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT - 6 + - tab2.col1 FROM tab2
----
-23
-37
-65

query I rowsort
SELECT DISTINCT col0 * - col0 AS col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT tab2.col2 * + col0 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL cor0.col0 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col0 col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 60 FROM tab2
----
-60

query I rowsort
SELECT + - col2 * col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1, tab2, tab2 AS cor0, tab0
----
26
27
38

query I rowsort
SELECT DISTINCT 74 - - col0 FROM tab0
----
109
163
98

query I rowsort
SELECT + col2 + col2 - + 66 * + col0 * col2 AS col2 FROM tab2
----
-12420
-133796
-198056

query I rowsort
SELECT col2 * 12 + 0 * col1 + + col2 FROM tab2 AS cor0
----
338
351
494

query I rowsort
SELECT col2 + 59 FROM tab2 AS cor0
----
85
86
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col1 col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT - - col1 + + ( col1 ) FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - cor0.col1 + col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 + + col2 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - + cor0.col2 * ( - col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col1 * col1 AS col2 FROM tab0 cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort
SELECT col2 * CAST ( - col2 AS REAL ) + col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT - col1 * + col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT - + cor0.col1 + + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 + col0 + + col1 AS col1 FROM tab1 AS cor0
----
2945
3323
9309

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4741
SELECT CAST( NULL AS DECIMAL ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4741
SELECT CAST ( NULL AS REAL ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col1 * 22 * col2 + - col2 * col2 FROM tab2
----
12768
17685
33072

query I rowsort
SELECT - col1 + - col2 + + col2 AS col2 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col2 * + col1 col2 FROM tab1 cor0
----
1168
1401
506

query I rowsort
SELECT ALL col1 + + ( 96 ) + - col2 FROM tab2
----
100
129
75

query I rowsort
SELECT ALL - 72 FROM tab0, tab0 cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4747
SELECT + col0 DIV ( col2 ) + - col1 FROM tab0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-4747
SELECT + col0 / ( col2 ) + - col1 FROM tab0
----
-62
-86
-90

query I rowsort
SELECT + - col0 * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort
SELECT ALL - + col1 + CAST ( col2 * cor0.col1 + - 10 AS REAL ) FROM tab0 AS cor0
----
-10
2742
7361

query I rowsort
SELECT + col0 - - col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + - col2 * - 67 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
3621
3883
6512

query I rowsort
SELECT DISTINCT - - col0 * col0 + 18 FROM tab1 AS cor0
----
27
4114
6418

query I rowsort
SELECT ALL col0 + col2 * + col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL - col1 - cor0.col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - 75 * ( col2 ) + + col2 * col1 AS col1 FROM tab2 cor0
----
-1188
-2204
-416

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 9 col2 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT ( + col1 ) + col0 AS col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL - - col2 - cor0.col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - + 89 FROM tab0 AS cor0
----
-89

query I rowsort
SELECT - + col2 - + col1 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL + cor0.col2 * + col2 + - col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT DISTINCT - - col0 + - 40 * + col1 AS col0 FROM tab0 cor0
----
-3416
-3551
-3845

query I rowsort
SELECT ALL + + 3 * col2 * - cor0.col0 FROM tab1 AS cor0
----
-10944
-23040
-486

query I rowsort
SELECT ALL col2 + - col1 * col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - col1 + col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT - col2 + 80 AS col1 FROM tab2
----
42
53
54

query I rowsort
SELECT ALL - + col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL ( + col2 ) * + cor0.col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4770
SELECT - - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4770
SELECT - - 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-4771
SELECT - + ( col2 ) + col0 * + CAST( col1 AS SIGNED ) + col2 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-4771
SELECT - + ( col2 ) + col0 * + CAST ( col1 AS INTEGER ) + col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL col0 + + col0 - + col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT + col2 - - col2 * + col0 FROM tab0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 col0 FROM tab1, tab0, tab0 cor0
----
3
64
80

query I rowsort
SELECT ALL + col2 - 78 AS col0 FROM tab0
----
-45
-77
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4776
SELECT ALL ( col0 ) DIV col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-4776
SELECT ALL ( col0 ) / col2 AS col1 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL col0 * - col2 + col0 * - 39 AS col2 FROM tab0 AS cor0
----
-10769
-1400
-1728

query I rowsort
SELECT ALL + - col0 * + col1 FROM tab0 cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 63 * + col1 col1 FROM tab0 AS cor0
----
5418
5733
6111

query I rowsort
SELECT ALL - + 85 AS col2 FROM tab0 AS cor0
----
-85
-85
-85

query I rowsort
SELECT DISTINCT col2 + + col1 * + col0 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4782
SELECT DISTINCT 34 * col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4782
SELECT DISTINCT 34 * col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 + - cor0.col2 * - col0 AS col2 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-4784
SELECT ALL col2 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4784
SELECT ALL col2 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL + - 97 AS col2 FROM tab1 AS cor0
----
-97
-97
-97

query I rowsort
SELECT DISTINCT - + tab2.col1 AS col1 FROM tab2, tab0, tab1 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 99 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT DISTINCT 56 * - col1 + col0 FROM tab0 cor0
----
-4792
-5007
-5397

query I rowsort
SELECT ALL cor0.col2 * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col0 + + cor0.col1 * + 31 AS col2 FROM tab0 AS cor0
----
2690
2910
3042

query I rowsort
SELECT + + cor0.col1 AS col1 FROM tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - cor0.col1 + - col0 + col1 * col1 FROM tab0 AS cor0
----
7286
8101
9277

query I rowsort
SELECT DISTINCT - col1 * - 35 FROM tab1 AS cor0
----
350
455
910

query I rowsort
SELECT DISTINCT col2 + + col0 * - col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL 30 * + col0 FROM tab0
----
1050
2670
720

query I rowsort
SELECT 13 - tab0.col2 FROM tab0
----
-20
-69
12

query I rowsort
SELECT ALL - col1 * col2 + + col2 AS col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT ALL - col1 + + tab2.col1 FROM tab2
----
0
0
0

query I rowsort
SELECT - + col1 * col0 + col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - - col2 * + col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT + col2 - cor0.col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-4804
SELECT DISTINCT + col2 DIV tab1.col0 + col1 col2 FROM tab1
----
10
14
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4804
SELECT DISTINCT + col2 / tab1.col0 + col1 col2 FROM tab1
----
10
14
44

query I rowsort
SELECT DISTINCT - col1 * col1 * + col0 AS col2 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL col1 + col2 * + col2 AS col2 FROM tab2
----
1461
735
760

query I rowsort
SELECT DISTINCT - col0 + + tab0.col2 * col1 FROM tab0
----
2814
62
7373

query I rowsort
SELECT ALL col2 * + col2 + + col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT col2 * col2 * col1 + col2 AS col0 FROM tab2 cor0
----
22626
24586
39910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col0 + col0 col2 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT cor0.col0 + - col2 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT - - col1 + + col2 * col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT col0 - - cor0.col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT DISTINCT - col0 + col1 * col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * + col1 col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + + col2 * col2 + col2 FROM tab0 cor0
----
1122
2
6806

query I rowsort
SELECT cor0.col0 + cor0.col0 AS col1 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT - cor0.col2 * - col0 + col0 * cor0.col1 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT ALL + 0 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + + cor0.col2 * + col0 * col0 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 4 col1 FROM tab2 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL - - col1 + col0 * - col0 FROM tab2 cor0
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 9 * col1 col0 FROM tab1 AS cor0
----
117
234
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4824
SELECT DISTINCT + col2 DIV - col0 AS col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4824
SELECT DISTINCT + col2 / - col0 AS col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT ALL col0 * - cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 78 + - cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
-113
-7376
-870

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + col2 AS col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT + - col0 + + col0 * col1 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL + - col2 + + col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - col1 * + col0 - - col0 AS col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - col2 * col2 * + col2 AS col1 FROM tab1 cor0
----
-157464
-185193
-884736

onlyif mysql # use DIV operator for integer division
query I rowsort label-4832
SELECT tab1.col2 DIV - tab1.col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4832
SELECT tab1.col2 / - tab1.col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 - col0 AS col2 FROM tab0
----
2
62

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <= col1
----

query III rowsort
SELECT * FROM tab2 WHERE - col2 * - col0 IN ( col1 )
----

query I rowsort
SELECT - col1 * col2 + col0 AS col1 FROM tab0 WHERE NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4837
SELECT col0 + + tab0.col0 + col0 DIV - col2 FROM tab0
----
177
35
48

skipif mysql # not compatible
query I rowsort label-4837
SELECT col0 + + tab0.col0 + col0 / - col2 FROM tab0
----
177
35
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + tab2.col0 * col2 col0 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT col0 * col0 + col0 AS col1 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0 WHERE NULL IN ( - col0 * col2 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col0 NOT IN ( - tab0.col2 )
----

query I rowsort
SELECT - tab1.col1 + col1 + col2 * col0 FROM tab1
----
162
3648
7680

query III rowsort
SELECT * FROM tab0 WHERE NOT ( col2 * + col0 ) = - col0 - col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT tab2.col1 + + col0 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT col1 + - col1 FROM tab0
----
0

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col2 > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * + col2 - tab1.col0 * - col2 col1 FROM tab1
----
15360
324
7296

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1 WHERE col1 BETWEEN NULL AND NULL
----

query I rowsort
SELECT col2 AS col0 FROM tab0 WHERE NULL <> col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4850
SELECT tab2.col2 + + col1 * tab2.col1 DIV col1 AS col1 FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-4850
SELECT tab2.col2 + + col1 * tab2.col1 / col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT + tab2.col2 - - col2 FROM tab2 WHERE NOT NULL <= NULL
----

query III rowsort
SELECT * FROM tab2 WHERE - col0 / + col1 NOT IN ( - col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT - 0 * col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col1 + - col1 * col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT - + ( col1 ) * col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + tab1.col1 + col2 FROM tab1
----
109
67
80

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 / col1 IN ( col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT col2 - - col0 AS col0 FROM tab0
----
171
36
57

query I rowsort
SELECT col1 + tab0.col0 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT col0 + - col2 * col0 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT col0 + col0 * - cor0.col0 * - col0 AS col2 FROM tab0 AS cor0
----
13848
42910
705058

query I rowsort
SELECT col1 * col2 + - col2 * - col0 + + col2 AS col2 FROM tab1 AS cor0
----
1620
4275
9024

query I rowsort
SELECT + col2 * - cor0.col1 + col2 FROM tab1 AS cor0 WHERE NOT ( NULL ) IN ( col0 * + col2 - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4864
SELECT + col0 DIV col0 + + cor0.col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4864
SELECT + col0 / col0 + + cor0.col2 FROM tab0 AS cor0
----
2
34
83

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT ( NULL ) NOT IN ( + col1 )
----

query I rowsort
SELECT + tab2.col1 AS col0 FROM tab2 WHERE NOT NULL NOT BETWEEN col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4867
SELECT ALL + col1 + col0 DIV col0 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4867
SELECT ALL + col1 + col0 / col0 FROM tab0
----
87
92
98

query I rowsort
SELECT DISTINCT + col1 + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT col1 * col0 AS col1 FROM tab1 WHERE NOT NULL NOT IN ( + col1 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL <> NULL
----

query I rowsort
SELECT tab0.col2 * - col1 + col0 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT col0 - col1 / col1 AS col2 FROM tab1 WHERE NOT tab1.col2 * col2 >= + col0
----

query I rowsort
SELECT - tab2.col2 + + col2 * + tab2.col1 FROM tab2
----
1508
608
810

query I rowsort
SELECT + col2 FROM tab0 WHERE ( NULL ) IN ( - col2 )
----

query I rowsort
SELECT + col1 - col2 AS col2 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT IN ( col2 )
----

query I rowsort
SELECT col0 AS col2 FROM tab1 WHERE NOT NULL <= col1 * col2
----

query I rowsort
SELECT + col2 - tab2.col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL - col1 + - cor0.col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - col1 FROM tab2 WHERE col1 * - col1 / col2 > NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT - cor0.col0 * + col1 * cor0.col2 + - cor0.col0 + - col2 FROM tab2 AS cor0
----
-119756
-51151
-5893

query I rowsort
SELECT - - col1 + - col0 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - + col1 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 70 FROM tab1 cor0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT + col0 * col0 + ( col0 ) AS col2 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL + - 69 AS col1 FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT + - col0 + col1 * 3 - 18 FROM tab1 cor0
----
-52
-59
57

query I rowsort
SELECT ALL + col2 * col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - 57 * cor0.col1 + col0 + col2 FROM tab2 AS cor0
----
-1733
-3259
-852

query I rowsort
SELECT ALL 98 * + col2 FROM tab0 AS cor0
----
3234
8036
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4892
SELECT ALL - - col0 DIV col2 col0 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4892
SELECT ALL - - col0 / col2 col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4894
SELECT + ( + col0 ) DIV CAST( + col1 AS SIGNED ) + cor0.col1 + 58 AS col1 FROM tab2 AS cor0
----
118
79
89

skipif mysql # not compatible
query I rowsort label-4894
SELECT + ( + col0 ) / CAST ( + col1 AS INTEGER ) + cor0.col1 + 58 AS col1 FROM tab2 AS cor0
----
118
79
89

query I rowsort
SELECT 22 * - col1 - + ( + col2 * col0 ) FROM tab2 AS cor0
----
-3326
-3376
-871

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 cor1, tab2, tab2 AS cor2
----
3645 values hashing to f8426cd4d01ba96a72d7348574fbbc8e

query I rowsort
SELECT - col1 + + col0 + + col0 * col1 * col2 FROM tab1
----
36534
4189
99907

query I rowsort
SELECT DISTINCT + tab1.col0 * - tab1.col1 + + col2 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT DISTINCT col2 * col1 * + col2 + ( col2 * + col2 ) FROM tab0
----
618608
94743
98

query I rowsort
SELECT DISTINCT + 79 + - cor0.col2 FROM tab0 AS cor0
----
-3
46
78

query I rowsort
SELECT DISTINCT cor0.col1 * 62 AS col1 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT DISTINCT - col2 - - cor0.col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL cor0.col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + 73 + - 98 AS col0 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT - col2 + - ( + col2 ) AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2 cor2
----
972 values hashing to 42e69ecdafb3c81046bc5cb4c98b1666

query I rowsort
SELECT DISTINCT + ( + col1 ) AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - 33 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-4909
SELECT ALL - cor0.col1 + 98 DIV + cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 3178adc6bfa8d79e1429f1032465986f

skipif mysql # not compatible
query I rowsort label-4909
SELECT ALL - cor0.col1 + 98 / + cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 3178adc6bfa8d79e1429f1032465986f

query I rowsort
SELECT DISTINCT - 82 - col0 FROM tab0
----
-106
-117
-171

query I rowsort
SELECT col0 * + 73 + col0 * + 25 - - col0 FROM tab2
----
693
7722
7821

onlyif mysql # use DIV operator for integer division
query I rowsort label-4912
SELECT + 6 DIV col1 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4912
SELECT + 6 / col1 AS col1 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4913
SELECT 78 + col2 * col2 - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4913
SELECT 78 + col2 * col2 - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4914
SELECT DISTINCT + CAST( + col2 AS SIGNED ) AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4914
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT col1 * - col1 * col2 - tab1.col0 * + 5 AS col2 FROM tab1
----
-16624
-36519
-6020

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4916
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4916
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4917
SELECT - col1 DIV 35 + col2 AS col2 FROM tab0
----
-1
31
80

skipif mysql # not compatible
query I rowsort label-4917
SELECT - col1 / 35 + col2 AS col2 FROM tab0
----
-1
31
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT col0 * - col2 * 91 FROM tab1 AS cor0
----
-14742
-331968
-698880

query I rowsort
SELECT ALL ( + col2 ) + - 50 AS col0 FROM tab1
----
4
46
7

query I rowsort
SELECT ALL col1 * tab0.col1 * + col0 + 87 FROM tab0
----
177591
329402
737096

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
1
33
82

query I rowsort
SELECT 90 FROM tab0 cor0
----
90
90
90

query I rowsort
SELECT DISTINCT + col1 - col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL 94 AS col1 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT ( cor0.col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col1 + - col0 + - col2 FROM tab0 AS cor0
----
-133
-143
-262

query I rowsort
SELECT ALL cor0.col2 * ( + 75 ) * cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 7c056d19220d8e43321207b75a9de374

query I rowsort
SELECT DISTINCT + col2 * ( ( + col0 ) + + 6 ) AS col1 FROM tab2
----
2184
3230
351

query I rowsort
SELECT DISTINCT + tab0.col2 * + col0 * - 85 + - col1 AS col1 FROM tab0
----
-3072
-620421
-67406

query I rowsort
SELECT ALL col2 + - tab0.col1 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL + col0 * - col1 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4933
SELECT - col1 + col1 DIV - col1 AS col1 FROM tab2 AS cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-4933
SELECT - col1 + col1 / - col1 AS col1 FROM tab2 AS cor0
----
-18
-32
-60

query I rowsort
SELECT tab2.col1 * ( col2 * col1 ) AS col2 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT + col1 * + col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - 95 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col1 col2 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4938
SELECT ALL - col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4938
SELECT ALL - col2 / - col0 AS col1 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT ALL + col0 + col0 * + cor0.col2 * - ( - 42 ) AS col1 FROM tab0 AS cor0
----
1505
306605
33288

query I rowsort
SELECT - + 79 AS col1 FROM tab2 AS cor0
----
-79
-79
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4941
SELECT ALL col2 * 53 DIV col2 - col0 * - col1 AS col1 FROM tab0 AS cor0
----
2117
3448
8152

skipif mysql # not compatible
query I rowsort label-4941
SELECT ALL col2 * 53 / col2 - col0 * - col1 AS col1 FROM tab0 AS cor0
----
2117
3448
8152

query I rowsort
SELECT DISTINCT - col1 + + 41 + - col2 FROM tab0 AS cor0
----
-132
-57
-78

query I rowsort
SELECT ALL 46 - - 67 FROM tab1 AS cor0
----
113
113
113

query I rowsort
SELECT DISTINCT 41 FROM tab2 cor0
----
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( ( col0 ) ) * - ( - col2 ) col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + ( col0 ) * col0 * 30 FROM tab1 AS cor0
----
122880
192000
270

query I rowsort
SELECT DISTINCT + - 1 * - 66 AS col2 FROM tab0 AS cor0
----
66

query I rowsort
SELECT DISTINCT + 20 + 29 AS col0 FROM tab0, tab2 AS cor0
----
49

query I rowsort
SELECT 47 FROM tab0, tab2, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to 5c7a6f591fb2a38893dafe56c4b9b97f

query I rowsort
SELECT ALL + ( col1 ) + - col1 * 28 AS col2 FROM tab2 AS cor0
----
-1593
-459
-837

query I rowsort
SELECT DISTINCT col1 - 91 * - cor0.col1 FROM tab0 AS cor0
----
7912
8372
8924

query I rowsort
SELECT DISTINCT + col1 * 26 FROM tab0 AS cor0
----
2236
2366
2522

onlyif mysql # use DIV operator for integer division
query I rowsort label-4953
SELECT ALL + - cor0.col1 DIV + col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4953
SELECT ALL + - cor0.col1 / + col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + + col1 + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT + col1 + + ( 96 ) FROM tab2 AS cor0
----
113
127
155

query I rowsort
SELECT - col0 * ( col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + - ( 21 ) * col1 FROM tab1 AS cor0
----
-210
-273
-546

query I rowsort
SELECT - col0 * + cor0.col0 - - col1 * + col1 FROM tab2 AS cor0
----
-2603
-5952
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-4960
SELECT col1 + col2 DIV tab0.col2 + col0 FROM tab0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-4960
SELECT col1 + col2 / tab0.col2 + col0 FROM tab0
----
111
133
181

query I rowsort
SELECT 29 * + 38 FROM tab1 AS cor0
----
1102
1102
1102

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT DISTINCT col0 * - 14 FROM tab0
----
-1246
-336
-490

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 16 + + col1 col1 FROM tab2 AS cor0
----
33
47
75

query I rowsort
SELECT + col2 * - col1 + 42 * - col0 AS col2 FROM tab2 AS cor0
----
-1131
-3964
-4810

query I rowsort
SELECT ( ( + col0 ) + ( - 54 ) ) AS col2 FROM tab0
----
-19
-30
35

query I rowsort
SELECT DISTINCT + 71 AS col1 FROM tab2
----
71

query I rowsort
SELECT 15 * + col2 FROM tab0
----
1230
15
495

query I rowsort
SELECT + col1 * 6 FROM tab1
----
156
60
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4970
SELECT - col2 * - col2 * col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4970
SELECT - col2 * - col2 * col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 14 + col1 AS col2 FROM tab2
----
31
45
73

query I rowsort
SELECT DISTINCT + - 69 * cor0.col2 FROM tab1 AS cor0
----
-3726
-3933
-6624

query I rowsort
SELECT ALL cor0.col0 * col2 + - col1 + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
14067
145
7734

query I rowsort
SELECT ALL 47 * col1 AS col1 FROM tab1 AS cor0
----
1222
470
611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - cor0.col1 * + col1 + cor0.col0 * col0 FROM tab2 AS cor0
----
-912
2603
5952

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col2 + + col1 AS col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ALL + col0 + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT 97 * col2 AS col0 FROM tab1 AS cor0
----
5238
5529
9312

query I rowsort
SELECT DISTINCT 37 * col2 AS col1 FROM tab2 AS cor0
----
1406
962
999

query I rowsort
SELECT 30 + + col1 FROM tab1 AS cor0
----
40
43
56

query I rowsort
SELECT ALL + col1 * - col1 * - col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT ALL 5 AS col0 FROM tab0
----
5
5
5

query I rowsort
SELECT DISTINCT + + col1 * - col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - + cor0.col0 + col0 * 89 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT ALL - - col0 - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + - cor0.col1 * col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - + cor0.col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT + col2 + - 17 FROM tab1
----
37
40
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4991
SELECT + + col1 DIV 98 + + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4991
SELECT + + col1 / 98 + + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col2 + + col2 - + ( col1 ) * - CAST ( 80 AS REAL ) FROM tab0 AS cor0
----
6880
7280
7760

query I rowsort
SELECT DISTINCT + col2 * ( col2 ) + + cor0.col1 * + col0 FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT - col1 + ( + col0 + col0 ) AS col1 FROM tab0 AS cor0
----
-27
-38
87

query I rowsort
SELECT + 5 * - col2 + - cor0.col0 + col2 FROM tab2 AS cor0
----
-115
-182
-231

query I rowsort
SELECT ALL - ( - col0 ) * tab2.col0 AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT + - col1 + - 79 * + col2 FROM tab1 cor0
----
-4292
-4513
-7597

query I rowsort
SELECT col1 + - col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - ( col0 ) * - col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5000
SELECT col2 * 15 + + col0 DIV - col2 AS col2 FROM tab1 cor0
----
1440
810
854

skipif mysql # not compatible
query I rowsort label-5000
SELECT col2 * 15 + + col0 / - col2 AS col2 FROM tab1 cor0
----
1440
810
854

query I rowsort
SELECT - ( col0 ) - - cor0.col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - + col2 * + col2 * col0 + - cor0.col0 + - col0 AS col0 FROM tab2 AS cor0
----
-114234
-5117
-52884

onlyif mysql # use DIV operator for integer division
query I rowsort label-5003
SELECT + 47 + cor0.col1 + 24 DIV ( col1 * - col1 ) FROM tab2 AS cor0
----
106
64
78

skipif mysql # not compatible
query I rowsort label-5003
SELECT + 47 + cor0.col1 + 24 / ( col1 * - col1 ) FROM tab2 AS cor0
----
106
64
78

query I rowsort
SELECT DISTINCT + - 84 + col2 AS col2 FROM tab0 AS cor0
----
-2
-51
-83

query I rowsort
SELECT - 50 FROM tab1, tab1 cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
26
27
38

query I rowsort
SELECT - cor0.col2 + + 52 AS col0 FROM tab2 AS cor0
----
14
25
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5008
SELECT + col2 DIV + CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5008
SELECT + col2 / + CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * cor0.col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + + cor0.col2 + + 98 FROM tab2 AS cor0
----
124
125
136

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( 17 AS REAL ) FROM tab1, tab1 AS cor0, tab0 cor1, tab0 AS cor2
----
-17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5012
SELECT ALL + CAST( NULL AS DECIMAL ) * cor0.col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5012
SELECT ALL + CAST ( NULL AS REAL ) * cor0.col1 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 14 * 84 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
101136
107016
114072

query I rowsort
SELECT + 51 * col2 + col2 + + col0 FROM tab1 cor0
----
2811
3028
5072

query I rowsort
SELECT ALL - 41 + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
6043
6200
8

query I rowsort
SELECT - cor1.col2 * - ( 37 ) FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to da6b9e7da41066a85101a1f347afba1c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5017
SELECT DISTINCT + col2 * col2 DIV col2 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-5017
SELECT DISTINCT + col2 * col2 / col2 col0 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

onlyif mysql # use DIV operator for integer division
query I rowsort label-5019
SELECT ALL - col0 + col0 DIV col1 col2 FROM tab1 AS cor0
----
-3
-58
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5019
SELECT ALL - col0 + col0 / col1 col2 FROM tab1 AS cor0
----
-3
-58
-74

query I rowsort
SELECT DISTINCT + col2 + col2 * + col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - col2 + + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - ( col2 ) * col1 - + col2 FROM tab2 AS cor0
----
-1560
-684
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5023
SELECT ALL col2 - CAST( + 20 AS SIGNED ) FROM tab1
----
34
37
76

skipif mysql # not compatible
query I rowsort label-5023
SELECT ALL col2 - CAST ( + 20 AS INTEGER ) FROM tab1
----
34
37
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5024
SELECT DISTINCT col2 DIV - cor0.col0 + - cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
-1041
-640
-96

skipif mysql # not compatible
query I rowsort label-5024
SELECT DISTINCT col2 / - cor0.col0 + - cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
-1041
-640
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5025
SELECT - ( col2 ) * + col1 + - col2 DIV col0 FROM tab2 AS cor0
----
-1534
-646
-840

skipif mysql # not compatible
query I rowsort label-5025
SELECT - ( col2 ) * + col1 + - col2 / col0 FROM tab2 AS cor0
----
-1534
-646
-840

query I rowsort
SELECT - 65 + + 90 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT + + col0 * - col2 * ( col0 * col2 ) FROM tab1 AS cor0
----
-13307904
-26244
-58982400

query I rowsort
SELECT DISTINCT 21 * - col1 * 80 AS col2 FROM tab2
----
-28560
-52080
-99120

query I rowsort
SELECT - 35 + col0 * 93 FROM tab2 AS cor0
----
616
7219
7312

onlyif mysql # use DIV operator for integer division
query I rowsort label-5030
SELECT ALL - col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5030
SELECT ALL - col0 / + col2 AS col1 FROM tab0 AS cor0
----
-1
-35
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5031
SELECT ALL + + 53 * - col1 * - CAST( col1 * col2 AS SIGNED ) FROM tab1 AS cor0
----
1934712
302100
859872

skipif mysql # not compatible
query I rowsort label-5031
SELECT ALL + + 53 * - col1 * - CAST ( col1 * col2 AS INTEGER ) FROM tab1 AS cor0
----
1934712
302100
859872

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0, tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5033
SELECT ALL col0 DIV col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5033
SELECT ALL col0 / col2 FROM tab0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5034
SELECT + col1 + col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-5034
SELECT + col1 + col1 / - col1 AS col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT DISTINCT - col1 + + col0 * cor0.col0 FROM tab2 cor0
----
18
6025
6224

query I rowsort
SELECT + - col1 * 58 AS col1 FROM tab0 AS cor0
----
-4988
-5278
-5626

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 * col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT ALL - col0 + 46 * col1 * col2 + - 2 AS col1 FROM tab2 cor0
----
29635
38493
70484

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5039
SELECT DISTINCT col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5039
SELECT DISTINCT col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 * col2 * + col1 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-5041
SELECT tab1.col2 - + col0 DIV 30 FROM tab1
----
54
55
94

skipif mysql # not compatible
query I rowsort label-5041
SELECT tab1.col2 - + col0 / 30 FROM tab1
----
54
55
94

query I rowsort
SELECT DISTINCT cor0.col1 + 18 FROM tab0, tab1 cor0
----
28
31
44

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab1 AS cor0, tab2 cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab0 AS cor0, tab0 AS cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query I rowsort
SELECT ALL - cor0.col1 + - col0 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col2 * col1 + - col2 AS col0 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + col2 - 36 AS col0 FROM tab0 cor0
----
-3
-35
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5048
SELECT ALL + + col1 * CAST( NULL AS DECIMAL ) * - col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5048
SELECT ALL + + col1 * CAST ( NULL AS REAL ) * - col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5049
SELECT DISTINCT + - col2 DIV ( col1 ) AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5049
SELECT DISTINCT + - col2 / ( col1 ) AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT col2 + col0 * col2 * - col2 AS col1 FROM tab0 AS cor0
----
-26103
-34
-598354

query I rowsort
SELECT DISTINCT 13 FROM tab1, tab1 AS cor0, tab0 cor1
----
13

query I rowsort
SELECT - tab2.col0 * - col0 + - 4 FROM tab2
----
45
6080
6237

query I rowsort
SELECT col1 * 40 - - col0 * - col2 FROM tab2
----
-2322
1051
332

query I rowsort
SELECT + col0 + ( col2 ) FROM tab0
----
171
36
57

query I rowsort
SELECT col0 + - 48 AS col2 FROM tab2
----
-41
30
31

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 773bb916e463ebc075d701108532badb

query I rowsort
SELECT ALL + + col1 * + col1 + + 9 * col1 * + col2 AS col0 FROM tab0 AS cor0
----
10282
32938
75439

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5059
SELECT ALL + CAST( NULL AS DECIMAL ) AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5059
SELECT ALL + CAST ( NULL AS REAL ) AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT col1 * - 52 FROM tab0
----
-4472
-4732
-5044

query I rowsort
SELECT 68 FROM tab1, tab2, tab1 cor0, tab0
----
81 values hashing to 7ff6433dda3248dce73040b2c590f3da

query I rowsort
SELECT 32 AS col2 FROM tab0
----
32
32
32

query I rowsort
SELECT DISTINCT - col2 * col2 - col2 AS col0 FROM tab2 cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT + cor0.col0 - + col0 AS col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 25 * + col2 + - col0 col1 FROM tab0 AS cor0
----
-10
1961
801

query I rowsort
SELECT ALL + col0 + - col2 + col0 FROM tab0 AS cor0
----
15
69
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 * - col0 * 2 + col2 col1 FROM tab1
----
-1159
-1904
-99

query I rowsort
SELECT DISTINCT 98 + + 88 AS col2 FROM tab0
----
186

query I rowsort
SELECT ALL - col1 + ( col1 * + col2 ) FROM tab2
----
1475
629
806

query I rowsort
SELECT DISTINCT ( - col2 ) + col2 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5071
SELECT tab2.col0 * - col1 + col1 DIV + col1 FROM tab2
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-5071
SELECT tab2.col0 * - col1 + col1 / + col1 FROM tab2
----
-1342
-216
-4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-5072
SELECT + + col2 * 1 DIV col0 - + 79 FROM tab0 AS cor0
----
-78
-79
-79

skipif mysql # not compatible
query I rowsort label-5072
SELECT + + col2 * 1 / col0 - + 79 FROM tab0 AS cor0
----
-78
-79
-79

query I rowsort
SELECT ALL tab0.col2 * - col0 + col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL + 88 * - col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-261
-5568
-6960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + - col0 * + 84 col2 FROM tab2 AS cor0
----
-615
-6578
-6674

query I rowsort
SELECT ALL + 37 + col2 * + col2 FROM tab2 AS cor0
----
1481
713
766

query I rowsort
SELECT ALL - + col0 * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT cor0.col1 * + col0 + 59 FROM tab0 AS cor0
----
2123
3454
8158

query I rowsort
SELECT ALL - - cor0.col1 * + cor0.col1 + + 4 + cor0.col0 AS col0 FROM tab2 AS cor0
----
3563
372
972

query I rowsort
SELECT ALL - - 2 + col2 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-32
-5
11

query I rowsort
SELECT DISTINCT - 56 + - col1 * - col1 + col2 * col1 AS col1 FROM tab0 AS cor0
----
10178
15687
9450

query I rowsort
SELECT ALL + col0 + col0 * cor0.col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT col1 * + col2 + + cor0.col0 + col0 FROM tab0 AS cor0
----
167
2886
7640

query I rowsort
SELECT ALL + col1 + + col1 * col2 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - 69 + col2 * + 62 FROM tab2 AS cor0
----
1543
1605
2287

query I rowsort
SELECT DISTINCT + col1 * + col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - - col1 + col1 + col2 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT col2 * col2 + + col0 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - 93 * col1 AS col0 FROM tab2
----
-1581
-2883
-5487

query I rowsort
SELECT ALL 79 FROM tab2 AS cor0
----
79
79
79

query I rowsort
SELECT + tab2.col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5092
SELECT - + CAST( NULL AS SIGNED ) + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5092
SELECT - + CAST ( NULL AS INTEGER ) + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - col1 ) * col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + 50 * + col2 FROM tab2 AS cor0
----
1300
1350
1900

query I rowsort
SELECT + 42 AS col1 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT - cor0.col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * col2 col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - tab2.col2 * 54 AS col0 FROM tab2
----
-1404
-1458
-2052

query I rowsort
SELECT 16 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT ( + 47 + + col1 ) AS col0 FROM tab2
----
106
64
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5102
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5102
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col1 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - 77 FROM tab1
----
-77

query I rowsort
SELECT - + col2 * + ( - ( col0 ) ) - col0 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT col1 * 73 + cor0.col1 AS col2 FROM tab2 AS cor0
----
1258
2294
4366

query I rowsort
SELECT + col1 * col0 + col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL col2 * 67 AS col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT ALL + + col1 + cor0.col2 AS col2 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + ( col0 ) * - col0 col2 FROM tab1 AS cor0
----
-4086
-6387
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-5110
SELECT DISTINCT + + col0 DIV 31 + col2 DIV + col0 col0 FROM tab1 AS cor0
----
18
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5110
SELECT DISTINCT + + col0 / 31 + col2 / + col0 col0 FROM tab1 AS cor0
----
18
2
3

query I rowsort
SELECT ALL + col2 + col0 * - col2 + col0 * col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - tab2.col1 + col0 AS col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL - col0 + col2 * col1 * - 24 FROM tab0
----
-179177
-2363
-68136

query I rowsort
SELECT ALL + 19 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT cor0.col0 + + col0 AS col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 75 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
75

query I rowsort
SELECT - cor0.col2 * + col0 + + col0 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT + col1 * 53 + tab1.col2 AS col0 FROM tab1
----
1432
587
785

onlyif mysql # use DIV operator for integer division
query I rowsort label-5119
SELECT col0 + + ( + cor0.col1 + + cor0.col0 ) DIV col1 FROM tab1 AS cor0
----
4
71
87

skipif mysql # not compatible
query I rowsort label-5119
SELECT col0 + + ( + cor0.col1 + + cor0.col0 ) / col1 FROM tab1 AS cor0
----
4
71
87

query I rowsort
SELECT ALL 29 * - 35 AS col0 FROM tab0 AS cor0
----
-1015
-1015
-1015

query I rowsort
SELECT + 63 * col1 AS col1 FROM tab1 AS cor0
----
1638
630
819

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5122
SELECT ALL - + CAST( NULL AS SIGNED ) - 25 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5122
SELECT ALL - + CAST ( NULL AS INTEGER ) - 25 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 71 + 84 AS col2 FROM tab2 AS cor0
----
155
155
155

onlyif mysql # use DIV operator for integer division
query I rowsort label-5124
SELECT - col2 DIV + col0 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5124
SELECT - col2 / + col0 FROM tab2
----
-3
0
0

query I rowsort
SELECT - 83 + + col1 AS col0 FROM tab0 AS cor0
----
14
3
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * 6 + + col0 col1 FROM tab1 AS cor0
----
-153
2
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5127
SELECT - col0 DIV 91 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5127
SELECT - col0 / 91 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + cor0.col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT tab0.col1 * ( col0 ) AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
6

query I rowsort
SELECT 14 + + tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to d107aa96343b3d78e57ffa34e791fbbd

query I rowsort
SELECT - cor0.col1 * - col0 * col2 + 7 FROM tab0 AS cor0
----
3402
664125
68119

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab2, tab2 AS cor0
----
17

query I rowsort
SELECT - col0 * col2 + col1 * col0 * + 70 AS col1 FROM tab0
----
143688
237615
559632

query I rowsort
SELECT - ( - 38 ) AS col2 FROM tab1 AS cor0
----
38
38
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5136
SELECT 26 DIV - 89 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5136
SELECT 26 / - 89 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col0 + tab0.col2 - cor0.col0 FROM tab0, tab2 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT 74 AS col0 FROM tab0
----
74
74
74

query I rowsort
SELECT + ( + col1 ) * + cor0.col0 + + cor0.col0 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT ALL col1 + - col2 + col0 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT + - cor0.col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT col2 * cor0.col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - col2 + - 41 AS col2 FROM tab0 AS cor0
----
-123
-42
-74

query I rowsort
SELECT cor0.col1 * ( col1 ) + + col1 * + 97 FROM tab2 cor0
----
1938
3968
9204

query I rowsort
SELECT ALL + + col1 + + col2 * col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT ALL + + col0 * + col0 + col0 AS col2 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5147
SELECT ALL col2 * - CAST( 44 AS SIGNED ) * cor0.col1 + + col1 FROM tab0 AS cor0
----
-124786
-328237
-4171

skipif mysql # not compatible
query I rowsort label-5147
SELECT ALL col2 * - CAST ( 44 AS INTEGER ) * cor0.col1 + + col1 FROM tab0 AS cor0
----
-124786
-328237
-4171

query I rowsort
SELECT DISTINCT - col2 * 32 FROM tab2 AS cor0
----
-1216
-832
-864

query I rowsort
SELECT DISTINCT - col2 * col0 + - col0 AS col1 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL - - col1 * col2 + - col1 * - col1 * - col0 FROM tab2 AS cor0
----
-22185
-269984
-5890

query I rowsort
SELECT ( col1 ) + ( 7 + col1 ) FROM tab1
----
27
33
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 col1 FROM tab0
----
55
55
55

query I rowsort
SELECT ALL + - col0 * 83 FROM tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT DISTINCT + col1 + 68 AS col2 FROM tab0 AS cor0
----
154
159
165

onlyif mysql # use DIV operator for integer division
query I rowsort label-5155
SELECT col2 DIV - col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5155
SELECT col2 / - col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - - col0 + 95 FROM tab0 AS cor0
----
119
130
184

query I rowsort
SELECT + - cor0.col1 * col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - + col0 + col1 * + ( + col2 ) AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL - col0 + 13 FROM tab1 AS cor0
----
-51
-67
10

query I rowsort
SELECT col2 * + 52 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT - col2 * - 0 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * - 57 + col0 FROM tab0 AS cor0
----
1392
2030
5162

onlyif mysql # use DIV operator for integer division
query I rowsort label-5163
SELECT ALL + col2 + tab1.col2 DIV + col1 + col0 FROM tab1
----
126
183
59

skipif mysql # not compatible
query I rowsort label-5163
SELECT ALL + col2 + tab1.col2 / + col1 + col0 FROM tab1
----
126
183
59

query I rowsort
SELECT DISTINCT - tab2.col1 * col1 + + col1 - + tab2.col0 FROM tab2
----
-3500
-351
-937

onlyif mysql # use DIV operator for integer division
query I rowsort label-5165
SELECT col2 DIV - col2 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5165
SELECT col2 / - col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL col0 * + tab1.col2 AS col2 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5167
SELECT DISTINCT + col2 DIV + col0 + + col2 * col2 - + tab2.col2 AS col0 FROM tab2
----
1406
650
705

skipif mysql # not compatible
query I rowsort label-5167
SELECT DISTINCT + col2 / + col0 + + col2 * col2 - + tab2.col2 AS col0 FROM tab2
----
1406
650
705

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( - col0 + col1 ) >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 * + col2 + - col0 col2 FROM tab1
----
36416
4209
99760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5170
SELECT ALL col1 + + col0 DIV col2 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-5170
SELECT ALL col1 + + col0 / col2 FROM tab0
----
132
86
92

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( + col1 + - tab0.col2 + + col0 * + col1 )
----

query I rowsort
SELECT col0 * - tab1.col2 * col1 + + col1 AS col0 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT DISTINCT + col1 * col1 AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT col1 - + col2 * - col2 AS col0 FROM tab0
----
1175
6815
98

query I rowsort
SELECT ALL col0 * tab1.col0 AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL col1 + - col1 * col1 + + col2 AS col0 FROM tab2
----
-234
-3396
-903

query I rowsort
SELECT tab2.col2 * tab2.col1 + + col0 + tab2.col0 AS col1 FROM tab2
----
1690
804
851

query I rowsort
SELECT DISTINCT col2 * + col1 / + col0 FROM tab0 WHERE col0 + - col0 IN ( + tab0.col0 )
----

query I rowsort
SELECT ALL tab1.col0 * col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + + 93 + + col2 * 3 AS col2 FROM tab2 AS cor0
----
171
174
207

onlyif mysql # use DIV operator for integer division
query I rowsort label-5181
SELECT DISTINCT - - 10 + col0 DIV col0 FROM tab1 AS cor0
----
11

skipif mysql # not compatible
query I rowsort label-5181
SELECT DISTINCT - - 10 + col0 / col0 FROM tab1 AS cor0
----
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-5182
SELECT + + ( col1 ) * - col0 + - col0 DIV cor0.col0 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-5182
SELECT + + ( col1 ) * - col0 + - col0 / cor0.col0 FROM tab1 AS cor0
----
-1041
-641
-79

query I rowsort
SELECT ALL - 41 + - col1 FROM tab0 AS cor0
----
-127
-132
-138

query I rowsort
SELECT + - 90 FROM tab2 AS cor0
----
-90
-90
-90

query I rowsort
SELECT ALL + 38 * col1 FROM tab1 AS cor0
----
380
494
988

query I rowsort
SELECT DISTINCT - + col2 * col0 * col1 + ( - cor0.col2 ) FROM tab1 AS cor0
----
-36537
-4266
-99936

query I rowsort
SELECT 46 + + col0 FROM tab2 AS cor0
----
124
125
53

query I rowsort
SELECT DISTINCT col1 + col0 * col0 AS col1 FROM tab2
----
6143
6258
80

query I rowsort
SELECT + tab1.col2 + - col2 * col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT col2 * + col0 + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + col1 * - col1 * - ( col1 ) + - col0 FROM tab2 AS cor0
----
205301
29784
4834

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5192
SELECT ALL - cor0.col0 + cor0.col2 * CAST( col0 * col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
36416
4209
99760

skipif mysql # not compatible
query I rowsort label-5192
SELECT ALL - cor0.col0 + cor0.col2 * CAST ( col0 * col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
36416
4209
99760

query I rowsort
SELECT - + 41 FROM tab1 AS cor0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT 1 FROM tab0 cor0
----
1

query I rowsort
SELECT - col1 * col2 + 83 FROM tab0 cor0
----
-14
-2755
-7379

skipif mysql # not compatible
query I rowsort
SELECT + + col1 * + cor0.col2 + CAST ( - col0 * col0 AS REAL ) FROM tab1 AS cor0
----
-3526
-5152
1395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col2 col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 27 + - col2 * 88 FROM tab0 AS cor0
----
-2877
-61
-7189

query I rowsort
SELECT - col1 * - col0 + + ( cor0.col1 ) * + col2 AS col1 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT + 31 * - col1 + - ( col0 ) + + cor0.col1 AS col0 FROM tab0 AS cor0
----
-2604
-2819
-2945

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - cor0.col0 + + col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + 39 FROM tab0 AS cor0
----
39

query I rowsort
SELECT - - 25 + + col0 AS col2 FROM tab2 AS cor0
----
103
104
32

query I rowsort
SELECT - + col2 * + ( + 52 ) AS col2 FROM tab1 AS cor0
----
-2808
-2964
-4992

query I rowsort
SELECT col1 + col1 AS col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - col1 + 70 AS col1 FROM tab1 cor0
----
44
57
60

query I rowsort
SELECT ALL - - col0 + 49 FROM tab0 AS cor0
----
138
73
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5210
SELECT ALL CAST( - 85 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

skipif mysql # not compatible
query I rowsort label-5210
SELECT ALL CAST ( - 85 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5211
SELECT + cor0.col0 + - CAST( - 12 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
101
36
47

skipif mysql # not compatible
query I rowsort label-5211
SELECT + cor0.col0 + - CAST ( - 12 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
101
36
47

query I rowsort
SELECT col2 * + tab1.col0 + - 4 AS col2 FROM tab1
----
158
3644
7676

query I rowsort
SELECT - col2 * col2 + - col0 + 27 FROM tab0
----
-1086
-6786
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 31 * - col1 col1 FROM tab0 AS cor0
----
2666
2821
3007

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5215
SELECT DISTINCT CAST( NULL AS DECIMAL ) * + cor0.col2 + col2 * 18 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5215
SELECT DISTINCT CAST ( NULL AS REAL ) * + cor0.col2 + col2 * 18 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - CAST ( - col1 AS REAL ) + col1 * 98 FROM tab1 AS cor0
----
1261
2522
970

query I rowsort
SELECT 32 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT + col0 - + 56 FROM tab2 AS cor0
----
-49
22
23

query I rowsort
SELECT ALL + - ( col0 ) * col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 61 col2 FROM tab2 AS cor0
----
-61

query I rowsort
SELECT + ( col2 ) * + col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + - col2 + col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 40 * col0 * col0 AS col0 FROM tab1 AS cor0
----
-163840
-256000
-360

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to c04c36412775e8805d6b3befa2f52917

query I rowsort
SELECT ALL col1 + - 80 FROM tab0
----
11
17
6

query I rowsort
SELECT + 47 + + col0 AS col2 FROM tab2 AS cor0
----
125
126
54

query I rowsort
SELECT ALL - 50 AS col1 FROM tab1, tab0, tab2 cor0, tab2
----
81 values hashing to ece34ebef3a06d71156ce9f5c546aa60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col1 FROM tab2
----
95
95
95

query I rowsort
SELECT col0 * + tab1.col1 + col2 * - col2 + 63 FROM tab1
----
-2546
-2775
-8113

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * col2 + + col0 + - CAST ( - 5 AS REAL ) FROM tab0
----
7392
75
821

query I rowsort
SELECT ALL + 22 * col2 AS col0 FROM tab0
----
1804
22
726

query I rowsort
SELECT - - col1 * col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + - col1 + col0 * - col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab1, tab0 AS cor1
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

onlyif mysql # use DIV operator for integer division
query I rowsort label-5235
SELECT ALL + col1 DIV - col2 + - col1 FROM tab0 AS cor0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-5235
SELECT ALL + col1 / - col2 + - col1 FROM tab0 AS cor0
----
-194
-88
-92

query I rowsort
SELECT ( 80 ) AS col2 FROM tab0
----
80
80
80

query I rowsort
SELECT 48 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL col2 * - 61 AS col1 FROM tab0
----
-2013
-5002
-61

query I rowsort
SELECT ALL col0 * + col0 * col2 + col0 * col1 FROM tab1
----
234112
564
615440

query I rowsort
SELECT + 2 FROM tab0 AS cor0
----
2
2
2

query I rowsort
SELECT + + cor0.col1 * + ( col0 * - col2 ) FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT 43 FROM tab2, tab1 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT ALL col1 - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + col2 + col0 * + col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - + col1 * col1 * - col1 + - col2 AS col2 FROM tab0 AS cor0
----
636023
753489
912672

query I rowsort
SELECT col1 + col0 + - col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col2 - - col0 * col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT col1 - - col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + + col2 * cor0.col2 * - col1 + col1 AS col0 FROM tab1 AS cor0
----
-119795
-32480
-75790

query I rowsort
SELECT + cor0.col1 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5252
SELECT col1 DIV col1 + col0 * cor0.col0 FROM tab0 AS cor0
----
1226
577
7922

skipif mysql # not compatible
query I rowsort label-5252
SELECT col1 / col1 + col0 * cor0.col0 FROM tab0 AS cor0
----
1226
577
7922

query I rowsort
SELECT - ( col0 + col0 ) * + col0 FROM tab2
----
-12168
-12482
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5254
SELECT CAST( NULL AS SIGNED ) * - col2 + col1 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5254
SELECT CAST ( NULL AS INTEGER ) * - col2 + col1 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * col1 * + col0 + + col1 * - col2 col1 FROM tab0
----
118728
46698
713349

query I rowsort
SELECT ALL tab0.col1 + - col0 AS col0 FROM tab0
----
2
62
62

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 + 78 + + col0 col2 FROM tab2 AS cor0
----
156
157
85

query I rowsort
SELECT - col2 - col1 * col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5260
SELECT DISTINCT + col0 DIV col2 AS col1 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5260
SELECT DISTINCT + col0 / col2 AS col1 FROM tab0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5261
SELECT ALL - col0 DIV + col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-5261
SELECT ALL - col0 / + col1 FROM tab1
----
-6
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5262
SELECT DISTINCT col1 DIV col1 AS col1 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-5262
SELECT DISTINCT col1 / col1 AS col1 FROM tab0
----
1

query I rowsort
SELECT - col0 + - col1 * - col2 * tab1.col2 - + col1 FROM tab1
----
119715
32416
75787

query I rowsort
SELECT tab2.col2 * col1 * + col0 AS col1 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5265
SELECT ALL + col2 DIV col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5265
SELECT ALL + col2 / col0 FROM tab1
----
0
1
18

query I rowsort
SELECT - col0 * - col0 * + col2 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-5267
SELECT DISTINCT col1 DIV col0 col2 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5267
SELECT DISTINCT col1 / col0 col2 FROM tab0 AS cor0
----
1
2
3

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE - col2 > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5269
SELECT col1 DIV col1 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5269
SELECT col1 / col1 AS col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

query I rowsort
SELECT col1 FROM tab1 AS cor0 WHERE col1 + + col1 > ( - col1 * col0 + col1 / + cor0.col2 - + col0 )
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5272
SELECT col0 DIV + col0 - - col2 AS col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-5272
SELECT col0 / + col0 - - col2 AS col1 FROM tab0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5273
SELECT DISTINCT + tab2.col0 - - col0 DIV - col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-5273
SELECT DISTINCT + tab2.col0 - - col0 / - col0 FROM tab2
----
6
77
78

query I rowsort
SELECT + tab2.col0 * - tab2.col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col2 - col0 * + col2 AS col0 FROM tab0
----
-34
-7216
-759

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 + - col1 = ( NULL )
----

query I rowsort
SELECT DISTINCT col1 / - col1 AS col1 FROM tab1 WHERE col1 * col1 = ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5278
SELECT ALL col1 DIV col2 col0 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5278
SELECT ALL col1 / col2 col0 FROM tab0
----
1
2
97

query I rowsort
SELECT col0 + - col2 * + col1 * - tab1.col1 + + tab1.col1 AS col2 FROM tab1
----
16317
36533
5774

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col0 - col1 BETWEEN ( NULL ) AND col0
----

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5282
SELECT tab2.col1 DIV col0 - - col0 FROM tab2
----
11
78
79

skipif mysql # not compatible
query I rowsort label-5282
SELECT tab2.col1 / col0 - - col0 FROM tab2
----
11
78
79

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL BETWEEN col0 / + col1 AND + col0
----

query I rowsort
SELECT - + col1 + col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + col0 * col2 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL col0 + col0 * col0 + col1 FROM tab1 cor0
----
38
4170
6493

query III rowsort
SELECT * FROM tab2 cor0 WHERE NOT NULL <> NULL OR NULL IN ( - col1 )
----

query I rowsort
SELECT - col0 * + col2 + - col1 * + col2 AS col2 FROM tab0 AS cor0
----
-132
-14760
-3630

query I rowsort
SELECT DISTINCT + col2 * - col0 AS col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5290
SELECT ALL + cor0.col0 + col1 * - col1 DIV - col1 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-5290
SELECT ALL + cor0.col0 + col1 * - col1 / - col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - + col0 * + col2 + col2 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-5292
SELECT col2 DIV tab1.col0 + col0 * + col1 FROM tab1
----
1041
640
96

skipif mysql # not compatible
query I rowsort label-5292
SELECT col2 / tab1.col0 + col0 * + col1 FROM tab1
----
1041
640
96

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col0 BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5294
SELECT col2 DIV col0 col0 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5294
SELECT col2 / col0 col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT DISTINCT + col1 * + col1 AS col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL tab2.col0 * tab2.col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT - col1 + + col2 AS col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + + cor0.col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + - 30 * + col0 FROM tab1 AS cor0
----
-1920
-2400
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 + col2 col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT + - 11 AS col0 FROM tab1 AS cor0
----
-11
-11
-11

query I rowsort
SELECT ALL 61 * + 89 AS col1 FROM tab2 AS cor0
----
5429
5429
5429

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 * - col2 + cor0.col1 FROM tab1 cor0
----
-119795
-32480
-75790

query I rowsort
SELECT DISTINCT + ( - col2 ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT 21 * - col2 FROM tab2 AS cor0
----
-546
-567
-798

query I rowsort
SELECT 89 + col1 AS col1 FROM tab1 AS cor0
----
102
115
99

query I rowsort
SELECT DISTINCT + + 97 * - col2 + - cor0.col2 FROM tab2 AS cor0
----
-2548
-2646
-3724

query I rowsort
SELECT + col2 * - cor0.col2 + col0 * + 70 AS col1 FROM tab2 AS cor0
----
-239
4086
4784

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - 77 + col2 AS col2 FROM tab1 cor0
----
-20
-23
19

query I rowsort
SELECT ALL + tab1.col0 + - col2 AS col1 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL col1 + col1 * ( col0 + col0 ) * - col1 FROM tab2
----
-13423
-45645
-542977

onlyif mysql # use DIV operator for integer division
query I rowsort label-5313
SELECT - + cor0.col0 DIV cor0.col0 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5313
SELECT - + cor0.col0 / cor0.col0 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + ( 82 ) * cor0.col2 * - col2 + + col2 FROM tab1 cor0
----
-239058
-266361
-755616

query I rowsort
SELECT DISTINCT + col1 * - ( - col2 * + cor0.col0 ) AS col1 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + + 92 * + cor0.col0 FROM tab0 AS cor0
----
2208
3220
8188

query I rowsort
SELECT DISTINCT + ( - 17 ) + + col0 * col1 FROM tab1 AS cor0
----
1023
61
623

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5318
SELECT + + CAST( NULL AS SIGNED ) + col2 * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5318
SELECT + + CAST ( NULL AS INTEGER ) + col2 * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 99 FROM tab1, tab2 cor0
----
99

query I rowsort
SELECT col0 - - ( tab1.col0 ) * 55 AS col0 FROM tab1
----
168
3584
4480

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 CROSS JOIN tab2
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT DISTINCT - + 51 AS col1 FROM tab0 AS cor0
----
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5323
SELECT - - col2 DIV - col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5323
SELECT - - col2 / - col1 FROM tab2 AS cor0
----
-2
0
0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT 26 + 86 AS col0 FROM tab1 AS cor0
----
112
112
112

query I rowsort
SELECT + + col0 + col0 * col2 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - - 0 + col1 * col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col0 + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * ( - col0 ) + cor0.col0 col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT cor0.col0 * col2 + col1 FROM tab1 cor0
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5331
SELECT - col2 + CAST( NULL AS DECIMAL ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5331
SELECT - col2 + CAST ( NULL AS REAL ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab1.col2 + col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT cor0.col0 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + + cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col1 * col2 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query IIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 70 col2 FROM tab0
----
6020
6370
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 94 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab2 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

query I rowsort
SELECT DISTINCT col0 * + ( col0 ) + cor0.col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL col2 - - col0 * - col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-5342
SELECT col0 DIV + col0 + + ( - col2 + + col0 ) AS col1 FROM tab1 AS cor0
----
-15
-50
8

skipif mysql # not compatible
query I rowsort label-5342
SELECT col0 / + col0 + + ( - col2 + + col0 ) AS col1 FROM tab1 AS cor0
----
-15
-50
8

query I rowsort
SELECT col1 * 36 AS col0 FROM tab0 cor0
----
3096
3276
3492

onlyif mysql # use DIV operator for integer division
query I rowsort label-5344
SELECT ALL - cor0.col0 DIV cor0.col1 - + col0 FROM tab1 cor0
----
-3
-70
-86

skipif mysql # not compatible
query I rowsort label-5344
SELECT ALL - cor0.col0 / cor0.col1 - + col0 FROM tab1 cor0
----
-3
-70
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-5345
SELECT DISTINCT + + col2 DIV ( col0 ) FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-5345
SELECT DISTINCT + + col2 / ( col0 ) FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT ALL - - col0 * - 86 - ( - col2 ) FROM tab0 AS cor0
----
-2031
-3009
-7572

query I rowsort
SELECT + col1 - - 89 FROM tab0 cor0
----
175
180
186

query I rowsort
SELECT col0 * + 29 + - col0 AS col1 FROM tab0 AS cor0
----
2492
672
980

query I rowsort
SELECT ALL + - 16 + + col0 * col1 FROM tab2 AS cor0
----
1327
201
4586

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT - ( - col1 ) + + cor0.col0 + + 18 FROM tab1 AS cor0
----
111
47
92

query I rowsort
SELECT DISTINCT + - 65 * - 72 AS col1 FROM tab1 AS cor0
----
4680

query I rowsort
SELECT ( - col0 + - col2 ) FROM tab1
----
-121
-176
-57

query I rowsort
SELECT ALL - col2 + 34 * col0 FROM tab2 AS cor0
----
211
2626
2648

query I rowsort
SELECT ALL + 9 AS col0 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT - - 70 * + col1 FROM tab1 AS cor0
----
1820
700
910

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab1, tab0 AS cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ALL + col1 + + 19 * col0 AS col0 FROM tab2 AS cor0
----
1518
1541
164

query I rowsort
SELECT - cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5360
SELECT - CAST( NULL AS SIGNED ) + + 92 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5360
SELECT - CAST ( NULL AS INTEGER ) + + 92 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + + col2 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5362
SELECT ALL - ( - col2 + ( + col0 ) ) DIV + col0 AS col0 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5362
SELECT ALL - ( - col2 + ( + col0 ) ) / + col0 AS col0 FROM tab2
----
0
0
2

query I rowsort
SELECT 31 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT - + col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - 24 FROM tab2 AS cor0
----
-24

query I rowsort
SELECT ALL 22 AS col2 FROM tab0 AS cor0
----
22
22
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * 35 col1 FROM tab0 AS cor0
----
1225
3115
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-5368
SELECT - + cor0.col2 DIV 22 FROM tab0 AS cor0
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-5368
SELECT - + cor0.col2 / 22 FROM tab0 AS cor0
----
-1
-3
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5369
SELECT - cor0.col0 * CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5369
SELECT - cor0.col0 * CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * - 95 FROM tab2 AS cor0
----
-2470
-2565
-3610

query I rowsort
SELECT + col0 - ( + col0 ) FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + + col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT cor0.col2 * + col1 * col1 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT + col0 * + 36 AS col0 FROM tab0 AS cor0
----
1260
3204
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-5375
SELECT ALL + - col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5375
SELECT ALL + - col0 / col0 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5376
SELECT + col2 * - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5376
SELECT + col2 * - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + 95 * cor0.col0 AS col2 FROM tab0 AS cor0
----
2280
3325
8455

query I rowsort
SELECT DISTINCT + 4 FROM tab0
----
4

query I rowsort
SELECT 16 AS col2 FROM tab2
----
16
16
16

query I rowsort
SELECT DISTINCT - col2 + 73 AS col1 FROM tab0
----
-9
40
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5382
SELECT + 99 DIV + col1 AS col2 FROM tab1
----
3
7
9

skipif mysql # not compatible
query I rowsort label-5382
SELECT + 99 / + col1 AS col2 FROM tab1
----
3
7
9

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab1
----
24

query I rowsort
SELECT 89 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

onlyif mysql # use DIV operator for integer division
query I rowsort label-5385
SELECT DISTINCT + col2 DIV + col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5385
SELECT DISTINCT + col2 / + col0 FROM tab1
----
0
1
18

query I rowsort
SELECT DISTINCT ( col1 + ( - col1 ) ) AS col0 FROM tab0
----
0

query I rowsort
SELECT - - 45 - 55 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT - col1 * col1 + ( + 98 ) - col1 AS col1 FROM tab1 AS cor0
----
-12
-604
-84

query I rowsort
SELECT + 96 * + col0 AS col2 FROM tab2
----
672
7488
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-5390
SELECT + tab2.col0 * col2 DIV + 32 FROM tab2
----
5
63
93

skipif mysql # not compatible
query I rowsort label-5390
SELECT + tab2.col0 * col2 / + 32 FROM tab2
----
5
63
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5391
SELECT + col1 + + CAST( col1 * + col1 AS SIGNED ) FROM tab2
----
306
3540
992

skipif mysql # not compatible
query I rowsort label-5391
SELECT + col1 + + CAST ( col1 * + col1 AS INTEGER ) FROM tab2
----
306
3540
992

onlyif mysql # use DIV operator for integer division
query I rowsort label-5392
SELECT ALL - - col2 DIV - ( + col2 ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5392
SELECT ALL - - col2 / - ( + col2 ) FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5393
SELECT DISTINCT col0 + col0 DIV 42 FROM tab0 AS cor0
----
24
35
91

skipif mysql # not compatible
query I rowsort label-5393
SELECT DISTINCT col0 + col0 / 42 FROM tab0 AS cor0
----
24
35
91

query I rowsort
SELECT DISTINCT - + col2 - col1 * + 88 FROM tab0 AS cor0
----
-7601
-8090
-8537

query I rowsort
SELECT + - col2 + ( - col0 ) AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - + 3 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2
30
79

query I rowsort
SELECT ALL + col2 - col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( col2 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + + ( col1 ) AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL 70 * + 95 + - col2 AS col1 FROM tab0 AS cor0
----
6568
6617
6649

query I rowsort
SELECT + + col1 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
3645 values hashing to 2e3240e8d3c0c7c6ff427f9572ba362d

query I rowsort
SELECT + 11 + + col1 AS col0 FROM tab2 AS cor0
----
28
42
70

query I rowsort
SELECT - + col1 + col2 * + col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT - 74 FROM tab1 AS cor0
----
-74
-74
-74

query I rowsort
SELECT col1 + - col1 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + - 68 * + 82 AS col0 FROM tab0 AS cor0
----
-5576
-5576
-5576

query I rowsort
SELECT - 78 * + col0 - + col0 AS col0 FROM tab2
----
-553
-6162
-6241

query I rowsort
SELECT ALL ( - 54 ) * col0 AS col2 FROM tab1
----
-162
-3456
-4320

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2, tab0 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5411
SELECT CAST( - 96 AS SIGNED ) AS col2 FROM tab1
----
-96
-96
-96

skipif mysql # not compatible
query I rowsort label-5411
SELECT CAST ( - 96 AS INTEGER ) AS col2 FROM tab1
----
-96
-96
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5412
SELECT ALL cor2.col1 DIV + 35 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

skipif mysql # not compatible
query I rowsort label-5412
SELECT ALL cor2.col1 / + 35 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

query I rowsort
SELECT + cor0.col2 * - col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + + col0 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 78 FROM tab1 cor0
----
-78

query I rowsort
SELECT DISTINCT 74 AS col2 FROM tab0 AS cor0
----
74

query I rowsort
SELECT + - 84 + + col2 FROM tab2 AS cor0
----
-46
-57
-58

query I rowsort
SELECT ALL + - 62 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

query I rowsort
SELECT ALL - 4 + + col1 FROM tab0 AS cor0
----
82
87
93

query I rowsort
SELECT DISTINCT + col2 * col0 - col2 * + col0 * col2 AS col1 FROM tab0 AS cor0
----
-25344
-591138
0

query I rowsort
SELECT col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col2 * + cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 * col0 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col1 * col0 + col1 * - col2 AS col2 FROM tab0 cor0
----
-15561
-3492
-4902

query I rowsort
SELECT ALL col0 * col0 + + col0 + + col1 FROM tab1 AS cor0
----
38
4170
6493

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 + cor0.col0 col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5427
SELECT + + col2 DIV + 8 AS col2 FROM tab2 AS cor0
----
3
3
4

skipif mysql # not compatible
query I rowsort label-5427
SELECT + + col2 / + 8 AS col2 FROM tab2 AS cor0
----
3
3
4

query I rowsort
SELECT + col2 + col1 AS col0 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5429
SELECT + col2 DIV 35 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5429
SELECT + col2 / 35 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT col0 + - 51 AS col0 FROM tab1 AS cor0
----
-48
13
29

query I rowsort
SELECT - + col2 * - 5 + + col1 * cor0.col1 FROM tab2 AS cor0
----
1096
3611
479

query I rowsort
SELECT ALL 7 * + col1 FROM tab0
----
602
637
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-5433
SELECT DISTINCT - col2 DIV - col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5433
SELECT DISTINCT - col2 / - col1 FROM tab1
----
2
5
7

query I rowsort
SELECT - col0 * col1 AS col0 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5435
SELECT - cor0.col1 / 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-5435
SELECT - cor0.col1 / CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col2 * col0 + + col0 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5437
SELECT CAST( - col0 AS SIGNED ) * + cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-5437
SELECT CAST ( - col0 AS INTEGER ) * + cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col0 * col0 * 1 FROM tab0
----
1225
576
7921

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab0 AS cor0 WHERE ( NULL ) <> NULL
----

query I rowsort
SELECT ALL ( cor0.col2 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + col2 * tab1.col0 + col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT ALL 46 + + col0 AS col2 FROM tab1
----
110
126
49

query I rowsort
SELECT DISTINCT - + 13 AS col2 FROM tab0 AS cor0
----
-13

query I rowsort
SELECT DISTINCT ( - col0 ) * 25 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT - 98 * cor0.col0 FROM tab0 AS cor0
----
-2352
-3430
-8722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT 63 * col2 + - col0 AS col1 FROM tab2 AS cor0
----
1560
1694
2315

query I rowsort
SELECT ALL + 79 AS col1 FROM tab0 AS cor0
----
79
79
79

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to b3ea820890445d59f3f7464a1521d42d

query I rowsort
SELECT - 52 - col2 * - 65 AS col0 FROM tab0 AS cor0
----
13
2093
5278

query I rowsort
SELECT - + col1 * + cor0.col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab0 cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col1 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col2 * 68 + + col2 - col1 * + col2 AS col0 FROM tab1 AS cor0
----
2322
3363
5376

onlyif mysql # use DIV operator for integer division
query I rowsort label-5455
SELECT col2 + ( col1 ) DIV col0 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-5455
SELECT col2 + ( col1 ) / col0 FROM tab2 AS cor0
----
26
31
38

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-5457
SELECT ALL - col0 + cor0.col2 DIV + col0 + + col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5457
SELECT ALL - col0 + cor0.col2 / + col0 + + col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT col1 + 45 FROM tab1 AS cor0
----
55
58
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-5459
SELECT DISTINCT + + col0 DIV col1 + col2 - + col0 * col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

skipif mysql # not compatible
query I rowsort label-5459
SELECT DISTINCT + + col0 / col1 + col2 - + col0 * col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5460
SELECT DISTINCT - - col1 - + CAST( + 62 AS SIGNED ) FROM tab1 AS cor0
----
-36
-49
-52

skipif mysql # not compatible
query I rowsort label-5460
SELECT DISTINCT - - col1 - + CAST ( + 62 AS INTEGER ) FROM tab1 AS cor0
----
-36
-49
-52

query I rowsort
SELECT DISTINCT + col1 + - 57 + - col1 AS col2 FROM tab0 AS cor0
----
-57

query I rowsort
SELECT + ( - col1 ) + ( - col1 ) FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ALL 77 * - col0 + - col0 FROM tab1
----
-234
-4992
-6240

query I rowsort
SELECT 43 + + col0 + - 98 AS col2 FROM tab2
----
-48
23
24

query I rowsort
SELECT ALL + 10 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ALL - - cor0.col1 * - 72 AS col0 FROM tab1 AS cor0
----
-1872
-720
-936

query I rowsort
SELECT - col0 * 63 AS col0 FROM tab1 AS cor0
----
-189
-4032
-5040

query I rowsort
SELECT DISTINCT - - ( - 9 ) + - col0 * - col1 FROM tab0 cor0
----
2055
3386
8090

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 8 * ( + col0 ) col0 FROM tab1 AS cor0
----
24
512
640

query I rowsort
SELECT ALL - 39 FROM tab0 cor0
----
-39
-39
-39

query I rowsort
SELECT ALL + col2 * - ( - col1 ) + + col1 + 4 FROM tab2 AS cor0
----
1597
667
872

query I rowsort
SELECT + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - + ( 59 ) * + col0 AS col1 FROM tab2 AS cor0
----
-413
-4602
-4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( cor0.col0 ) * - col1 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT 52 FROM tab2 cor0
----
52
52
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5476
SELECT ALL CAST( ( col1 ) AS SIGNED ) col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5476
SELECT ALL CAST ( ( col1 ) AS INTEGER ) col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - - col2 + + cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL col2 * ( + col1 ) FROM tab0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5479
SELECT DISTINCT + + CAST( - col0 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5479
SELECT DISTINCT + + CAST ( - col0 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + - col1 + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT DISTINCT + + ( + 6 ) FROM tab2 AS cor0
----
6

query I rowsort
SELECT DISTINCT - + 50 + - cor0.col1 * + col2 + + col1 FROM tab0 AS cor0
----
-2802
-50
-7421

query I rowsort
SELECT - col0 * cor0.col2 + col2 FROM tab1 cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 71 AS REAL ) AS col1 FROM tab2 AS cor0
----
-71
-71
-71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5486
SELECT + CAST( NULL AS SIGNED ) + - 33 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5486
SELECT + CAST ( NULL AS INTEGER ) + - 33 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 55 + 24 * col2 FROM tab0 AS cor0
----
2023
79
847

query I rowsort
SELECT - 45 * + col1 AS col0 FROM tab2 AS cor0
----
-1395
-2655
-765

query I rowsort
SELECT tab0.col1 - + 66 FROM tab0
----
20
25
31

query I rowsort
SELECT ALL + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 + col0 * - col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - 41 FROM tab1 AS cor0
----
-41

query I rowsort
SELECT ALL - cor0.col2 + col2 * - 11 FROM tab0 AS cor0
----
-12
-396
-984

query I rowsort
SELECT ALL - 48 AS col1 FROM tab1 AS cor0
----
-48
-48
-48

query I rowsort
SELECT 86 + col0 * tab0.col2 * - col1 FROM tab0
----
-3309
-664032
-68026

query I rowsort
SELECT ALL - 58 AS col1 FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 897f42d096eff3935f4f50603850c23b

query I rowsort
SELECT + tab1.col0 + - cor0.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 179f1c4ecae3615ed02c294cbc435c7b

query I rowsort
SELECT DISTINCT - 46 + col0 AS col0 FROM tab2 AS cor0
----
-39
32
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-5499
SELECT - cor0.col2 DIV col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5499
SELECT - cor0.col2 / col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ( - 26 + col2 ) FROM tab0
----
-25
56
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5501
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5501
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 40 * 79 + - col1 FROM tab0
----
3063
3069
3074

query I rowsort
SELECT DISTINCT col2 * - col2 + + col1 + + col0 FROM tab1
----
-2887
-3175
-9123

onlyif mysql # use DIV operator for integer division
query I rowsort label-5504
SELECT DISTINCT col1 + col2 * - col1 + ( + tab2.col0 ) DIV - col0 FROM tab2
----
-1476
-630
-807

skipif mysql # not compatible
query I rowsort label-5504
SELECT DISTINCT col1 + col2 * - col1 + ( + tab2.col0 ) / - col0 FROM tab2
----
-1476
-630
-807

query I rowsort
SELECT + 1 * col0 * 52 AS col0 FROM tab0
----
1248
1820
4628

query I rowsort
SELECT ALL 30 + cor0.col0 FROM tab2 AS cor0
----
108
109
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-5507
SELECT + col0 DIV col1 col2 FROM tab2 AS cor0
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5507
SELECT + col0 / col1 col2 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT + - 95 * col1 AS col0 FROM tab0 AS cor0
----
-8170
-8645
-9215

query I rowsort
SELECT ALL - - col0 * + col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - 31 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab1, tab2 cor1
----
243 values hashing to d489341cd587fd6eb0b972c5464c6ddc

query I rowsort
SELECT 51 FROM tab1, tab2 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT DISTINCT col0 + + cor0.col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 col0 FROM tab2 AS cor0
----
75
75
75

query I rowsort
SELECT ALL 11 AS col1 FROM tab2
----
11
11
11

query I rowsort
SELECT DISTINCT - 16 * + cor0.col1 FROM tab2, tab2 AS cor0
----
-272
-496
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col0 col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - 15 * - 5 + col2 AS col0 FROM tab0 AS cor0
----
108
157
76

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT ( col2 ) * col1 + + 31 * - col0 AS col0 FROM tab1 AS cor0
----
-1232
-1414
1311

query I rowsort
SELECT DISTINCT - + col0 + ( col0 ) * ( cor0.col2 ) AS col0 FROM tab1 cor0
----
159
3584
7600

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-5523
SELECT - col0 DIV - col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5523
SELECT - col0 / - col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 52 col0 FROM tab0 AS cor0
----
4472
4732
5044

query I rowsort
SELECT + + col1 * + ( - cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5526
SELECT ALL - CAST( NULL AS SIGNED ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5526
SELECT ALL - CAST ( NULL AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) - + col0 col0 FROM tab1 AS cor0
----
-128
-160
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col0 col0 FROM tab1
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5529
SELECT + CAST( + 56 AS SIGNED ) FROM tab2, tab2 cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

skipif mysql # not compatible
query I rowsort label-5529
SELECT + CAST ( + 56 AS INTEGER ) FROM tab2, tab2 cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT + 27 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-5531
SELECT + + col0 + - cor0.col0 DIV col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-5531
SELECT + + col0 + - cor0.col0 / col1 FROM tab2 AS cor0
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5532
SELECT + col0 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5532
SELECT + col0 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor1.col1 AS col2 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-5534
SELECT ( - cor0.col1 ) DIV ( + col2 ) + - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-5534
SELECT ( - cor0.col1 ) / ( + col2 ) + - col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT 18 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT - 40 + + col2 FROM tab1
----
14
17
56

query I rowsort
SELECT DISTINCT 88 * col1 FROM tab0
----
7568
8008
8536

onlyif mysql # use DIV operator for integer division
query I rowsort label-5538
SELECT ALL 11 DIV col2 FROM tab0 AS cor0
----
0
0
11

skipif mysql # not compatible
query I rowsort label-5538
SELECT ALL 11 / col2 FROM tab0 AS cor0
----
0
0
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 19 col1 FROM tab1
----
19
19
19

query I rowsort
SELECT ALL 54 AS col0 FROM tab0
----
54
54
54

query I rowsort
SELECT ALL + col0 + cor0.col1 * col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT + col2 + col1 * 83 * col0 FROM tab0 AS cor0
----
171345
281786
672299

query I rowsort
SELECT DISTINCT + - col0 + - ( col2 ) * + col2 + + col1 * col2 AS col0 FROM tab0 AS cor0
----
1725
61
649

query I rowsort
SELECT DISTINCT 11 + + col1 AS col1 FROM tab1
----
21
24
37

query I rowsort
SELECT + 88 + + col2 * + 98 FROM tab2
----
2636
2734
3812

query I rowsort
SELECT col0 - - col1 * col2 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL - tab0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT + tab2.col0 * col1 + col1 * col2 FROM tab2
----
1054
1989
6136

query I rowsort
SELECT ALL tab0.col1 * + ( tab0.col0 * + col0 ) FROM tab0
----
118825
49536
720811

query I rowsort
SELECT + 88 FROM tab0, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT - cor0.col1 * + ( ( col2 ) + 37 ) FROM tab0 AS cor0
----
-10829
-3686
-6020

query I rowsort
SELECT DISTINCT - - col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL - cor0.col1 * 54 * col1 FROM tab2 AS cor0
----
-15606
-187974
-51894

query I rowsort
SELECT ALL - - col2 + col2 * ( - cor0.col2 ) FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT - col0 * tab2.col0 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + col2 * + 67 AS col2 FROM tab0
----
2211
5494
67

query I rowsort
SELECT + 43 * - tab0.col0 AS col0 FROM tab0
----
-1032
-1505
-3827

query I rowsort
SELECT ALL ( col2 * col0 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT - col0 * + 13 AS col1 FROM tab1
----
-1040
-39
-832

query I rowsort
SELECT DISTINCT + cor0.col0 + + 7 FROM tab1, tab0 AS cor0
----
31
42
96

query I rowsort
SELECT + col2 * 96 AS col1 FROM tab2 AS cor0
----
2496
2592
3648

query I rowsort
SELECT DISTINCT + col2 - - col0 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL 95 - 54 * - col2 * - col1 FROM tab1
----
-30685
-67297
-75721

query I rowsort
SELECT DISTINCT ( col2 ) - - col0 * col0 FROM tab1
----
4153
63
6496

query I rowsort
SELECT 96 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
61
7
72

query I rowsort
SELECT + 71 * col1 + + col0 AS col2 FROM tab2 AS cor0
----
1286
2208
4267

query I rowsort
SELECT DISTINCT + 99 + col0 * + 24 FROM tab2 AS cor0
----
1971
1995
267

query I rowsort
SELECT ALL + col0 * + col0 + col2 AS col1 FROM tab1 cor0
----
4153
63
6496

query I rowsort
SELECT ALL + + col1 + + col1 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5571
SELECT + + col2 * cor0.col1 + + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5571
SELECT + + col2 * cor0.col1 + + CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab1.col0 * 45 * col1 AS col1 FROM tab1
----
28800
3510
46800

query I rowsort
SELECT + col2 - 21 FROM tab0
----
-20
12
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-5574
SELECT col2 DIV + 23 + - col0 * + col2 FROM tab1
----
-160
-3646
-7676

skipif mysql # not compatible
query I rowsort label-5574
SELECT col2 / + 23 + - col0 * + col2 FROM tab1
----
-160
-3646
-7676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5575
SELECT DISTINCT - col1 * CAST( NULL AS SIGNED ) + col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5575
SELECT DISTINCT - col1 * CAST ( NULL AS INTEGER ) + col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 * ( - col0 ) * col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + 19 FROM tab2, tab2 cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT DISTINCT - col1 * - cor0.col1 + col1 * ( + ( col1 ) ) FROM tab2 AS cor0
----
1922
578
6962

query I rowsort
SELECT + + ( - col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - col1 + - 65 AS col0 FROM tab1 AS cor0
----
-75
-78
-91

query I rowsort
SELECT DISTINCT - col0 - - 46 * col0 AS col1 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT ALL + - ( + col2 ) + col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - + col2 - + cor0.col1 * col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + 48 + - col0 AS col0 FROM tab2 AS cor0
----
-30
-31
41

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab0, tab2 AS cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT DISTINCT 44 * - col1 + + tab0.col1 AS col1 FROM tab0
----
-3698
-3913
-4171

query I rowsort
SELECT DISTINCT + + 37 + col2 AS col2 FROM tab1 cor0
----
133
91
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-5588
SELECT ALL - + 98 DIV 51 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5588
SELECT ALL - + 98 / 51 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col0 * 18 + + col1 * + col0 AS col2 FROM tab2 AS cor0
----
-79
3198
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-5590
SELECT - ( col1 ) - + col1 DIV + 19 col2 FROM tab1 AS cor0
----
-10
-13
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5590
SELECT - ( col1 ) - + col1 / + 19 col2 FROM tab1 AS cor0
----
-10
-13
-27

query I rowsort
SELECT 91 - - col0 * + col2 * 87 FROM tab0 AS cor0
----
3136
635017
68995

query I rowsort
SELECT ( - col2 ) + + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( col2 ) + - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL 34 AS col0 FROM tab0 AS cor0
----
34
34
34

query I rowsort
SELECT - + 44 * 70 + - cor0.col2 FROM tab1 AS cor0
----
-3134
-3137
-3176

query I rowsort
SELECT - col2 * + col2 - + col0 AS col0 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT ALL - ( - col2 ) * col0 + ( - 33 ) FROM tab1 AS cor0
----
129
3615
7647

onlyif mysql # use DIV operator for integer division
query I rowsort label-5598
SELECT ALL col2 DIV - col2 + col0 DIV ( col1 + + col2 ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5598
SELECT ALL col2 / - col2 + col0 / ( col1 + + col2 ) FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT ( + ( col1 ) ) FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - - col0 * + col1 + col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - tab0.col1 * col0 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 10 * + col0 FROM tab1 AS cor0
----
30
640
800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab2, tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT - ( col1 ) + + col1 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + + col2 * + cor0.col0 * col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT col0 + tab1.col2 * 79 FROM tab1
----
4269
4567
7664

query I rowsort
SELECT 48 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 4 * col1 col0 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT + col1 + - col0 * 27 FROM tab1 AS cor0
----
-1718
-2147
-55

query I rowsort
SELECT ALL - ( + col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col2 * col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 97 + col1 FROM tab0 AS cor0
----
183
188
194

query I rowsort
SELECT DISTINCT - col2 * + col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - col1 * - col1 AS col0 FROM tab1 cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5615
SELECT ALL - + 70 * + col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5615
SELECT ALL - + 70 * + col0 * 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-5616
SELECT - col0 + col0 * CAST( - col0 AS SIGNED ) FROM tab1 AS cor0
----
-12
-4160
-6480

skipif mysql # not compatible
query I rowsort label-5616
SELECT - col0 + col0 * CAST ( - col0 AS INTEGER ) FROM tab1 AS cor0
----
-12
-4160
-6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-5617
SELECT ALL + col0 DIV - col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5617
SELECT ALL + col0 / - col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - col2 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 + col2 * - 50 AS col2 FROM tab2 AS cor0
----
-1326
-1377
-1938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * + col1 col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL ( + col1 ) + + col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - + col0 * col1 + - col0 * col1 + - col0 * - col1 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - 16 * - col0 - + 0 * - cor0.col2 FROM tab2 AS cor0
----
112
1248
1264

query I rowsort
SELECT DISTINCT + col0 + 26 AS col0 FROM tab1 AS cor0
----
106
29
90

query I rowsort
SELECT DISTINCT - - col1 * + col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + + col1 AS col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col2 * - col0 * - col2 + col2 - + 77 AS col2 FROM tab2 AS cor0
----
-114115
-5153
-52779

query I rowsort
SELECT ALL 67 FROM tab2, tab0 AS cor0, tab2 cor1, tab0, tab1 AS cor2
----
243 values hashing to d502cfec04c7f71d688175ee0de49a52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5629
SELECT - col0 - - col1 * - CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5629
SELECT - col0 - - col1 * - CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 + + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - - col0 * 80 FROM tab0 AS cor0
----
1920
2800
7120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5632
SELECT DISTINCT - cor0.col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5632
SELECT DISTINCT - cor0.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5633
SELECT ALL - col2 DIV 44 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5633
SELECT ALL - col2 / 44 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5634
SELECT - col1 * CAST( col1 + col2 AS SIGNED ) FROM tab0 AS cor0
----
-10234
-15743
-9506

skipif mysql # not compatible
query I rowsort label-5634
SELECT - col1 * CAST ( col1 + col2 AS INTEGER ) FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT DISTINCT - + cor0.col1 * 69 FROM tab2 AS cor0
----
-1173
-2139
-4071

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 + + col1 * - col1 col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL + col0 + - 79 * - cor0.col0 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT + col2 * + 66 FROM tab0 AS cor0
----
2178
5412
66

query I rowsort
SELECT ALL cor0.col0 * col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + cor0.col0 * + col2 + - col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ( 1 + cor0.col1 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 39b923c661908711dfacd7bdda640f1d

query I rowsort
SELECT ALL 18 * cor0.col0 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 3c4ff08df58a5604bd56394a0465a92c

query I rowsort
SELECT + 48 * col1 FROM tab1 AS cor0
----
1248
480
624

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5644
SELECT - CAST( NULL AS SIGNED ) * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5644
SELECT - CAST ( NULL AS INTEGER ) * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + - 17 FROM tab2
----
-10
61
62

query I rowsort
SELECT tab2.col0 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT + - col1 + - col2 * 44 AS col2 FROM tab2 AS cor0
----
-1203
-1219
-1689

query I rowsort
SELECT ALL + tab2.col1 * col1 + - tab2.col1 AS col0 FROM tab2
----
272
3422
930

query I rowsort
SELECT 1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT + 45 + col1 FROM tab2 AS cor0
----
104
62
76

query I rowsort
SELECT cor0.col1 + - col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 35 AS col0 FROM tab2 AS cor0
----
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5653
SELECT CAST( NULL AS SIGNED ) * tab1.col2 + + col0 * 66 / col2 + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5653
SELECT CAST ( NULL AS INTEGER ) * tab1.col2 + + col0 * 66 / col2 + col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 23 + + tab0.col0 AS col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to aae25a385e3610a434f174d9d8117b0c

query I rowsort
SELECT - + 96 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5656
SELECT - ( tab1.col1 ) * + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5656
SELECT - ( tab1.col1 ) * + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * + col1 + col0 FROM tab2
----
3559
368
968

query I rowsort
SELECT DISTINCT + 87 AS col1 FROM tab1
----
87

query I rowsort
SELECT ALL 47 AS col1 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * col1 + - col1 col2 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT + col0 * + col0 + - 28 AS col1 FROM tab2
----
21
6056
6213

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT DISTINCT + - col1 + + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - + col0 AS col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 61 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
61

query I rowsort
SELECT - + 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 ALL + - col0 * - col1 col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - 88 AS col2 FROM tab1
----
-88

query I rowsort
SELECT DISTINCT - col1 * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT col2 * + cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 + - col1 * col0 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT - 65 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
-65

query I rowsort
SELECT + ( col2 ) + + col1 AS col0 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 + col1 col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT - - ( + col2 ) AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + + col0 + + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col1 * - 96 + col2 AS col1 FROM tab1 AS cor0
----
-1152
-2442
-903

query I rowsort
SELECT - 0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 94 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-111
-125
-153

query I rowsort
SELECT + cor0.col1 * - col1 + + ( ( + col1 ) ) FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT - col0 * col2 * 48 AS col0 FROM tab0
----
-1680
-350304
-38016

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5682
SELECT col2 / CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5682
SELECT col2 / CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col0 + + ( + ( col2 ) ) AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col1 + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - - col2 * - 8 FROM tab0 AS cor0
----
-264
-656
-8

query I rowsort
SELECT col1 * col0 + + col1 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5687
SELECT - + CAST( + 95 AS SIGNED ) + + col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5687
SELECT - + CAST ( + 95 AS INTEGER ) + + col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - cor0.col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col1 * ( tab0.col0 ) FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 * + ( tab0.col0 ) AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT col0 * ( col0 + - col1 ) FROM tab0
----
-1488
-178
-2170

query I rowsort
SELECT DISTINCT + col0 * 11 AS col1 FROM tab1
----
33
704
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 97 col0 FROM tab2, tab1 cor0, tab0 AS cor1
----
97

query I rowsort
SELECT - col0 * - ( col1 ) * - col0 AS col0 FROM tab0
----
-118825
-49536
-720811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5695
SELECT DISTINCT + CAST( + 73 AS SIGNED ) + - col2 AS col1 FROM tab0 AS cor0
----
-9
40
72

skipif mysql # not compatible
query I rowsort label-5695
SELECT DISTINCT + CAST ( + 73 AS INTEGER ) + - col2 AS col1 FROM tab0 AS cor0
----
-9
40
72

query I rowsort
SELECT ALL - + ( cor0.col1 ) FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - 67 + - 23 FROM tab2 AS cor0
----
-90
-90
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 ) * cor0.col1 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + + 53 AS col0 FROM tab2 AS cor0
----
53
53
53

query I rowsort
SELECT ALL - 4 FROM tab0 cor0
----
-4
-4
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5701
SELECT - col1 DIV cor0.col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5701
SELECT - col1 / cor0.col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT + + 42 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
42

query I rowsort
SELECT col0 * - col0 * col0 AS col2 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT ALL 25 FROM tab0, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT DISTINCT tab2.col1 * + col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL 88 FROM tab2, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ( - 85 ) * col2 FROM tab0
----
-2805
-6970
-85

query I rowsort
SELECT ALL + tab0.col2 + + col1 + - col1 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT - 77 + 49 FROM tab1
----
-28

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT - col2 + cor0.col1 DIV col0 FROM tab0 AS cor0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-5710
SELECT - col2 + cor0.col1 / col0 FROM tab0 AS cor0
----
-30
-81
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT 18 * col0 FROM tab1
----
1152
1440
54

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab1, tab0 AS cor0
----
38

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL col0 + col1 + + col0 FROM tab2
----
175
215
45

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col0 AS REAL ) * col0 * 94 + tab0.col1 FROM tab0
----
115247
54230
744665

query I rowsort
SELECT ALL + col1 + + 30 FROM tab0
----
116
121
127

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * cor0.col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col1 * 80 AS col2 FROM tab1 cor0
----
1040
2080
800

query I rowsort
SELECT + col1 + ( + cor0.col0 ) AS col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5721
SELECT ALL + col1 + CAST( NULL AS SIGNED ) * + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5721
SELECT ALL + col1 + CAST ( NULL AS INTEGER ) * + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + - 49 FROM tab2 AS cor0
----
-75
-76
-87

query I rowsort
SELECT cor0.col0 + ( col1 ) * cor0.col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT tab1.col0 - - col1 AS col0 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL + 90 FROM tab2, tab2 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT - col2 + - col2 * ( + col0 ) FROM tab1 AS cor0
----
-216
-3705
-7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - + 56 col0 FROM tab1 AS cor0
----
-30
-43
-46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col2 FROM tab2, tab1 AS cor0
----
18

query I rowsort
SELECT DISTINCT + col1 * + 56 AS col2 FROM tab2 AS cor0
----
1736
3304
952

query I rowsort
SELECT ALL col0 + cor0.col2 FROM tab0 cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5731
SELECT - col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5731
SELECT - col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 34 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 32e6d0f63bf719b0a999c75379e75eca

onlyif mysql # use DIV operator for integer division
query I rowsort label-5734
SELECT + - col2 DIV + 28 AS col0 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5734
SELECT + - col2 / + 28 AS col0 FROM tab1 AS cor0
----
-1
-2
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5735
SELECT - col2 * col0 * + CAST( NULL AS SIGNED ) + col1 * col1 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5735
SELECT - col2 * col0 * + CAST ( NULL AS INTEGER ) + col1 * col1 AS col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5736
SELECT - col0 / CAST( NULL AS SIGNED ) + col2 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5736
SELECT - col0 / CAST ( NULL AS INTEGER ) + col2 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5737
SELECT - 76 - + col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5737
SELECT - 76 - + col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5738
SELECT + CAST( NULL AS SIGNED ) * 39 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5738
SELECT + CAST ( NULL AS INTEGER ) * 39 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 * col0 * - col1 col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - col1 * 9 FROM tab0
----
-774
-819
-873

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 + cor0.col1 * - 32 + - 34 AS col0 FROM tab1 AS cor0
----
-354
-450
-866

query I rowsort
SELECT + 93 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT + col0 + + 3 AS col0 FROM tab1
----
6
67
83

query I rowsort
SELECT ALL - col1 * + col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + col2 + - ( + col0 ) * col2 AS col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT + col0 + + col0 AS col2 FROM tab2
----
14
156
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5748
SELECT CAST( col2 * col0 AS SIGNED ) AS col0 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5748
SELECT CAST ( col2 * col0 AS INTEGER ) AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL + col2 * col2 * - 36 FROM tab1 AS cor0
----
-104976
-116964
-331776

query I rowsort
SELECT ALL + - col1 + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 89 * - col2 + col0 col2 FROM tab1 AS cor0
----
4809
5137
8624

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL + col1 + + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + + ( col1 ) * cor0.col2 + - 24 AS col0 FROM tab0 cor0
----
2814
73
7438

onlyif mysql # use DIV operator for integer division
query I rowsort label-5755
SELECT DISTINCT - 48 + cor0.col2 DIV - col0 AS col2 FROM tab1 AS cor0
----
-48
-49
-66

skipif mysql # not compatible
query I rowsort label-5755
SELECT DISTINCT - 48 + cor0.col2 / - col0 AS col2 FROM tab1 AS cor0
----
-48
-49
-66

query I rowsort
SELECT DISTINCT - col0 - cor0.col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - col2 * - col2 + + col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT DISTINCT - 5 * - col2 AS col0 FROM tab0 AS cor0
----
165
410
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5759
SELECT + - col2 DIV + col0 + 89 AS col1 FROM tab1 AS cor0
----
71
88
89

skipif mysql # not compatible
query I rowsort label-5759
SELECT + - col2 / + col0 + 89 AS col1 FROM tab1 AS cor0
----
71
88
89

query I rowsort
SELECT ALL col1 * - cor0.col0 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + 55 * - col1 AS col1 FROM tab2 AS cor0
----
1705
3245
935

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 * + col0 col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - + 3 + col1 AS col1 FROM tab0 AS cor0
----
83
88
94

query I rowsort
SELECT + 4 * col0 * ( + 0 ) FROM tab0
----
0
0
0

query I rowsort
SELECT - 84 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL ( col1 ) FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT 45 * + col1 FROM tab2 AS cor0
----
1395
2655
765

query I rowsort
SELECT + 30 * col2 AS col1 FROM tab2 AS cor0
----
1140
780
810

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col2 * col2 * + col2 AS col0 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT + col1 * col1 AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + 93 FROM tab2
----
93

query I rowsort
SELECT ALL cor0.col0 + - cor0.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to d924577a04b3a692cbbd2348e6f8e88f

query I rowsort
SELECT DISTINCT - 17 * - col0 AS col0 FROM tab2 cor0
----
119
1326
1343

query I rowsort
SELECT cor0.col2 * col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + cor0.col1 + - cor0.col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT 39 * - cor1.col0 FROM tab1, tab1 AS cor0, tab1 cor1
----
-117
-2496
-3120

query I rowsort
SELECT ALL + col1 + + col1 AS col2 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - col2 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 + ( col1 * + col1 ) FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT ALL + col2 + + cor0.col1 * - cor0.col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - col1 * 32 + 67 FROM tab1 cor0
----
-253
-349
-765

query I rowsort
SELECT col2 + + 91 FROM tab2 AS cor0
----
117
118
129

query I rowsort
SELECT ALL - col0 + + 76 * - col1 AS col0 FROM tab2 cor0
----
-1371
-2363
-4562

query I rowsort
SELECT - 1 + - 64 FROM tab1 AS cor0
----
-65
-65
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5787
SELECT ALL ( 96 ) * col0 DIV - ( + col0 + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
-48
-48
-48

skipif mysql # not compatible
query I rowsort label-5787
SELECT ALL ( 96 ) * col0 / - ( + col0 + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
-48
-48
-48

query I rowsort
SELECT col0 - col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - ( + 48 ) * cor0.col1 + col2 FROM tab2 AS cor0
----
-1461
-2806
-778

query I rowsort
SELECT + 51 + - 48 AS col0 FROM tab2 AS cor0
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5791
SELECT DISTINCT + CAST( + col1 AS SIGNED ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-5791
SELECT DISTINCT + CAST ( + col1 AS INTEGER ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + 42 * - ( - col0 ) AS col2 FROM tab0
----
1008
1470
3738

query I rowsort
SELECT - - 92 + col0 AS col0 FROM tab2 AS cor0
----
170
171
99

query I rowsort
SELECT + + 96 * + 29 AS col2 FROM tab1 AS cor0
----
2784
2784
2784

query I rowsort
SELECT ALL - cor0.col0 + ( + col1 ) * + cor0.col1 FROM tab1 AS cor0
----
36
673
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT + 21 + - 41 DIV - col0 FROM tab2 AS cor0
----
21
21
26

skipif mysql # not compatible
query I rowsort label-5796
SELECT + 21 + - 41 / - col0 FROM tab2 AS cor0
----
21
21
26

query I rowsort
SELECT ALL 52 * col0 * col1 FROM tab1 AS cor0
----
33280
4056
54080

query I rowsort
SELECT - 82 * col2 FROM tab2 AS cor0
----
-2132
-2214
-3116

query I rowsort
SELECT + 82 + - col0 AS col2 FROM tab0 AS cor0
----
-7
47
58

query I rowsort
SELECT 27 + + col0 FROM tab2 AS cor0
----
105
106
34

query I rowsort
SELECT col0 * 7 AS col2 FROM tab1
----
21
448
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-5802
SELECT ( + col1 ) DIV col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5802
SELECT ( + col1 ) / col1 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL + 30 + + tab2.col0 + col0 * - col2 AS col2 FROM tab2
----
-152
-1920
-2893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5804
SELECT col0 * + 86 + - col0 + CAST( NULL AS SIGNED ) col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5804
SELECT col0 * + 86 + - col0 + CAST ( NULL AS INTEGER ) col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5805
SELECT ALL + col2 DIV col0 AS col1 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5805
SELECT ALL + col2 / col0 AS col1 FROM tab1 AS cor0
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * 51 + col2 col2 FROM tab0 AS cor0
----
1257
1786
4621

query I rowsort
SELECT ( - cor0.col0 ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col0 * + col1 + - col2 AS col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5809
SELECT + CAST( col2 AS SIGNED ) DIV - col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5809
SELECT + CAST ( col2 AS INTEGER ) / - col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col0 * + 55 AS col1 FROM tab0
----
1320
1925
4895

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * 26 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 5c0a5491ba5889db5c6fbe57eb19a7d3

query I rowsort
SELECT ALL - 47 AS col0 FROM tab2, tab1 cor0 CROSS JOIN tab0, tab2 AS cor1
----
81 values hashing to 905cbd63e2561d7f32ce36091d5b526a

query I rowsort
SELECT 28 FROM tab0, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT 65 * + col0 + col1 AS col2 FROM tab1 AS cor0
----
221
4170
5213

query I rowsort
SELECT + cor0.col2 + - ( - col0 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5816
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 50 * col1 + 71 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5816
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 50 * col1 + 71 AS col1 FROM tab2
----
NULL

query I rowsort
SELECT + col0 * col0 + - col1 FROM tab0 cor0
----
1128
490
7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col1 ) col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - - 11 + col2 * col2 AS col0 FROM tab1 AS cor0
----
2927
3260
9227

query I rowsort
SELECT ALL - + cor0.col0 * col0 + + 90 FROM tab2 AS cor0
----
-5994
-6151
41

query I rowsort
SELECT + 93 AS col0 FROM tab0
----
93
93
93

query I rowsort
SELECT 91 AS col1 FROM tab0
----
91
91
91

query I rowsort
SELECT + - 72 * cor0.col2 FROM tab2 AS cor0
----
-1872
-1944
-2736

query I rowsort
SELECT DISTINCT + 95 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
95

query I rowsort
SELECT + col0 * - col2 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 + ( + 15 ) * col0 FROM tab1
----
1213
71
970

query I rowsort
SELECT DISTINCT col1 * col2 * - col0 + col0 - - col0 AS col1 FROM tab2
----
-119496
-50876
-5845

query I rowsort
SELECT + col0 * - col0 * + cor0.col2 - + col1 FROM tab0 AS cor0
----
-1322
-19094
-649613

query I rowsort
SELECT ALL 52 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT DISTINCT - col2 + - col1 * - col1 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT ALL + + col0 * + 93 + 74 * + cor0.col2 FROM tab0 AS cor0
----
14345
3329
4674

query I rowsort
SELECT col0 + ( + col0 ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - col1 * + 0 + cor0.col0 + + cor0.col2 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT - cor0.col1 * + col0 * - col0 AS col2 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-5835
SELECT ALL - col2 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5835
SELECT ALL - col2 / - col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5836
SELECT DISTINCT - + col2 DIV col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5836
SELECT DISTINCT - + col2 / col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT DISTINCT - 5 + + col1 FROM tab2 AS cor0
----
12
26
54

query I rowsort
SELECT ALL - + col2 + - col0 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + cor0.col2 + - ( + cor0.col0 ) FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col2 * + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + ( - 4 ) * col0 FROM tab2 AS cor0
----
-28
-312
-316

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to d2c0c94b38e721d8cf9f7df226475a2f

query I rowsort
SELECT ALL + col1 * - 44 + + cor0.col0 * col2 FROM tab2 AS cor0
----
-1175
-568
2254

query I rowsort
SELECT DISTINCT - 49 * col0 FROM tab0
----
-1176
-1715
-4361

query I rowsort
SELECT - cor0.col0 * col2 * + col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + - col0 * + cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab2 cor1, tab0, tab1 AS cor2
----
3645 values hashing to 8bda8b9cf32f196464e0ee0b41a5162d

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 ALL + col0 * col1 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - + 9 AS col2 FROM tab1 AS cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - col1 * - col0 + + ( - col0 + col1 ) AS col1 FROM tab1 cor0
----
101
586
973

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5852
SELECT DISTINCT + + col0 * CAST( - 73 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-511
-5694
-5767

skipif mysql # not compatible
query I rowsort label-5852
SELECT DISTINCT + + col0 * CAST ( - 73 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-511
-5694
-5767

query I rowsort
SELECT DISTINCT - col1 * - col0 AS col0 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5854
SELECT DISTINCT + col2 DIV 94 + + col2 DIV col2 col0 FROM tab1 AS cor0
----
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5854
SELECT DISTINCT + col2 / 94 + + col2 / col2 col0 FROM tab1 AS cor0
----
1
2

query I rowsort
SELECT DISTINCT - col0 * - ( cor0.col1 ) + col2 * + 31 - - 25 FROM tab2 cor0
----
1079
2546
5433

query I rowsort
SELECT ALL col2 + - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col1 * ( - col0 ) + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + 64 * + cor0.col1 + ( col2 ) FROM tab1 AS cor0
----
-112
1640
57

query I rowsort
SELECT ALL - col2 - - ( 13 ) FROM tab1 AS cor0
----
-41
-44
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col0 * + ( 84 ) col2 FROM tab2
----
581
6474
6557

query I rowsort
SELECT col0 + - col1 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + col1 * col0 * + ( col1 ) AS col0 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT ALL 85 + - tab2.col1 + 30 AS col2 FROM tab2, tab0, tab0 cor0
----
27 values hashing to ade58e4017f85898db66c1e4c3dfd44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-5864
SELECT tab1.col1 * + col1 - + 48 DIV - tab1.col1 AS col0 FROM tab1
----
104
172
677

skipif mysql # not compatible
query I rowsort label-5864
SELECT tab1.col1 * + col1 - + 48 / - tab1.col1 AS col0 FROM tab1
----
104
172
677

query I rowsort
SELECT ALL + 79 * col2 + cor0.col1 FROM tab1 AS cor0
----
4292
4513
7597

query I rowsort
SELECT ( ( tab1.col1 ) ) FROM tab1
----
10
13
26

query I rowsort
SELECT + 69 * 48 FROM tab1 cor0
----
3312
3312
3312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5868
SELECT DISTINCT - + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5868
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT col0 * + col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - cor0.col1 + col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - 41 + 92 FROM tab1 cor0
----
51
51
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5872
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-5872
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT - - 30 + col1 FROM tab0 AS cor0
----
116
121
127

query I rowsort
SELECT + ( - ( col2 ) ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - + col2 * col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - 93 + + col1 + + col1 AS col1 FROM tab0
----
101
79
89

query I rowsort
SELECT - 30 * col0 FROM tab2 AS cor0
----
-210
-2340
-2370

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col2 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - + cor0.col1 + + col1 * - col0 FROM tab2 cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL - tab1.col2 * col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL tab2.col2 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + 14 * - 27 AS col2 FROM tab1
----
-378
-378
-378

query I rowsort
SELECT col2 + + 60 FROM tab0
----
142
61
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 * col0 col0 FROM tab1
----
-30
-640
-800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5885
SELECT - CAST( - col2 AS SIGNED ) + + tab0.col1 AS col1 FROM tab0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-5885
SELECT - CAST ( - col2 AS INTEGER ) + + tab0.col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT + - col0 + ( + col0 ) - col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - + cor0.col2 * 16 AS col1 FROM tab0 AS cor0
----
-1312
-16
-528

query I rowsort
SELECT DISTINCT - col0 + - ( - 33 + cor0.col0 ) FROM tab2 AS cor0
----
-123
-125
19

query I rowsort
SELECT ALL + - col2 + - col0 FROM tab0 AS cor0
----
-171
-36
-57

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 + col0 * ( col2 ) AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col1 * + ( col0 ) FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col2 * col1 + 90 * col2 + - 45 AS col0 FROM tab0 cor0
----
-127
-52
87

query I rowsort
SELECT - cor0.col2 * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-5895
SELECT + col2 * col2 DIV col1 FROM tab0
----
0
12
73

skipif mysql # not compatible
query I rowsort label-5895
SELECT + col2 * col2 / col1 FROM tab0
----
0
12
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 79 * - col2 col1 FROM tab0
----
-2607
-6478
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5897
SELECT col1 * col1 + CAST( col0 * - col0 AS SIGNED ) AS col2 FROM tab0
----
360
6820
8184

skipif mysql # not compatible
query I rowsort label-5897
SELECT col1 * col1 + CAST ( col0 * - col0 AS INTEGER ) AS col2 FROM tab0
----
360
6820
8184

onlyif mysql # use DIV operator for integer division
query I rowsort label-5898
SELECT DISTINCT - 72 DIV - col2 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-5898
SELECT DISTINCT - 72 / - col2 FROM tab1
----
0
1

query I rowsort
SELECT DISTINCT - col1 * - col0 - - col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT tab2.col0 * + col0 + 55 AS col2 FROM tab2
----
104
6139
6296

query I rowsort
SELECT ALL - col2 + col2 + col0 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5902
SELECT + - col1 + col1 DIV - col2 FROM tab0 AS cor0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-5902
SELECT + - col1 + col1 / - col2 FROM tab0 AS cor0
----
-194
-88
-92

query I rowsort
SELECT + col2 * - col1 + col0 - + col0 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + cor0.col0 * - col2 * - 80 AS col1 FROM tab0 AS cor0
----
2800
583840
63360

query I rowsort
SELECT col2 * ( col0 ) * col0 + - ( cor0.col0 ) - - cor0.col2 AS col2 FROM tab0 AS cor0
----
1191
19017
649515

query I rowsort
SELECT DISTINCT + - col1 * ( col1 * + col2 ) AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - cor0.col0 + - col1 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + tab1.col0 + 68 AS col2 FROM tab1
----
132
148
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col1 + col2 * col2 col0 FROM tab1
----
2942
3259
9229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5910
SELECT ALL - col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5910
SELECT ALL - col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5911
SELECT ALL tab2.col2 + - CAST( col1 AS SIGNED ) AS col2 FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-5911
SELECT ALL tab2.col2 + - CAST ( col1 AS INTEGER ) AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - 85 * col0 + + col0 FROM tab2 AS cor0
----
-588
-6552
-6636

onlyif mysql # use DIV operator for integer division
query I rowsort label-5913
SELECT - col0 * 54 - cor0.col0 * 58 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
-220
-3514
-4378

skipif mysql # not compatible
query I rowsort label-5913
SELECT - col0 * 54 - cor0.col0 * 58 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
-220
-3514
-4378

query I rowsort
SELECT cor0.col2 + - 87 AS col1 FROM tab0 AS cor0
----
-5
-54
-86

query I rowsort
SELECT ALL - 76 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT - - cor0.col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - col2 ) * col0 col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL - - 82 AS col2 FROM tab1 AS cor0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * 78 * + tab0.col2 col1 FROM tab0
----
2730
569244
61776

query I rowsort
SELECT ALL 77 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to d7b027bca5d37c67e29013904def8125

onlyif mysql # use DIV operator for integer division
query I rowsort label-5921
SELECT + col0 DIV col2 AS col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5921
SELECT + col0 / col2 AS col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - - col1 + + 23 * + col1 + 92 AS col0 FROM tab2 cor0
----
1508
500
836

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5923
SELECT + CAST( NULL AS SIGNED ) / 47 + cor0.col1 * + col0 * col0 - - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5923
SELECT + CAST ( NULL AS INTEGER ) / 47 + cor0.col1 * + col0 * col0 - - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col0 + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - 44 + + 71 * col1 AS col2 FROM tab1 AS cor0
----
1802
666
879

query I rowsort
SELECT + 38 + col2 FROM tab1 AS cor0
----
134
92
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5927
SELECT ALL - col0 DIV + col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5927
SELECT ALL - col0 / + col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col0 - - col1 * + col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT + + col1 - col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - 99 * col2 - ( + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-196
-3353
-8209

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5931
SELECT ALL + + cor0.col2 + col0 * - CAST( - 9 + col0 AS SIGNED ) FROM tab1 AS cor0
----
-3463
-5584
72

skipif mysql # not compatible
query I rowsort label-5931
SELECT ALL + + cor0.col2 + col0 * - CAST ( - 9 + col0 AS INTEGER ) FROM tab1 AS cor0
----
-3463
-5584
72

query I rowsort
SELECT DISTINCT + + col0 * col1 + ( col1 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + - 73 + cor0.col0 * 63 AS col0 FROM tab2 AS cor0
----
368
4841
4904

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * + col2 - - cor0.col1 col0 FROM tab0 cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 + col0 col1 FROM tab1 AS cor0
----
152
168
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col0 ) col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL ( - col1 ) * col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + - 90 * col2 * - col0 AS col2 FROM tab2 cor0
----
17010
182520
270180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5941
SELECT DISTINCT + + 97 + col1 * CAST( 54 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
1501
637
799

skipif mysql # not compatible
query I rowsort label-5941
SELECT DISTINCT + + 97 + col1 * CAST ( 54 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
1501
637
799

query I rowsort
SELECT ALL + col0 * + col1 * - col0 - - col2 AS col1 FROM tab0 cor0
----
-118824
-49503
-720729

query I rowsort
SELECT + - col1 * - cor0.col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + 68 * - cor0.col2 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to d6419d0a846d84662788671e700042e9

query I rowsort
SELECT ALL + - col0 * ( cor0.col2 ) - - col0 FROM tab0 cor0
----
-7209
-768
0

query I rowsort
SELECT ALL cor0.col2 + col0 + + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-15
-5980
-6124

query I rowsort
SELECT + + 11 - - col0 AS col2 FROM tab0 AS cor0
----
100
35
46

query I rowsort
SELECT + col1 + cor0.col0 + - col2 FROM tab1 AS cor0
----
-25
-3
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5949
SELECT + col1 + col0 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5949
SELECT + col1 + col0 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 18 - col2 FROM tab0 AS cor0
----
-100
-19
-51

query I rowsort
SELECT 7 * col0 + - col1 * + col0 FROM tab1 AS cor0
----
-192
-480
-57

query I rowsort
SELECT ALL - + col0 * col2 + ( + col1 + col0 ) * - 53 * col0 FROM tab2 cor0
----
-14287
-404954
-568386

query I rowsort
SELECT 94 * - col1 AS col2 FROM tab2 AS cor0
----
-1598
-2914
-5546

query I rowsort
SELECT ALL - - 19 + col2 AS col1 FROM tab1 AS cor0
----
115
73
76

query I rowsort
SELECT DISTINCT + ( + col2 ) * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - + col2 * + col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + col0 * col1 + + col2 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5958
SELECT DISTINCT col2 / - CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5958
SELECT DISTINCT col2 / - CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1, tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
17
31
59

query I rowsort
SELECT ( col0 * + col1 ) + ( col1 ) * - ( + 8 ) + + tab1.col0 FROM tab1
----
-127
1016
624

query I rowsort
SELECT DISTINCT 72 - - tab2.col1 FROM tab2
----
103
131
89

query I rowsort
SELECT 56 FROM tab0 AS cor0
----
56
56
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-5964
SELECT - + col0 DIV ( - col1 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5964
SELECT - + col0 / ( - col1 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - col0 + - col0 * - col0 * + col2 AS col0 FROM tab1 cor0
----
233408
483
614320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + + 8 col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f4f9d5d6d1bba4c852d5c28067b5bf68

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT + 57 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT DISTINCT - ( ( col1 ) ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT 95 FROM tab0
----
95
95
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 * + col0 col1 FROM tab1
----
21
448
560

query I rowsort
SELECT DISTINCT - 62 FROM tab1, tab0 cor0
----
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + tab0.col2 ) col1 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5975
SELECT ALL col2 DIV + tab1.col2 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5975
SELECT ALL col2 / + tab1.col2 AS col2 FROM tab1
----
1
1
1

query I rowsort
SELECT 16 FROM tab1, tab2 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT - col2 * - cor0.col1 FROM tab2 AS cor0
----
1534
646
837

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2, tab2 cor1
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT DISTINCT + ( 65 ) AS col0 FROM tab1
----
65

query I rowsort
SELECT ALL - col0 + col1 AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - ( 1 ) * - col1 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + col0 - + col1 AS col1 FROM tab2
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5983
SELECT ALL col0 * col0 DIV col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5983
SELECT ALL col0 * col0 / col0 FROM tab2
----
7
78
79

query I rowsort
SELECT 99 * tab0.col2 + col2 AS col2 FROM tab0
----
100
3300
8200

query I rowsort
SELECT 55 AS col1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT DISTINCT - - 28 + col1 FROM tab0 cor0
----
114
119
125

query I rowsort
SELECT - - col2 * - col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - col1 * + col1 - ( col2 ) FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT ALL + col2 + col0 * - cor0.col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - cor1.col2 - cor1.col0 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 507d0f67070240a638094d82967d5d67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5991
SELECT ALL + col1 / col1 - + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5991
SELECT ALL + col1 / col1 - + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 3 FROM tab2, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT - col1 + col1 * - col0 + + tab2.col2 FROM tab2
----
-1322
-221
-4635

query I rowsort
SELECT ALL + col0 * col0 + + col2 * col2 AS col1 FROM tab1
----
15616
2925
7345

query I rowsort
SELECT - col2 + + ( ( col1 ) ) FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col2 * + 55 + col2 + + col0 FROM tab0 AS cor0
----
1872
4681
91

query I rowsort
SELECT - col0 * + ( 60 ) * + col1 AS col2 FROM tab2 AS cor0
----
-13020
-276120
-80580

query I rowsort
SELECT - col2 * - 59 FROM tab1 cor0
----
3186
3363
5664

query I rowsort
SELECT + + cor0.col1 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT 92 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6001
SELECT DISTINCT - - ( col1 ) + + col1 DIV col2 - - col0 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-6001
SELECT DISTINCT - - ( col1 ) + + col1 / col2 - - col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - col0 * col0 - cor0.col1 AS col0 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT DISTINCT + 52 FROM tab2 cor0
----
52

query I rowsort
SELECT ALL + - col1 * + 42 + - col2 * + 39 AS col1 FROM tab0 AS cor0
----
-4113
-4899
-7020

onlyif mysql # use DIV operator for integer division
query I rowsort label-6005
SELECT - + col2 + + col0 DIV - col1 FROM tab1 AS cor0
----
-102
-54
-63

skipif mysql # not compatible
query I rowsort label-6005
SELECT - + col2 + + col0 / - col1 FROM tab1 AS cor0
----
-102
-54
-63

query I rowsort
SELECT DISTINCT cor0.col0 * - col0 * cor0.col2 - - ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-233415
-432
-614304

query I rowsort
SELECT - - col0 * - ( - col1 ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - + cor0.col0 * 37 FROM tab1 AS cor0
----
-111
-2368
-2960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6009
SELECT + CAST( col1 AS SIGNED ) * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-6009
SELECT + CAST ( col1 AS INTEGER ) * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - 14 * col2 + - col0 FROM tab2 AS cor0
----
-385
-442
-611

query I rowsort
SELECT DISTINCT + col1 * - col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT 49 * - ( col0 ) + + col2 * - col1 * - col1 AS col1 FROM tab1 AS cor0
----
12304
2564
36357

query I rowsort
SELECT DISTINCT 42 AS col0 FROM tab1, tab1 AS cor0
----
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6014
SELECT - col0 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6014
SELECT - col0 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6015
SELECT ALL + CAST( NULL AS SIGNED ) * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6015
SELECT ALL + CAST ( NULL AS INTEGER ) * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col0 AS col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 19 * cor0.col1 AS col1 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT ALL 35 FROM tab1, tab2 cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6019
SELECT + CAST( 23 AS SIGNED ) FROM tab0, tab2 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

skipif mysql # not compatible
query I rowsort label-6019
SELECT + CAST ( 23 AS INTEGER ) FROM tab0, tab2 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT + col0 * 36 FROM tab0
----
1260
3204
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-6021
SELECT ( - col0 ) DIV col1 + col1 * + col1 AS col0 FROM tab0 cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-6021
SELECT ( - col0 ) / col1 + col1 * + col1 AS col0 FROM tab0 cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col2 + - col1 col0 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL - col0 - cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT 92 + col0 FROM tab2 AS cor0
----
170
171
99

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab2 AS cor0
----
48

query I rowsort
SELECT col0 * cor0.col2 - 2 FROM tab0 AS cor0
----
33
7296
790

query I rowsort
SELECT ALL - - 43 + col2 FROM tab1 AS cor0
----
100
139
97

query I rowsort
SELECT - 62 FROM tab2, tab0 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT ALL col1 * + 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 71 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT DISTINCT 10 FROM tab1
----
10

query I rowsort
SELECT cor0.col1 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 62 * - cor0.col1 - col0 col1 FROM tab2 cor0
----
-1133
-1929
-3736

onlyif mysql # use DIV operator for integer division
query I rowsort label-6034
SELECT DISTINCT + ( col0 ) DIV col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6034
SELECT DISTINCT + ( col0 ) / col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT 7 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT ALL - col1 + - 81 FROM tab2 AS cor0
----
-112
-140
-98

query I rowsort
SELECT ALL + col1 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6038
SELECT DISTINCT + col0 - - col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6038
SELECT DISTINCT + col0 - - col2 / + col2 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT 22 AS col2 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab1, tab0 AS cor0
----
57

query I rowsort
SELECT ALL - ( + 40 ) FROM tab2 AS cor0
----
-40
-40
-40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6042
SELECT ALL + CAST( + ( + col0 ) AS SIGNED ) AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6042
SELECT ALL + CAST ( + ( + col0 ) AS INTEGER ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + col1 * + col2 + - col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT - col2 * col2 * + col2 + col2 FROM tab1 AS cor0
----
-157410
-185136
-884640

query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT - - 80 + col2 AS col1 FROM tab0 AS cor0
----
113
162
81

query I rowsort
SELECT ALL - col2 * - cor0.col0 * + col2 - + col2 AS col1 FROM tab0 AS cor0
----
26103
34
598354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6048
SELECT DISTINCT CAST( + col2 * col0 AS SIGNED ) AS col0 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-6048
SELECT DISTINCT CAST ( + col2 * col0 AS INTEGER ) AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT - + col0 + col0 * col2 * 95 FROM tab1 AS cor0
----
15387
346496
729520

onlyif mysql # use DIV operator for integer division
query I rowsort label-6050
SELECT + col2 DIV - col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-6050
SELECT + col2 / - col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6051
SELECT + col0 + - col1 DIV - col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-6051
SELECT + col0 + - col1 / - col0 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT - 92 * col1 FROM tab0 AS cor0
----
-7912
-8372
-8924

query I rowsort
SELECT ALL - 99 + col1 AS col0 FROM tab1
----
-73
-86
-89

query I rowsort
SELECT ALL - tab1.col0 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 - - col2 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col1 * - col2 + + col2 FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT - col1 - - ( 94 + - col1 ) * - col0 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
-11042
-306442
-622093

query I rowsort
SELECT DISTINCT cor0.col0 + 20 * - cor0.col1 FROM tab2 cor0
----
-1102
-261
-613

onlyif mysql # use DIV operator for integer division
query I rowsort label-6059
SELECT + tab2.col1 DIV 5 FROM tab2, tab1 AS cor0
----
9 values hashing to 3f729d3fadbc4d058ccba01e3897fbde

skipif mysql # not compatible
query I rowsort label-6059
SELECT + tab2.col1 / 5 FROM tab2, tab1 AS cor0
----
9 values hashing to 3f729d3fadbc4d058ccba01e3897fbde

query I rowsort
SELECT ALL - col0 * col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + + col0 * - cor0.col0 * + col0 FROM tab1 AS cor0
----
-262144
-27
-512000

onlyif mysql # use DIV operator for integer division
query I rowsort label-6062
SELECT + cor0.col2 + col0 DIV + col2 FROM tab1 cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-6062
SELECT + cor0.col2 + col0 / + col2 FROM tab1 cor0
----
54
58
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6063
SELECT + 35 * + col0 * - col1 + - CAST( + 11 AS SIGNED ) * + col2 FROM tab1 cor0
----
-23027
-3324
-37456

skipif mysql # not compatible
query I rowsort label-6063
SELECT + 35 * + col0 * - col1 + - CAST ( + 11 AS INTEGER ) * + col2 FROM tab1 cor0
----
-23027
-3324
-37456

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 66 * col1 col0 FROM tab2 AS cor0
----
-1122
-2046
-3894

onlyif mysql # use DIV operator for integer division
query I rowsort label-6065
SELECT col1 DIV - 39 + 36 * col1 FROM tab0
----
3094
3274
3490

skipif mysql # not compatible
query I rowsort label-6065
SELECT col1 / - 39 + 36 * col1 FROM tab0
----
3094
3274
3490

query I rowsort
SELECT col2 * col0 * + 99 FROM tab1
----
16038
361152
760320

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 098e223d780e18b6582523fd6f55eec9

query I rowsort
SELECT DISTINCT - - col2 AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 45 + cor0.col1 * col2 FROM tab1 cor0
----
1293
1449
615

query I rowsort
SELECT + col2 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6073
SELECT - + 27 * col0 + col1 * col0 DIV col0 FROM tab1 AS cor0
----
-1718
-2147
-55

skipif mysql # not compatible
query I rowsort label-6073
SELECT - + 27 * col0 + col1 * col0 / col0 FROM tab1 AS cor0
----
-1718
-2147
-55

query I rowsort
SELECT + 97 AS col0 FROM tab0 AS cor0
----
97
97
97

query I rowsort
SELECT + 29 AS col1 FROM tab2
----
29
29
29

query I rowsort
SELECT ALL + + ( ( + col2 ) ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col0 - 28 FROM tab0
----
-117
-52
-63

query I rowsort
SELECT + col0 + - ( - col0 ) AS col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT DISTINCT + 68 * 69 + cor0.col0 FROM tab1, tab1 AS cor0
----
4695
4756
4772

query I rowsort
SELECT + - col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 + - 47 * + col0 FROM tab0
----
-1042
-1548
-4092

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 27 col2 FROM tab0 cor0
----
-2403
-648
-945

query I rowsort
SELECT col2 * col2 * - 43 AS col0 FROM tab0 AS cor0
----
-289132
-43
-46827

query I rowsort
SELECT ALL + cor0.col0 + col0 * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT DISTINCT 81 + cor0.col0 FROM tab0 AS cor0
----
105
116
170

query I rowsort
SELECT ALL + col1 * + col0 + - col1 * col2 + col0 * col2 FROM tab1 cor0
----
-1164
3718
7472

query I rowsort
SELECT ALL + - ( col1 ) FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6089
SELECT 34 * col1 + - col2 DIV col1 FROM tab2 AS cor0
----
1054
2006
576

skipif mysql # not compatible
query I rowsort label-6089
SELECT 34 * col1 + - col2 / col1 FROM tab2 AS cor0
----
1054
2006
576

query I rowsort
SELECT - col2 * col1 + col2 + - 32 AS col1 FROM tab1 AS cor0
----
-1184
-1382
-545

query I rowsort
SELECT - ( + 36 ) * - col2 FROM tab0 AS cor0
----
1188
2952
36

query I rowsort
SELECT + 88 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to 663c36cf4bc51cf4ea19f7275ac6d30e

query I rowsort
SELECT DISTINCT 51 - ( cor0.col2 ) FROM tab0 AS cor0
----
-31
18
50

query I rowsort
SELECT + + col0 * 61 AS col2 FROM tab1 AS cor0
----
183
3904
4880

query I rowsort
SELECT ALL - 54 AS col2 FROM tab0 AS cor0
----
-54
-54
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6096
SELECT + CAST( 18 AS SIGNED ) FROM tab1 AS cor0
----
18
18
18

skipif mysql # not compatible
query I rowsort label-6096
SELECT + CAST ( 18 AS INTEGER ) FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT ALL + col1 * - 90 + col0 AS col0 FROM tab1 cor0
----
-1090
-2337
-836

query I rowsort
SELECT + cor0.col1 * col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT 36 * + col0 + + col2 * - 95 + + col1 * + col1 * + col1 AS col1 FROM tab0 AS cor0
----
633785
748985
913838

query I rowsort
SELECT ALL col1 - + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - cor0.col2 * col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col2 + cor0.col2 * + 23 AS col1 FROM tab0 AS cor0
----
1804
22
726

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6103
SELECT - + col0 + + col1 * - CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6103
SELECT - + col0 + + col1 * - CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 67 AS col0 FROM tab2 cor0
----
-67
-67
-67

onlyif mysql # use DIV operator for integer division
query I rowsort label-6105
SELECT DISTINCT - - 26 DIV + col0 AS col2 FROM tab2 cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-6105
SELECT DISTINCT - - 26 / + col0 AS col2 FROM tab2 cor0
----
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6106
SELECT DISTINCT - col0 DIV cor0.col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-6106
SELECT DISTINCT - col0 / cor0.col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT ALL - 10 * col0 + 93 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-721
-8034
-8137

onlyif mysql # use DIV operator for integer division
query I rowsort label-6108
SELECT - - col2 DIV cor0.col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6108
SELECT - - col2 / cor0.col0 FROM tab1 AS cor0
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 93 col1 FROM tab0
----
93
93
93

query I rowsort
SELECT + col2 * - col0 + + col2 * - cor0.col1 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT + col0 + - 20 FROM tab2 AS cor0
----
-13
58
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6112
SELECT DISTINCT + col0 - col1 DIV col2 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-6112
SELECT DISTINCT + col0 - col1 / col2 FROM tab0 AS cor0
----
-62
22
88

query I rowsort
SELECT - col0 + + cor0.col2 * ( col0 ) FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL - cor0.col1 + - col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + + 13 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
13

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 91 AS REAL ) * + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 45285ffa439708fe5215b7a3a1f4aef8

query I rowsort
SELECT + col1 * - 88 FROM tab0 cor0
----
-7568
-8008
-8536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * col2 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col0 * - ( cor0.col0 + - col1 ) AS col0 FROM tab2 AS cor0
----
-1482
-4898
168

query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6121
SELECT ALL col1 * ( + 17 ) DIV + cor0.col1 FROM tab1 cor0
----
17
17
17

skipif mysql # not compatible
query I rowsort label-6121
SELECT ALL col1 * ( + 17 ) / + cor0.col1 FROM tab1 cor0
----
17
17
17

query I rowsort
SELECT - cor0.col2 * - col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - + col2 + - 95 * + cor0.col2 FROM tab0 AS cor0
----
-3168
-7872
-96

query I rowsort
SELECT - col0 * + cor0.col0 + 61 AS col1 FROM tab1 AS cor0
----
-4035
-6339
52

query I rowsort
SELECT - + col0 + - col1 * - col2 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - 39 + + tab0.col1 * 19 FROM tab0
----
1595
1690
1804

query I rowsort
SELECT DISTINCT - col1 + col2 * - col0 FROM tab1
----
-188
-3658
-7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6128
SELECT ALL + col2 / col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6128
SELECT ALL + col2 / col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * - col1 + col2 * + col1 FROM tab1 AS cor0
----
1079
470
728

query I rowsort
SELECT ALL - col1 + 97 * 81 AS col2 FROM tab1 AS cor0
----
7831
7844
7847

query I rowsort
SELECT - + cor0.col1 + + 39 FROM tab0 cor0
----
-47
-52
-58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6132
SELECT ALL col0 * - CAST( - cor0.col1 AS SIGNED ) + + col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

skipif mysql # not compatible
query I rowsort label-6132
SELECT ALL col0 * - CAST ( - cor0.col1 AS INTEGER ) + + col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col2 - 36 * cor0.col1 col0 FROM tab1 AS cor0
----
-3609
-3852
-9684

onlyif mysql # use DIV operator for integer division
query I rowsort label-6134
SELECT col2 * ( col1 ) DIV + col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6134
SELECT col2 * ( col1 ) / + col1 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6135
SELECT DISTINCT col2 - + 74 DIV - col0 col2 FROM tab2 cor0
----
26
37
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6135
SELECT DISTINCT col2 - + 74 / - col0 col2 FROM tab2 cor0
----
26
37
38

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT ALL col0 * ( + tab2.col2 + col2 ) * + 47 FROM tab2
----
17766
190632
282188

query I rowsort
SELECT + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-6139
SELECT + col1 + + 92 DIV col0 AS col0 FROM tab2
----
18
44
60

skipif mysql # not compatible
query I rowsort label-6139
SELECT + col1 + + 92 / col0 AS col0 FROM tab2
----
18
44
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 26 * - col0 + 55 col2 FROM tab1 AS cor0
----
133
1719
2135

query I rowsort
SELECT ALL - col2 + + col1 * + ( - 4 ) AS col1 FROM tab2 AS cor0
----
-106
-151
-262

query I rowsort
SELECT ALL + 81 AS col1 FROM tab1 AS cor0
----
81
81
81

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT ALL - 39 + - tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to fcdee9164ac182b58960473592050266

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6146
SELECT - CAST( + col0 AS SIGNED ) * + col1 + + col2 * col1 * + col1 + + col2 FROM tab2
----
25757
85930
9677

skipif mysql # not compatible
query I rowsort label-6146
SELECT - CAST ( + col0 AS INTEGER ) * + col1 + + col2 * col1 * + col1 + + col2 FROM tab2
----
25757
85930
9677

query I rowsort
SELECT ALL - col1 * + col2 * 19 + col1 + - col1 AS col2 FROM tab1
----
-10830
-23712
-26676

query I rowsort
SELECT ALL 34 AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

onlyif mysql # use DIV operator for integer division
query I rowsort label-6149
SELECT DISTINCT - 20 DIV - col2 + 30 AS col2 FROM tab0
----
30
50

skipif mysql # not compatible
query I rowsort label-6149
SELECT DISTINCT - 20 / - col2 + 30 AS col2 FROM tab0
----
30
50

query I rowsort
SELECT ALL col0 + col2 + tab0.col1 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6152
SELECT + cor0.col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6152
SELECT + cor0.col0 / + col0 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - col1 * col1 + + col2 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT ALL 0 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6155
SELECT + col1 - + col2 DIV + col0 AS col1 FROM tab2
----
17
28
59

skipif mysql # not compatible
query I rowsort label-6155
SELECT + col1 - + col2 / + col0 AS col1 FROM tab2
----
17
28
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6156
SELECT tab0.col0 DIV col2 col0 FROM tab0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6156
SELECT tab0.col0 / col2 col0 FROM tab0
----
0
1
35

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col2 < + col0
----
35
97
1
89
91
82

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( cor2.col1 AS REAL ) * + cor0.col1 AS col0 FROM tab0, tab1 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
100
130
169
260
338
676

query I rowsort
SELECT - 77 * col2 * + ( - col1 ) FROM tab1 cor0
----
108108
43890
96096

query I rowsort
SELECT col1 + + col2 * + 95 FROM tab1 AS cor0
----
5156
5425
9133

query I rowsort
SELECT 45 * col1 FROM tab0 AS cor0
----
3870
4095
4365

query I rowsort
SELECT DISTINCT tab1.col0 FROM tab1 WHERE NOT NULL NOT IN ( + col2 )
----

query I rowsort
SELECT DISTINCT col0 * col0 * tab2.col0 + + col2 FROM tab2
----
370
474578
493077

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) BETWEEN - col1 / col2 + - col1 AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col1 col0 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT - col0 * col2 + col1 * col2 FROM tab2 WHERE col2 <= NULL
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( col2 * col1 ) <> NULL
----

query I rowsort
SELECT DISTINCT col0 * col2 * + col0 - col0 FROM tab0
----
1190
18984
649433

query I rowsort
SELECT ALL col0 * + col2 + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL - tab0.col0 - - col2 AS col1 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col0 * col1 col2 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 WHERE NOT NULL < + col0
----

query I rowsort
SELECT ALL - col1 + + col2 + + 30 FROM tab1
----
113
58
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6174
SELECT 68 DIV - col1 AS col1 FROM tab1
----
-2
-5
-6

skipif mysql # not compatible
query I rowsort label-6174
SELECT 68 / - col1 AS col1 FROM tab1
----
-2
-5
-6

query I rowsort
SELECT + col2 * + col1 * + 98 AS col2 FROM tab0
----
278124
731276
9506

query I rowsort
SELECT ALL - 4 + tab1.col2 FROM tab1
----
50
53
92

query I rowsort
SELECT ALL - col1 + - col2 + col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - 90 AS col0 FROM tab2 AS cor0
----
-90

query I rowsort
SELECT ALL ( col2 ) * + cor0.col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col1 * + col2 + col2 AS col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT ALL + + col1 + - col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT + - col1 * + cor0.col2 - ( col1 ) * col0 FROM tab2 AS cor0
----
-1054
-1989
-6136

query I rowsort
SELECT + - 52 FROM tab1 AS cor0
----
-52
-52
-52

query I rowsort
SELECT ALL - - ( + col1 ) * - col2 + cor0.col1 * col0 * + col0 FROM tab0 AS cor0
----
118728
46698
713349

query I rowsort
SELECT DISTINCT col0 * tab2.col2 - col2 AS col1 FROM tab2
----
162
2002
2964

query III rowsort
SELECT ALL * FROM tab2 WHERE col1 NOT BETWEEN col0 AND NULL
----
78
59
26
79
17
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 col2 FROM tab0 WHERE NOT NULL NOT IN ( - col2 )
----

query I rowsort
SELECT - tab1.col0 + - col2 AS col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT + col2 AS col2 FROM tab1 WHERE col0 BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col2 * + col2 * col1 + col1 + - col2 AS col0 FROM tab2
----
22603
24527
39917

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NOT col1 NOT IN ( + col2 )
----

query I rowsort
SELECT + col0 * col0 + - col2 * col0 + col1 FROM tab2 WHERE NOT NULL IN ( col2 * col2 )
----

query I rowsort
SELECT DISTINCT col2 * - col0 - col2 * - col1 AS col0 FROM tab0
----
164
2046
62

query III rowsort
SELECT * FROM tab1 WHERE ( col2 ) NOT IN ( - col2 + + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT * FROM tab1 WHERE ( - col0 / col2 ) < NULL
----

query I rowsort
SELECT tab0.col0 + - tab0.col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 * - col1 col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - tab0.col0 + + col2 AS col0 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 * col2 * - col0 col2 FROM tab0 WHERE - col1 BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + col0 - + col1 * col1 FROM tab0
----
-7372
-8192
-9374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * col0 col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL col0 * - col1 + - col0 AS col1 FROM tab2 WHERE NULL IN ( + col2 + - col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL col0 * + col2 - tab0.col0 FROM tab0
----
0
7209
768

query I rowsort
SELECT ALL - ( + col1 ) AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - 8 AS col1 FROM tab0, tab1 AS cor0, tab2 cor1, tab0 AS cor2
----
81 values hashing to 7dc47101491db34faf0db8325a6ac276

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col0 FROM tab1
----
88
88
88

query I rowsort
SELECT ALL col1 * + ( + col0 ) FROM tab2
----
1343
217
4602

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

query I rowsort
SELECT + + 99 + + 65 * - col0 FROM tab2 AS cor0
----
-356
-4971
-5036

query I rowsort
SELECT - 83 * col0 AS col0 FROM tab2 AS cor0
----
-581
-6474
-6557

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( 11 ) col1 FROM tab1 AS cor0
----
-11
-11
-11

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 7 AS col1 FROM tab0 cor0
----
-7
-7
-7

query I rowsort
SELECT ALL + 10 AS col1 FROM tab2
----
10
10
10

query I rowsort
SELECT 25 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT DISTINCT + 49 FROM tab0, tab0 AS cor0
----
49

query I rowsort
SELECT DISTINCT col1 * + col0 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT - col0 * ( col1 ) + - col2 AS col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-6222
SELECT + col2 + 89 DIV - 66 + + col0 AS col0 FROM tab2 AS cor0
----
103
116
33

skipif mysql # not compatible
query I rowsort label-6222
SELECT + col2 + 89 / - 66 + + col0 AS col0 FROM tab2 AS cor0
----
103
116
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6223
SELECT + col0 * CAST( ( col0 ) AS SIGNED ) + + 93 AS col1 FROM tab1 cor0
----
102
4189
6493

skipif mysql # not compatible
query I rowsort label-6223
SELECT + col0 * CAST ( ( col0 ) AS INTEGER ) + + 93 AS col1 FROM tab1 cor0
----
102
4189
6493

query I rowsort
SELECT ALL + col1 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6225
SELECT ALL - col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6225
SELECT ALL - col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 + col1 * ( - col1 ) AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT 93 + + tab2.col2 FROM tab2
----
119
120
131

query I rowsort
SELECT - col0 + - tab1.col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL + 38 + col0 FROM tab1
----
102
118
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 + col2 + - col0 col2 FROM tab2 AS cor0
----
1976
209
2961

query I rowsort
SELECT DISTINCT 96 FROM tab2, tab0 AS cor0
----
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6232
SELECT - CAST( NULL AS SIGNED ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6232
SELECT - CAST ( NULL AS INTEGER ) + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + + 49 AS col2 FROM tab0 AS cor0
----
131
50
82

query I rowsort
SELECT + ( - 24 ) * col1 AS col0 FROM tab1
----
-240
-312
-624

query I rowsort
SELECT cor0.col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - col0 + + cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT cor0.col1 * + col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + + col0 + col2 + col2 AS col0 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT - 62 FROM tab0
----
-62
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT - col2 * + cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - 80 AS col1 FROM tab1
----
-80
-80
-80

query I rowsort
SELECT - - ( - col1 ) * col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL cor0.col1 * col1 * + col0 + + col1 FROM tab0 AS cor0
----
177590
329412
737100

query I rowsort
SELECT DISTINCT - + col2 - col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL - 55 FROM tab0 AS cor0
----
-55
-55
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 col1 FROM tab0 cor0
----
88
88
88

query I rowsort
SELECT 88 AS col1 FROM tab0 AS cor0
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) * - col0 col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + cor0.col2 * + col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 36 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-6252
SELECT col2 DIV + tab2.col1 - ( col0 ) FROM tab2
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-6252
SELECT col2 / + tab2.col1 - ( col0 ) FROM tab2
----
-7
-77
-78

query I rowsort
SELECT 55 FROM tab1, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT - col1 + 11 FROM tab1 AS cor0
----
-15
-2
1

query I rowsort
SELECT col2 * ( col0 ) - + col2 AS col1 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT col2 * - 15 FROM tab1 cor0
----
-1440
-810
-855

query I rowsort
SELECT col1 * + 47 - + col1 AS col0 FROM tab2 AS cor0
----
1426
2714
782

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 + col0 * cor0.col0 + + col0 FROM tab0 cor0
----
1260
600
8010

query I rowsort
SELECT - col0 * - col0 + + col1 * col2 * + col1 AS col2 FROM tab2 AS cor0
----
17223
25996
96590

query I rowsort
SELECT - - ( - col1 ) + + col1 * - col2 AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT 5 FROM tab0, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT + 2 * cor0.col0 + col1 AS col2 FROM tab0 cor0
----
134
167
269

query I rowsort
SELECT + + 10 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT DISTINCT col1 * - tab1.col0 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col2 * 19 FROM tab0
----
1558
19
627

query I rowsort
SELECT ALL - + col1 * + col1 + - col0 + col0 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + 4 + 30 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT col1 * - col1 + col0 * col0 + col1 FROM tab0
----
-269
-6734
-8087

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * col2 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - cor0.col0 * col0 * col2 - col1 AS col2 FROM tab2 AS cor0
----
-1354
-158243
-237175

onlyif mysql # use DIV operator for integer division
query I rowsort label-6272
SELECT DISTINCT + + cor0.col1 DIV cor0.col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-6272
SELECT DISTINCT + + cor0.col1 / cor0.col0 FROM tab1 AS cor0
----
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6273
SELECT col1 * + col1 + cor0.col0 DIV col1 + - col2 AS col2 FROM tab1 cor0
----
49
622
79

skipif mysql # not compatible
query I rowsort label-6273
SELECT col1 * + col1 + cor0.col0 / col1 + - col2 AS col2 FROM tab1 cor0
----
49
622
79

query I rowsort
SELECT col0 * col2 + col1 AS col2 FROM tab2
----
2087
220
3019

query I rowsort
SELECT col1 + col1 * + col2 FROM tab0
----
194
2924
7553

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL NOT BETWEEN col0 + + col1 AND + col1 / - col2
----

query I rowsort
SELECT - col2 + + col2 * col1 AS col0 FROM tab1 AS cor0
----
1152
1350
513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + col0 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col0 - col1 * - col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + cor0.col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col2 - + cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col2 * - col2 * col0 AS col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT + col0 * cor0.col2 + - cor0.col1 + - col1 AS col0 FROM tab1 cor0
----
110
3628
7654

query I rowsort
SELECT DISTINCT + + col2 * col2 FROM tab2 AS cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * - col1 col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col2 * + col2 col0 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT col2 + - col1 * + col1 AS col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT col0 * + col1 + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT col2 * col0 + col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - cor0.col0 * - col1 FROM tab0 AS cor0 WHERE NOT NULL IN ( - col1 )
----

query I rowsort
SELECT ALL col0 + + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - col1 + + col1 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + tab2.col2 + col1 * - col1 * col1 - - col1 * tab2.col2 FROM tab2
----
-203819
-28927
-4229

onlyif mysql # use DIV operator for integer division
query I rowsort label-6295
SELECT col2 DIV - col1 AS col0 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6295
SELECT col2 / - col1 AS col0 FROM tab1
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6296
SELECT DISTINCT + col0 + - col2 DIV + col1 AS col2 FROM tab1
----
1
59
73

skipif mysql # not compatible
query I rowsort label-6296
SELECT DISTINCT + col0 + - col2 / + col1 AS col2 FROM tab1
----
1
59
73

query I rowsort
SELECT col2 - col1 * col1 AS col1 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT + tab0.col2 + col2 FROM tab0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - col0 + col0 col2 FROM tab1
----
54
57
96

query I rowsort
SELECT - col1 * - col2 + + col1 + tab2.col1 FROM tab2
----
1652
680
899

onlyif mysql # use DIV operator for integer division
query I rowsort label-6301
SELECT + col2 DIV col0 AS col2 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6301
SELECT + col2 / col0 AS col2 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT ALL + col2 + + cor0.col1 * col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - - col1 + col0 * - col1 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + - cor0.col0 * - col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-54
-57
-96

query I rowsort
SELECT tab0.col1 * + col0 + + tab0.col1 * - col1 FROM tab0
----
-182
-5332
-6014

query I rowsort
SELECT col0 * - tab2.col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT col0 - - tab2.col2 * col2 AS col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT - col1 * col0 - col1 AS col0 FROM tab1
----
-104
-1053
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 * col1 col2 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT - col2 * - tab1.col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT tab2.col0 * col1 AS col0 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - tab2.col2 col1 FROM tab2
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6314
SELECT DISTINCT col0 * + col1 + - col2 - tab2.col0 * col0 DIV col1 AS col2 FROM tab2
----
189
4473
938

skipif mysql # not compatible
query I rowsort label-6314
SELECT DISTINCT col0 * + col1 + - col2 - tab2.col0 * col0 / col1 AS col2 FROM tab2
----
189
4473
938

query I rowsort
SELECT col2 * cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 + - col0 col2 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6317
SELECT DISTINCT - col0 * col2 + col0 * - tab0.col0 - + tab0.col2 DIV col2 col1 FROM tab0
----
-1261
-1369
-15220

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6317
SELECT DISTINCT - col0 * col2 + col0 * - tab0.col0 - + tab0.col2 / col2 col1 FROM tab0
----
-1261
-1369
-15220

query I rowsort
SELECT ALL - tab1.col0 * col1 - col2 FROM tab1
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-6319
SELECT col0 DIV + col0 + + col2 col1 FROM tab1
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6319
SELECT col0 / + col0 + + col2 col1 FROM tab1
----
55
58
97

query I rowsort
SELECT cor0.col0 * col2 + + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - col1 - 5 FROM tab2 cor0
----
-22
-36
-64

query I rowsort
SELECT ALL col1 * + cor0.col1 + 69 FROM tab0 AS cor0
----
7465
8350
9478

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 + + ( - col1 ) col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6324
SELECT ALL + - col2 DIV - ( col2 ) - col0 AS col2 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-6324
SELECT ALL + - col2 / - ( col2 ) - col0 AS col2 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT DISTINCT + - col0 + + col1 * col1 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT ALL - + ( cor0.col1 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT DISTINCT - col2 * ( 88 ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
-2210
-2369
-3265

query I rowsort
SELECT DISTINCT + + col1 * - cor0.col1 + + ( col2 ) + + 2 AS col0 FROM tab0 AS cor0
----
-7361
-8197
-9406

query I rowsort
SELECT ALL col0 * ( + cor0.col0 ) - col2 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT DISTINCT + 95 * cor0.col0 FROM tab1, tab2, tab2 AS cor0
----
665
7410
7505

query I rowsort
SELECT - - col2 + + 74 * col2 FROM tab2 AS cor0
----
1950
2025
2850

onlyif mysql # use DIV operator for integer division
query I rowsort label-6332
SELECT + col1 DIV 96 col1 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6332
SELECT + col1 / 96 col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + 32 + - cor0.col1 FROM tab0 AS cor0
----
-54
-59
-65

query I rowsort
SELECT - 58 FROM tab0 cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT tab1.col2 + 38 AS col0 FROM tab1, tab2 AS cor0
----
134
92
95

query IIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT + col0 + cor0.col0 * - cor0.col2 AS col2 FROM tab0 cor0
----
-7209
-768
0

query I rowsort
SELECT + ( col0 ) + ( - ( col0 ) ) AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + ( - col1 ) AS col1 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6340
SELECT 39 DIV 39 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

skipif mysql # not compatible
query I rowsort label-6340
SELECT 39 / 39 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT + 79 * col0 + + col1 AS col0 FROM tab0 cor0
----
1982
2862
7122

query I rowsort
SELECT - col2 + + col2 + col0 * + col2 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - 28 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
-28

query I rowsort
SELECT 24 * + col0 AS col2 FROM tab2
----
168
1872
1896

query I rowsort
SELECT - 98 * - col2 AS col1 FROM tab2
----
2548
2646
3724

query I rowsort
SELECT DISTINCT col1 * + tab1.col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + 71 AS col0 FROM tab2
----
71
71
71

query I rowsort
SELECT DISTINCT 46 * col1 FROM tab1
----
1196
460
598

query I rowsort
SELECT 5 AS col1 FROM tab2
----
5
5
5

query I rowsort
SELECT ALL 57 * - col1 AS col1 FROM tab0
----
-4902
-5187
-5529

query I rowsort
SELECT ALL - 43 * tab0.col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 1dfd6a0733c31352bbeb4776e880050b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 + col2 col2 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) col1 FROM tab2 AS cor0
----
-7
-78
-79

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab2 AS cor0, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT DISTINCT col1 * - tab2.col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL tab1.col0 * + cor0.col1 AS col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to e6d1e51162f22414194f33e791083a39

query I rowsort
SELECT ALL 27 * + col2 * col2 FROM tab1 cor0
----
248832
78732
87723

query I rowsort
SELECT + 15 * - col1 AS col0 FROM tab2
----
-255
-465
-885

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab0, tab1 AS cor1
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT DISTINCT 54 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 33 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

query I rowsort
SELECT DISTINCT 11 * - 46 AS col1 FROM tab1, tab0 cor0
----
-506

query I rowsort
SELECT DISTINCT - col2 * 68 AS col0 FROM tab0
----
-2244
-5576
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6364
SELECT + col0 * CAST( NULL AS SIGNED ) * col2 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6364
SELECT + col0 * CAST ( NULL AS INTEGER ) * col2 + + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + col0 * - col0 * cor0.col1 FROM tab2 cor0
----
-106059
-1492
-358930

query I rowsort
SELECT 96 * + col1 FROM tab0
----
8256
8736
9312

query I rowsort
SELECT 31 FROM tab1, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab0 AS cor0, tab0 cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6369
SELECT DISTINCT + - CAST( NULL AS DECIMAL ) * - 18 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6369
SELECT DISTINCT + - CAST ( NULL AS REAL ) * - 18 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col2 + 17 FROM tab0 AS cor0
----
18
50
99

query I rowsort
SELECT - ( - col1 ) AS col0 FROM tab2 cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - 4 col2 FROM tab0 AS cor0
----
82
87
93

query I rowsort
SELECT + col0 * + 80 AS col2 FROM tab2 cor0
----
560
6240
6320

query I rowsort
SELECT - + col0 * - col0 + - col1 AS col2 FROM tab0 cor0
----
1128
490
7830

query I rowsort
SELECT + 85 - col1 FROM tab1 AS cor0
----
59
72
75

query I rowsort
SELECT + col1 * cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT + tab0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + 47 * - col1 + + col0 + col0 * col0 AS col1 FROM tab1
----
-1210
3690
5869

query I rowsort
SELECT col0 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT - + 41 * col0 - + col1 FROM tab2 AS cor0
----
-318
-3256
-3257

query I rowsort
SELECT ( col2 ) - - col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT 32 + - col0 AS col0 FROM tab2 AS cor0
----
-46
-47
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 23 * col2 col1 FROM tab2 AS cor0
----
598
621
874

query I rowsort
SELECT ALL - 65 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT - - col2 + col0 * col0 FROM tab0 AS cor0
----
1226
609
8003

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6386
SELECT DISTINCT CAST( col2 AS SIGNED ) * + col0 AS col1 FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-6386
SELECT DISTINCT CAST ( col2 AS INTEGER ) * + col0 AS col1 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6387
SELECT + - CAST( col1 AS SIGNED ) + col2 FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-6387
SELECT + - CAST ( col1 AS INTEGER ) + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT - + 67 FROM tab0 cor0
----
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 22 col1 FROM tab0
----
1958
528
770

query I rowsort
SELECT ALL - col1 + - col2 * 94 AS col1 FROM tab0 AS cor0
----
-191
-3188
-7799

query I rowsort
SELECT ALL - col0 * + cor0.col0 + + ( - col0 ) AS col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL - + col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 22 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT DISTINCT ( - 44 * tab1.col1 ) FROM tab1
----
-1144
-440
-572

query I rowsort
SELECT + cor0.col1 * col2 AS col1 FROM tab0 cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 + - col0 col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT + 44 + col2 + tab2.col0 FROM tab2
----
148
161
78

query I rowsort
SELECT ALL - col0 + - col2 AS col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT - col2 * 64 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT ALL + col1 * + col1 * + col2 FROM tab2 AS cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 + + ( ( - col2 ) ) col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 45 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query I rowsort
SELECT - tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT 50 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT ALL col0 * - 59 AS col2 FROM tab0
----
-1416
-2065
-5251

onlyif mysql # use DIV operator for integer division
query I rowsort label-6407
SELECT ALL col0 DIV col0 - + col2 AS col1 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-6407
SELECT ALL col0 / col0 - + col2 AS col1 FROM tab2
----
-25
-26
-37

query I rowsort
SELECT col2 - col2 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - + col0 + + col1 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + col0 * - 33 - col0 FROM tab1 AS cor0
----
-102
-2176
-2720

query I rowsort
SELECT col2 + + col1 + 84 AS col1 FROM tab0 AS cor0
----
182
203
257

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6412
SELECT + col2 + CAST( NULL AS DECIMAL ) + 59 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6412
SELECT + col2 + CAST ( NULL AS REAL ) + 59 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - ( + col0 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col0 * - col1 + - col2 - col1 AS col2 FROM tab2
----
-1398
-275
-4687

query I rowsort
SELECT col2 + - tab1.col1 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT col1 - - col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6417
SELECT ALL - - col2 - + col0 DIV - col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6417
SELECT ALL - - col2 - + col0 / - col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL col2 + - col0 * - 39 FROM tab1 AS cor0
----
171
2553
3216

query I rowsort
SELECT + col0 + tab1.col0 * col2 FROM tab1
----
165
3712
7760

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 ALL - 95 * - col2 AS col0 FROM tab1 AS cor0
----
5130
5415
9120

query I rowsort
SELECT DISTINCT - - ( + cor0.col2 ) AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + - 53 AS col0 FROM tab2 AS cor0
----
-53

query I rowsort
SELECT + - 77 + ( + col0 ) - - 80 FROM tab1 AS cor0
----
6
67
83

query I rowsort
SELECT ALL + cor0.col0 * 39 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT DISTINCT + ( col1 ) + + cor0.col1 + - 36 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-2924
-3094
-3298

onlyif mysql # use DIV operator for integer division
query I rowsort label-6427
SELECT DISTINCT + col1 DIV + ( + col1 ) + + col1 * - col1 FROM tab1 cor0
----
-168
-675
-99

skipif mysql # not compatible
query I rowsort label-6427
SELECT DISTINCT + col1 / + ( + col1 ) + + col1 * - col1 FROM tab1 cor0
----
-168
-675
-99

query I rowsort
SELECT ALL + 37 FROM tab1 cor0
----
37
37
37

query I rowsort
SELECT + ( col0 ) + + col1 - + 59 * col1 FROM tab2 cor0
----
-1791
-3344
-907

query I rowsort
SELECT ALL col1 + cor0.col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT col0 + 37 FROM tab1
----
101
117
40

query I rowsort
SELECT DISTINCT tab0.col2 * col1 + col2 * + col0 + - col1 AS col0 FROM tab0
----
14669
35
3544

query I rowsort
SELECT ALL + col2 * col2 + col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT 28 + - 14 AS col2 FROM tab1 AS cor0
----
14
14
14

query I rowsort
SELECT + + col2 + 70 AS col2 FROM tab1 AS cor0
----
124
127
166

query I rowsort
SELECT DISTINCT - col2 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 - col1 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + 32 + + col1 + col1 * col2 FROM tab1 AS cor0
----
1293
1462
612

query I rowsort
SELECT + 99 + - 92 FROM tab2 AS cor0
----
7
7
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6440
SELECT DISTINCT + col1 + + 52 + + col2 * cor0.col1 DIV 73 AS col0 FROM tab1 AS cor0
----
69
82
97

skipif mysql # not compatible
query I rowsort label-6440
SELECT DISTINCT + col1 + + 52 + + col2 * cor0.col1 / 73 AS col0 FROM tab1 AS cor0
----
69
82
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 11 + col1 col2 FROM tab2 AS cor0
----
28
42
70

query I rowsort
SELECT ALL - tab2.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ( + col1 * + col0 ) FROM tab1
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6444
SELECT - ( ( - cor1.col2 ) ) * + CAST( 50 AS SIGNED ) FROM tab1 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d77631da1543954248f01aecb963a5a0

skipif mysql # not compatible
query I rowsort label-6444
SELECT - ( ( - cor1.col2 ) ) * + CAST ( 50 AS INTEGER ) FROM tab1 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d77631da1543954248f01aecb963a5a0

query I rowsort
SELECT ALL - - col0 * cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT + + 20 * col1 FROM tab2 AS cor0
----
1180
340
620

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL - 85 AS col1 FROM tab1 AS cor0
----
-85
-85
-85

query I rowsort
SELECT ALL + + 85 * - col0 AS col2 FROM tab2 AS cor0
----
-595
-6630
-6715

query I rowsort
SELECT DISTINCT - 77 * - col2 AS col2 FROM tab0 AS cor0
----
2541
6314
77

query I rowsort
SELECT + + 26 + col2 FROM tab1 cor0
----
122
80
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 - - cor0.col1 col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT col0 * - col0 + 63 FROM tab0 AS cor0
----
-1162
-513
-7858

query I rowsort
SELECT DISTINCT + + 93 * col0 * 96 AS col2 FROM tab1 AS cor0
----
26784
571392
714240

query I rowsort
SELECT ALL 0 * - col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - col1 + + ( + col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 * ( col0 ) AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT + - cor0.col2 + + 54 FROM tab1 AS cor0
----
-3
-42
0

query I rowsort
SELECT DISTINCT col2 * + 41 - 79 FROM tab0 AS cor0
----
-38
1274
3283

query I rowsort
SELECT ALL - col1 * - ( col2 ) FROM tab1 cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 + - col1 col2 FROM tab1 cor0
----
-104
-1053
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-6463
SELECT col2 * col2 DIV - col2 - + col0 AS col0 FROM tab0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-6463
SELECT col2 * col2 / - col2 - + col0 AS col0 FROM tab0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6464
SELECT ALL - + col1 / - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6464
SELECT ALL - + col1 / - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6465
SELECT ALL + cor0.col0 * CAST( ( + col2 ) * + ( 75 ) AS SIGNED ) AS col2 FROM tab1 AS cor0
----
12150
273600
576000

skipif mysql # not compatible
query I rowsort label-6465
SELECT ALL + cor0.col0 * CAST ( ( + col2 ) * + ( 75 ) AS INTEGER ) AS col2 FROM tab1 AS cor0
----
12150
273600
576000

query I rowsort
SELECT ALL + + ( + col2 ) + + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT cor0.col0 + - 73 + col0 FROM tab0 AS cor0
----
-25
-3
105

query I rowsort
SELECT + col1 + - 60 FROM tab0 AS cor0
----
26
31
37

query I rowsort
SELECT DISTINCT + cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 14 AS col0 FROM tab0 AS cor0
----
-14

query I rowsort
SELECT - 35 + + cor0.col2 FROM tab2 cor0
----
-8
-9
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6472
SELECT - + 98 + 40 DIV col1 + col1 AS col0 FROM tab0 AS cor0
----
-1
-12
-7

skipif mysql # not compatible
query I rowsort label-6472
SELECT - + 98 + 40 / col1 + col1 AS col0 FROM tab0 AS cor0
----
-1
-12
-7

query I rowsort
SELECT ALL + 75 * - 93 - col0 * + 4 * - 85 AS col2 FROM tab1 AS cor0
----
-5955
14785
20225

query I rowsort
SELECT - 57 * col1 + + col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-4110
-5494
2111

query I rowsort
SELECT DISTINCT + 75 + - col2 FROM tab2 AS cor0
----
37
48
49

query I rowsort
SELECT 34 AS col0 FROM tab2 cor0
----
34
34
34

query I rowsort
SELECT ALL - 78 * col1 AS col1 FROM tab0 AS cor0
----
-6708
-7098
-7566

query I rowsort
SELECT DISTINCT + 9 AS col2 FROM tab2 AS cor0
----
9

query I rowsort
SELECT - col0 * + col0 * + col0 + 30 * + col0 AS col2 FROM tab1 AS cor0
----
-260224
-509600
63

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0, tab1 cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT 44 + col0 AS col1 FROM tab1 AS cor0
----
108
124
47

query I rowsort
SELECT cor0.col2 + 2 FROM tab2, tab0 cor0
----
9 values hashing to 3580ef541904494f3cc7699aa92c8dd0

query I rowsort
SELECT - cor0.col2 - 60 AS col1 FROM tab0 cor0
----
-142
-61
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6485
SELECT - - col1 DIV col0 + - col0 * col1 + - cor0.col2 FROM tab2 AS cor0
----
-1381
-240
-4628

skipif mysql # not compatible
query I rowsort label-6485
SELECT - - col1 / col0 + - col0 * col1 + - cor0.col2 FROM tab2 AS cor0
----
-1381
-240
-4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6486
SELECT DISTINCT - col1 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6486
SELECT DISTINCT - col1 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col1 - + 97 FROM tab2 AS cor0
----
-114
-128
-156

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6488
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6488
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT col0 * - col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col2 * col1 * + col1 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT col2 * - ( - col2 ) FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6492
SELECT - CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6492
SELECT - CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6493
SELECT ALL + col2 + ( col2 ) DIV col1 AS col2 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-6493
SELECT ALL + col2 + ( col2 ) / col1 AS col2 FROM tab2
----
26
27
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-6494
SELECT - 57 DIV col1 + - col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6494
SELECT - 57 / col1 + - col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 40 ) col2 FROM tab2 AS cor0
----
-40
-40
-40

query I rowsort
SELECT + 71 + - 29 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT ALL col2 + 21 AS col2 FROM tab0
----
103
22
54

query I rowsort
SELECT col2 * - col1 + - col0 + col1 AS col1 FROM tab1
----
-1315
-1381
-624

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6499
SELECT col1 * - CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6499
SELECT col1 * - CAST ( NULL AS INTEGER ) * - col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + ( col0 ) + - col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - - ( + col2 ) + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - cor2.col0 + - 34 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 91dfbf6ebf9ba4c84fe7f6cbbece012a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6503
SELECT col2 / - CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6503
SELECT col2 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * + ( + tab1.col0 ) * - col1 AS col2 FROM tab1
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) * - col1 col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - 4 + + col0 * - tab2.col1 * - col0 FROM tab2
----
106093
1515
358952

query I rowsort
SELECT ALL ( - col0 * col0 ) AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - 94 AS col2 FROM tab1 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ALL + ( col1 ) AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + 71 AS col0 FROM tab0
----
71
71
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-6511
SELECT - col2 + - col2 DIV - col2 AS col1 FROM tab1 cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-6511
SELECT - col2 + - col2 / - col2 AS col1 FROM tab1 cor0
----
-53
-56
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6512
SELECT DISTINCT col2 DIV col1 AS col0 FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-6512
SELECT DISTINCT col2 / col1 AS col0 FROM tab2
----
0
2

query I rowsort
SELECT 70 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT DISTINCT - - 34 FROM tab0, tab1, tab0 AS cor0
----
34

query I rowsort
SELECT ALL col0 * - cor0.col2 * + ( - col2 ) + col0 AS col2 FROM tab0 cor0
----
26160
598525
70

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab2 cor1, tab2 cor2
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT ALL + - cor0.col2 + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT 59 AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT - col2 + 38 AS col2 FROM tab1 AS cor0
----
-16
-19
-58

query I rowsort
SELECT - cor0.col2 * - col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + 96 AS col1 FROM tab0
----
96
96
96

query I rowsort
SELECT + col2 * cor0.col2 - - ( 80 * - col1 ) AS col1 FROM tab2 AS cor0
----
-1751
-4044
84

query I rowsort
SELECT 99 * + tab0.col0 AS col2 FROM tab0
----
2376
3465
8811

onlyif mysql # use DIV operator for integer division
query I rowsort label-6524
SELECT DISTINCT + 69 DIV - col0 FROM tab0 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6524
SELECT DISTINCT + 69 / - col0 FROM tab0 cor0
----
-1
-2
0

query I rowsort
SELECT - - col2 * + col1 + col1 AS col2 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 * col2 col0 FROM tab2 AS cor0
----
-104
-108
-152

query I rowsort
SELECT 90 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT ( col1 ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + - col1 * cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT + + col1 * col1 + + 39 FROM tab2 AS cor0
----
1000
328
3520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) col0 FROM tab1
----
10
13
26

query I rowsort
SELECT - col2 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6535
SELECT ALL - + col1 - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6535
SELECT ALL - + 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-6536
SELECT DISTINCT col2 * + ( + col1 ) + col2 * + CAST( NULL AS SIGNED ) * - cor0.col2 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6536
SELECT DISTINCT col2 * + ( + col1 ) + col2 * + CAST ( NULL AS INTEGER ) * - cor0.col2 AS col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL col2 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col1 * + 32 * - col1 + cor0.col2 FROM tab1 AS cor0
----
21686
3257
5504

query I rowsort
SELECT ALL + - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6541
SELECT - col2 DIV col0 - - col1 FROM tab0 cor0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-6541
SELECT - col2 / col0 - - col1 FROM tab0 cor0
----
85
91
97

query I rowsort
SELECT DISTINCT col2 + 39 FROM tab1 cor0
----
135
93
96

query I rowsort
SELECT - + col2 + + 93 AS col0 FROM tab0 AS cor0
----
11
60
92

query I rowsort
SELECT DISTINCT tab2.col1 * 51 FROM tab2, tab2 cor0
----
1581
3009
867

query I rowsort
SELECT DISTINCT col2 + - col0 - col0 AS col2 FROM tab1
----
-64
-71
48

query I rowsort
SELECT DISTINCT 49 * col0 * col2 - - col1 AS col1 FROM tab2
----
147115
9292
99431

query I rowsort
SELECT ( col0 ) AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT - 18 + col1 * - col1 - col1 * tab1.col0 FROM tab1
----
-1227
-758
-772

query I rowsort
SELECT DISTINCT - - 5 FROM tab1, tab2, tab0 AS cor0
----
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6550
SELECT + ( col0 ) * + CAST( 16 AS SIGNED ) FROM tab0
----
1424
384
560

skipif mysql # not compatible
query I rowsort label-6550
SELECT + ( col0 ) * + CAST ( 16 AS INTEGER ) FROM tab0
----
1424
384
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6551
SELECT - CAST( NULL AS SIGNED ) * + ( col1 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6551
SELECT - CAST ( NULL AS INTEGER ) * + ( col1 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 85 FROM tab2 AS cor0
----
85
85
85

query I rowsort
SELECT + + 69 AS col0 FROM tab2 AS cor0
----
69
69
69

query I rowsort
SELECT - 14 FROM tab1 AS cor0
----
-14
-14
-14

query I rowsort
SELECT - ( - ( col1 ) ) + 30 * 24 AS col2 FROM tab2 AS cor0
----
737
751
779

query I rowsort
SELECT 16 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT ALL - ( + ( - col1 ) ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + - 41 * - col2 + - col0 FROM tab2 cor0
----
1100
1479
988

query I rowsort
SELECT ALL + 4 + - 78 * col2 AS col1 FROM tab1 AS cor0
----
-4208
-4442
-7484

query I rowsort
SELECT - - 70 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to 042fa16c43ab365359ee93c064e44127

query I rowsort
SELECT + + col2 + + cor0.col0 * + col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT 58 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT - + col0 * cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + ( + col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT 76 AS col1 FROM tab2 AS cor0
----
76

query I rowsort
SELECT ALL + + 22 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT + col1 + - col2 * col0 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - col1 * + col2 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - ( + col1 ) * + col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + col1 * cor0.col1 + col1 * - ( + col0 ) FROM tab2 AS cor0
----
-1054
-1121
744

query I rowsort
SELECT DISTINCT + - col2 * - col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 13 + + tab0.col0 * col0 col1 FROM tab0
----
1212
563
7908

query I rowsort
SELECT ( - col0 ) + - col1 FROM tab1
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6576
SELECT ALL tab0.col2 DIV 14 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to a741a389eb4873844dcf2ad4e277fae9

skipif mysql # not compatible
query I rowsort label-6576
SELECT ALL tab0.col2 / 14 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to a741a389eb4873844dcf2ad4e277fae9

query I rowsort
SELECT DISTINCT + 87 * + col0 FROM tab0
----
2088
3045
7743

query I rowsort
SELECT ALL - 89 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query I rowsort
SELECT ALL + tab2.col2 * + col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - 0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT ALL - 41 + - col1 AS col0 FROM tab2 AS cor0
----
-100
-58
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-6582
SELECT DISTINCT col2 DIV col2 AS col0 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-6582
SELECT DISTINCT col2 / col2 AS col0 FROM tab0 cor0
----
1

query I rowsort
SELECT DISTINCT + - cor0.col2 + + col0 * - ( cor0.col1 ) FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-6584
SELECT DISTINCT - cor0.col0 DIV - cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-6584
SELECT DISTINCT - cor0.col0 / - cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
11
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6585
SELECT DISTINCT 45 * col0 DIV - col2 FROM tab1 AS cor0
----
-2
-37
-50

skipif mysql # not compatible
query I rowsort label-6585
SELECT DISTINCT 45 * col0 / - col2 FROM tab1 AS cor0
----
-2
-37
-50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6586
SELECT - col1 + - col2 * - CAST( ( col0 ) * CAST( col2 AS SIGNED ) AS SIGNED ) FROM tab2 AS cor0
----
114059
5072
52669

skipif mysql # not compatible
query I rowsort label-6586
SELECT - col1 + - col2 * - CAST ( ( col0 ) * CAST ( col2 AS INTEGER ) AS INTEGER ) FROM tab2 AS cor0
----
114059
5072
52669

query I rowsort
SELECT ALL + 32 * - col0 FROM tab1 AS cor0
----
-2048
-2560
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6588
SELECT 96 DIV + col0 FROM tab1 AS cor0
----
1
1
32

skipif mysql # not compatible
query I rowsort label-6588
SELECT 96 / + col0 FROM tab1 AS cor0
----
1
1
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-6589
SELECT - col0 DIV col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-6589
SELECT - col0 / col1 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT + - 84 * col0 + - col0 * - col2 FROM tab1 AS cor0
----
-1728
-90
960

query I rowsort
SELECT ALL - 67 AS col2 FROM tab1 cor0
----
-67
-67
-67

query I rowsort
SELECT - col2 + ( cor0.col0 ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - col1 * ( col1 ) + - col1 FROM tab1 cor0
----
-110
-182
-702

query I rowsort
SELECT + + col0 + + col0 * - 45 AS col1 FROM tab2 AS cor0
----
-308
-3432
-3476

query I rowsort
SELECT - + col2 - 55 AS col1 FROM tab1 AS cor0
----
-109
-112
-151

query I rowsort
SELECT ALL 32 + 45 * col0 FROM tab1 cor0
----
167
2912
3632

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6598
SELECT DISTINCT - col0 DIV + col0 + col0 + + col1 DIV col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6598
SELECT DISTINCT - col0 / + col0 + col0 + + col1 / col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - + col2 * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT tab1.col0 * 35 + col1 FROM tab1
----
131
2250
2813

query I rowsort
SELECT - col0 * col0 + - col1 FROM tab2
----
-6143
-6258
-80

query I rowsort
SELECT + 3 + - cor0.col0 * + col2 FROM tab1 AS cor0
----
-159
-3645
-7677

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 91 * col1 col0 FROM tab0 AS cor0
----
-7826
-8281
-8827

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6604
SELECT + col0 * - col1 + col2 * + CAST( 34 AS SIGNED ) col0 FROM tab2 AS cor0
----
-3718
-51
701

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6604
SELECT + col0 * - col1 + col2 * + CAST ( 34 AS INTEGER ) col0 FROM tab2 AS cor0
----
-3718
-51
701

query I rowsort
SELECT DISTINCT - col2 - 60 * col0 FROM tab1 AS cor0
----
-234
-3897
-4896

query I rowsort
SELECT + cor1.col1 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT DISTINCT col2 * col1 + col0 + + col2 FROM tab0 AS cor0
----
133
2895
7633

query I rowsort
SELECT ALL + - col0 * 57 + col2 FROM tab2 AS cor0
----
-372
-4420
-4465

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT ALL - + col0 * cor0.col2 + - col0 + - cor0.col0 FROM tab1 AS cor0
----
-168
-3776
-7840

query I rowsort
SELECT DISTINCT - + col0 + 7 AS col2 FROM tab0 AS cor0
----
-17
-28
-82

query I rowsort
SELECT - 48 + col0 FROM tab1 AS cor0
----
-45
16
32

query I rowsort
SELECT col1 + col1 + - tab1.col2 AS col1 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT DISTINCT - col2 * col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT tab0.col2 * + tab0.col2 * - col2 FROM tab0
----
-1
-35937
-551368

query I rowsort
SELECT + col2 AS col2 FROM tab0 WHERE NULL <> ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col0 col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col0 * tab0.col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + col0 * - col1 + col1 * + col1 FROM tab2
----
-1054
-1121
744

query I rowsort
SELECT - col1 * col0 + col0 AS col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT col0 * + col0 * - tab0.col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT col1 + col2 * - col2 + - col2 FROM tab1
----
-2944
-3296
-9299

query I rowsort
SELECT - col1 - + col2 FROM tab2 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT ALL + col0 * - tab2.col0 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT + col0 + + tab2.col1 + + col2 * + col1 AS col1 FROM tab2 WHERE col0 + - col1 + col0 IN ( - tab2.col1 * + col2 )
----

query I rowsort
SELECT ALL col1 - tab1.col1 * + col0 * tab1.col2 AS col1 FROM tab1
----
-36470
-4186
-99827

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL <> - col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 col1 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT - col0 * + col2 / col0 FROM tab0 WHERE NOT NULL <= col0 * + col2 * col2
----

query I rowsort
SELECT ALL - col1 + + col2 * col2 AS col0 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT DISTINCT - tab0.col2 + col2 FROM tab0
----
0

query I rowsort
SELECT DISTINCT tab1.col2 * col1 - tab1.col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT col1 * col0 AS col0 FROM tab1 WHERE - col0 >= NULL
----

query I rowsort
SELECT DISTINCT + col1 + + col0 + - col1 FROM tab0
----
24
35
89

query I rowsort
SELECT + col1 * + col0 + col1 AS col2 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT ALL col1 + - col2 - col1 FROM tab1
----
-54
-57
-96

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT IN ( + tab2.col2 * - col0 * + col1 - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6639
SELECT col2 * + col0 + tab0.col1 DIV col0 AS col1 FROM tab0
----
37
7299
795

skipif mysql # not compatible
query I rowsort label-6639
SELECT col2 * + col0 + tab0.col1 / col0 AS col1 FROM tab0
----
37
7299
795

query I rowsort
SELECT + col1 * col2 * - col2 AS col1 FROM tab0
----
-611884
-93654
-97

query III rowsort
SELECT * FROM tab1 WHERE NULL IN ( col1 )
----

query I rowsort
SELECT DISTINCT + col1 * col1 AS col1 FROM tab2
----
289
3481
961

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT IN ( - col0 * + col1 * col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6644
SELECT DISTINCT col1 DIV - col0 AS col1 FROM tab2
----
-4
0

skipif mysql # not compatible
query I rowsort label-6644
SELECT DISTINCT col1 / - col0 AS col1 FROM tab2
----
-4
0

query I rowsort
SELECT ALL + col2 * col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL + col0 * + col2 * col2 - col1 AS col1 FROM tab2 AS cor0
----
114059
5072
52669

query I rowsort
SELECT ALL - + col2 * - col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - col0 - - col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - + col1 + - col1 * - col2 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL - col1 * col1 - + col2 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT - + col1 * + col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - cor0.col0 + + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + col1 + - col0 * + col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT col1 + + col2 * + col1 AS col0 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ALL col2 + col0 AS col1 FROM tab0 AS cor0 WHERE col2 > ( NULL )
----

query I rowsort
SELECT cor0.col2 FROM tab2 AS cor0 WHERE col1 * + cor0.col0 = ( NULL )
----

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE ( NULL ) = NULL
----

query I rowsort
SELECT + col1 * + col2 * + col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + col0 + col2 * + col2 * - col0 FROM tab1 AS cor0
----
-207872
-737200
-8745

query I rowsort
SELECT - col1 * col2 * - col1 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT + + 6 * - 87 FROM tab2 AS cor0
----
-522
-522
-522

query I rowsort
SELECT + + col1 * - cor0.col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT cor0.col2 + - cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 76b1d8548f1c7689108ab6ccf6c2516e

query I rowsort
SELECT ALL 14 * + 62 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 93cff70e6e65a0f9ac2f08901db0e12b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6666
SELECT DISTINCT CAST( NULL AS SIGNED ) * - col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6666
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6667
SELECT ALL + ( col2 ) DIV col2 + + 40 AS col1 FROM tab1 AS cor0
----
41
41
41

skipif mysql # not compatible
query I rowsort label-6667
SELECT ALL + ( col2 ) / col2 + + 40 AS col1 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT 25 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT - col1 + + col0 * - col1 * 7 FROM tab0 AS cor0
----
-14534
-23862
-56784

query I rowsort
SELECT col2 + + col0 FROM tab1 cor0
----
121
176
57

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT col2 * - col0 - col1 AS col0 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT ALL col2 * - tab1.col1 + + col1 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL + col0 - col2 FROM tab1
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 72 + - col2 col1 FROM tab0 AS cor0
----
-10
39
71

query I rowsort
SELECT - 62 + col1 * 83 * 58 AS col0 FROM tab1 AS cor0
----
125102
48078
62520

query I rowsort
SELECT ALL 61 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT - cor0.col0 * cor0.col0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f921d4cdc13dc0e8c0388ccf3f81ffc1

query I rowsort
SELECT DISTINCT + col1 * col2 AS col0 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - cor0.col1 * - 70 col2 FROM tab1 AS cor0
----
1846
710
923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6681
SELECT 41 DIV + 90 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-6681
SELECT 41 / + 90 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT DISTINCT + 97 FROM tab2
----
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 * col2 col2 FROM tab0 AS cor0
----
1485
3690
45

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab1 AS cor0, tab0 AS cor1
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT - 72 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

query I rowsort
SELECT col1 + - col2 * 31 FROM tab1
----
-1648
-1757
-2963

query I rowsort
SELECT DISTINCT - 4 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
-4

query I rowsort
SELECT ALL 50 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + - col2 col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT ( - col2 ) * col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT + col0 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - + col2 + cor0.col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + 22 FROM tab2
----
22
22
22

query I rowsort
SELECT ALL 36 FROM tab2, tab2 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT DISTINCT tab1.col1 * - col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - ( + tab0.col2 ) + - col2 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT ALL + ( + col1 ) AS col2 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6699
SELECT - col2 DIV + 36 FROM tab2 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6699
SELECT - col2 / + 36 FROM tab2 cor0
----
-1
0
0

query I rowsort
SELECT + 51 AS col2 FROM tab0 AS cor0
----
51
51
51

query I rowsort
SELECT ALL col2 * col1 * + col2 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT DISTINCT + col2 + - col0 * - col2 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - 86 AS col1 FROM tab2 AS cor0
----
-86
-86
-86

query I rowsort
SELECT ALL + 94 * + col2 FROM tab0 AS cor0
----
3102
7708
94

query I rowsort
SELECT DISTINCT - 97 * col1 FROM tab2 AS cor0
----
-1649
-3007
-5723

query I rowsort
SELECT ALL ( col1 ) + col1 * - col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - col2 + col1 AS col1 FROM tab1
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6708
SELECT ALL col1 + col2 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6708
SELECT ALL col1 + col2 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 29 * col0 - - 68 FROM tab2
----
2330
2359
271

query I rowsort
SELECT ALL + 64 + col1 * 56 FROM tab1
----
1520
624
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 50 * + col2 + - col2 col0 FROM tab2 cor0
----
1274
1323
1862

onlyif mysql # use DIV operator for integer division
query I rowsort label-6712
SELECT DISTINCT col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6712
SELECT DISTINCT col1 / cor0.col1 AS col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT + 15 AS col1 FROM tab1 AS cor0
----
15
15
15

query I rowsort
SELECT 21 * col1 AS col0 FROM tab2 AS cor0
----
1239
357
651

query I rowsort
SELECT col1 * ( - col2 + col1 ) * + col0 FROM tab2 AS cor0
----
-28203
151866
868

query I rowsort
SELECT DISTINCT + col2 * ( col0 ) + - col2 * + col2 AS col1 FROM tab2 AS cor0
----
-540
1352
1558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + + col0 * ( col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - cor0.col1 * + 53 + + col1 + - col2 AS col1 FROM tab0 AS cor0
----
-4505
-4814
-5045

query I rowsort
SELECT 83 * col1 * - 42 AS col1 FROM tab2
----
-108066
-205674
-59262

query I rowsort
SELECT col0 * cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - + col1 + + col0 * col2 + + col2 FROM tab1 AS cor0
----
190
3695
7763

query I rowsort
SELECT ALL + + col1 + - 90 FROM tab2 cor0
----
-31
-59
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6724
SELECT ALL col2 DIV - col2 + col0 AS col2 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-6724
SELECT ALL col2 / - col2 + col0 AS col2 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT ALL + + col2 + - col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 + + cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

onlyif mysql # use DIV operator for integer division
query I rowsort label-6727
SELECT ALL - col2 + - col1 DIV + col1 AS col0 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-6727
SELECT ALL - col2 + - col1 / + col1 AS col0 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT DISTINCT - col0 * col1 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + + cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 + + col0 * cor0.col1 + col2 FROM tab2 AS cor0
----
1460
251
4706

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 * - cor0.col0 FROM tab0 cor0
----
-1190
-552
-7832

query I rowsort
SELECT + col2 * col1 + + col1 * - col0 FROM tab0 AS cor0
----
-3298
-637
774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col2 - + col2 * col0 col0 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-6734
SELECT ALL col0 DIV col2 + + cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3649
7680

skipif mysql # not compatible
query I rowsort label-6734
SELECT ALL col0 / col2 + + cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3649
7680

query I rowsort
SELECT - - col0 * col2 + col0 AS col1 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - col1 + tab1.col2 * + col1 * col0 AS col2 FROM tab1
----
36470
4186
99827

query I rowsort
SELECT + col1 * + col2 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col0 + - col0 * + col2 * col2 FROM tab1
----
-207872
-737200
-8745

query I rowsort
SELECT - col0 + - col0 * col1 FROM tab1
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - cor0.col0 * cor0.col1 - col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL cor0.col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - col0 + - col1 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT col1 - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + col2 + + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + col2 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + - col0 * + col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + cor0.col1 - col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + col0 + - col0 * - col1 + - col1 AS col2 FROM tab0 cor0
----
2002
3333
8097

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col0 + col2 col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL - col0 - + col0 AS col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT 36 + tab0.col0 FROM tab0
----
125
60
71

query I rowsort
SELECT - 77 + col0 + col1 FROM tab2
----
-39
19
60

query I rowsort
SELECT col0 + + 17 AS col1 FROM tab0
----
106
41
52

query I rowsort
SELECT DISTINCT - 54 - - col0 * + tab0.col0 AS col0 FROM tab0
----
1171
522
7867

query I rowsort
SELECT DISTINCT col0 * + col0 + col1 - - tab1.col2 FROM tab1
----
4163
6509
89

query I rowsort
SELECT + 2 * + tab0.col0 AS col2 FROM tab0
----
178
48
70

query I rowsort
SELECT - 3 AS col0 FROM tab2
----
-3
-3
-3

query I rowsort
SELECT ALL col1 - - 29 FROM tab1
----
39
42
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-6760
SELECT 91 DIV col1 FROM tab2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-6760
SELECT 91 / col1 FROM tab2
----
1
2
5

query I rowsort
SELECT DISTINCT col0 + - col1 AS col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT - 87 + + col0 + tab2.col0 FROM tab2
----
-73
69
71

query I rowsort
SELECT DISTINCT - + cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6764
SELECT ALL - col2 + col2 DIV col1 AS col0 FROM tab2 AS cor0
----
-26
-27
-36

skipif mysql # not compatible
query I rowsort label-6764
SELECT ALL - col2 + col2 / col1 AS col0 FROM tab2 AS cor0
----
-26
-27
-36

query I rowsort
SELECT - - col0 + col1 * + cor0.col0 * + col2 AS col2 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT ALL ( col1 ) + - cor0.col2 AS col0 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col1 * + col1 col0 FROM tab0 AS cor0
----
7310
8190
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 * col2 col2 FROM tab1 AS cor0
----
486
513
864

query I rowsort
SELECT DISTINCT - 74 AS col1 FROM tab0 AS cor0
----
-74

query I rowsort
SELECT DISTINCT tab2.col1 + - col0 * col2 AS col2 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ALL - - col2 + - col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - 31 + - col1 FROM tab2 AS cor0
----
-48
-62
-90

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) + col1 / - 43 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - 91 FROM tab2, tab0, tab0 AS cor0
----
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6775
SELECT CAST( 21 AS SIGNED ) AS col2 FROM tab2
----
21
21
21

skipif mysql # not compatible
query I rowsort label-6775
SELECT CAST ( 21 AS INTEGER ) AS col2 FROM tab2
----
21
21
21

query I rowsort
SELECT - ( + tab0.col2 ) AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL 61 + + col2 AS col2 FROM tab1
----
115
118
157

query I rowsort
SELECT DISTINCT - 43 + - col1 FROM tab2 AS cor0
----
-102
-60
-74

query I rowsort
SELECT col2 * - col1 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + - ( col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ( cor0.col2 ) FROM tab0, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - tab2.col0 * tab2.col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + - col0 * - ( - cor0.col1 ) FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - col0 * ( col1 ) + - col2 AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + col2 + 90 AS col2 FROM tab2
----
116
117
128

query I rowsort
SELECT 43 * col1 FROM tab0 AS cor0
----
3698
3913
4171

query I rowsort
SELECT ( + col1 + col1 ) FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
3
64
80

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 9d746e15fdb5adcb43a7518cd9743eb3

query I rowsort
SELECT + col2 + ( col2 ) AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - col1 * cor0.col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + + col0 * - cor0.col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL 48 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL - - col0 + - col2 + + col0 AS col2 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6797
SELECT + ( + 48 ) DIV col1 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6797
SELECT + ( + 48 ) / col1 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT ALL 10 AS col0 FROM tab2 AS cor0
----
10
10
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6799
SELECT DISTINCT CAST( col2 AS SIGNED ) FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6799
SELECT DISTINCT CAST ( col2 AS INTEGER ) FROM tab0
----
1
33
82

query I rowsort
SELECT 36 * - col0 * col0 AS col1 FROM tab1 AS cor0
----
-147456
-230400
-324

onlyif mysql # use DIV operator for integer division
query I rowsort label-6801
SELECT ( - col0 ) + + col0 DIV + col2 FROM tab0 AS cor0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-6801
SELECT ( - col0 ) + + col0 / + col2 FROM tab0 AS cor0
----
-24
-88
0

query I rowsort
SELECT + ( + 47 ) * col1 * + col1 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
31718
4643
7847

query I rowsort
SELECT - - 98 FROM tab0 AS cor0
----
98
98
98

query I rowsort
SELECT + - col0 + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6805
SELECT ( + col1 ) * CAST( - ( col1 ) + 65 * + 43 AS SIGNED ) FROM tab1 AS cor0
----
27850
36166
71994

skipif mysql # not compatible
query I rowsort label-6805
SELECT ( + col1 ) * CAST ( - ( col1 ) + 65 * + 43 AS INTEGER ) FROM tab1 AS cor0
----
27850
36166
71994

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col0 FROM tab2
----
7
78
79

query I rowsort
SELECT - 67 * col2 AS col2 FROM tab2 AS cor0
----
-1742
-1809
-2546

onlyif mysql # use DIV operator for integer division
query I rowsort label-6808
SELECT DISTINCT + - 46 * + col0 - col0 DIV + col0 FROM tab2 AS cor0
----
-323
-3589
-3635

skipif mysql # not compatible
query I rowsort label-6808
SELECT DISTINCT + - 46 * + col0 - col0 / + col0 FROM tab2 AS cor0
----
-323
-3589
-3635

query I rowsort
SELECT ALL - + col1 + col2 * - col1 + - 85 FROM tab1 cor0
----
-1346
-1515
-665

query I rowsort
SELECT ALL - col1 * 7 FROM tab1 AS cor0
----
-182
-70
-91

query I rowsort
SELECT - tab0.col0 * - col2 * ( col2 ) FROM tab0
----
26136
35
598436

query I rowsort
SELECT 65 FROM tab1, tab0 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT DISTINCT + + col1 - + col2 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + 75 FROM tab1, tab0 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT - + col0 * + 20 FROM tab2 cor0
----
-140
-1560
-1580

query I rowsort
SELECT - col2 * + col2 + col1 FROM tab0 cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT - CAST( 17 AS SIGNED ) + - col2 DIV col0 FROM tab1 AS cor0
----
-17
-18
-35

skipif mysql # not compatible
query I rowsort label-6817
SELECT - CAST ( 17 AS INTEGER ) + - col2 / col0 FROM tab1 AS cor0
----
-17
-18
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT col0 + - ( + col1 * - 67 ) FROM tab1 AS cor0
----
1745
734
951

query I rowsort
SELECT DISTINCT 26 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6821
SELECT + col1 * CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6821
SELECT + col1 * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6822
SELECT - col2 DIV ( 11 ) AS col0 FROM tab1
----
-4
-5
-8

skipif mysql # not compatible
query I rowsort label-6822
SELECT - col2 / ( 11 ) AS col0 FROM tab1
----
-4
-5
-8

query I rowsort
SELECT - col1 * + 0 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col0 * + col2 * col2 AS col0 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT - cor1.col1 * cor0.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
9 values hashing to 3a68b2420e96feae5e3ca1f4dd4282df

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col0 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col0 + - ( cor0.col1 ) * - col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT ALL + col2 * + col2 + col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
16896
3078
6897

query I rowsort
SELECT DISTINCT + cor0.col2 + 94 * col0 FROM tab0 AS cor0
----
2289
3291
8448

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6830
SELECT DISTINCT - + col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6830
SELECT DISTINCT - + col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6831
SELECT DISTINCT - 64 * tab0.col2 + col0 DIV tab0.col0 FROM tab0
----
-2111
-5247
-63

skipif mysql # not compatible
query I rowsort label-6831
SELECT DISTINCT - 64 * tab0.col2 + col0 / tab0.col0 FROM tab0
----
-2111
-5247
-63

query I rowsort
SELECT DISTINCT + 69 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
69

query I rowsort
SELECT - ( col0 * + col1 ) + - col2 * col0 FROM tab2
----
-406
-4345
-6630

query I rowsort
SELECT DISTINCT 24 FROM tab2, tab0 AS cor0
----
24

query I rowsort
SELECT ALL col0 * 35 FROM tab1
----
105
2240
2800

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 2afdaba7b80c700b7635230c4f8524be

query I rowsort
SELECT ALL col0 * - 90 AS col2 FROM tab0
----
-2160
-3150
-8010

query I rowsort
SELECT ALL + 46 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col1 * col0 col0 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-6840
SELECT - cor0.col1 DIV - 40 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6840
SELECT - cor0.col1 / - 40 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * 98 FROM tab0 AS cor0
----
-2352
-3430
-8722

onlyif mysql # use DIV operator for integer division
query I rowsort label-6842
SELECT cor0.col2 + col2 DIV col1 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6842
SELECT cor0.col2 + col2 / col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col2 * 20 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT col2 + - 22 FROM tab2
----
16
4
5

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab2 cor1, tab1, tab1 AS cor2
----
3645 values hashing to ca91d1f523a87017f672304548e91a77

query I rowsort
SELECT DISTINCT + 93 - col1 AS col2 FROM tab0
----
-4
2
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6847
SELECT DISTINCT - 60 DIV - ( col2 ) col1 FROM tab0
----
0
1
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6847
SELECT DISTINCT - 60 / - ( col2 ) col1 FROM tab0
----
0
1
60

query I rowsort
SELECT + ( 81 ) FROM tab0
----
81
81
81

query I rowsort
SELECT col0 + + tab1.col1 - + col0 * + col2 FROM tab1
----
-133
-3574
-7587

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * col2 + 16 col1 FROM tab1
----
2932
3265
9232

query I rowsort
SELECT DISTINCT col2 - 30 AS col2 FROM tab0
----
-29
3
52

query I rowsort
SELECT - 28 * - 58 FROM tab2
----
1624
1624
1624

query I rowsort
SELECT DISTINCT + 8 - col0 * + tab1.col0 AS col1 FROM tab1
----
-1
-4088
-6392

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 94 * + 32 - col2 col0 FROM tab1
----
2912
2951
2954

query I rowsort
SELECT - col2 + ( col2 ) * tab1.col2 + col2 AS col1 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6856
SELECT - col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6856
SELECT - col1 / - col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT col1 * - col2 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6858
SELECT - - 40 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6858
SELECT - - 40 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 0 + - col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT col0 * + col2 + 71 AS col0 FROM tab1
----
233
3719
7751

query I rowsort
SELECT - - 31 * - cor0.col0 FROM tab2 cor0
----
-217
-2418
-2449

query I rowsort
SELECT - - 31 + - col1 * ( + col2 ) FROM tab2 AS cor0
----
-1503
-615
-806

query I rowsort
SELECT DISTINCT + - col0 * col2 + 84 AS col0 FROM tab1 AS cor0
----
-3564
-7596
-78

query I rowsort
SELECT - - cor0.col2 * + col2 + + col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT DISTINCT 92 AS col0 FROM tab0 cor0
----
92

query I rowsort
SELECT ALL 85 + col0 AS col0 FROM tab1 AS cor0
----
149
165
88

query I rowsort
SELECT - col1 * cor0.col2 + ( col0 ) + col2 AS col2 FROM tab2 cor0
----
-1430
-529
-803

query I rowsort
SELECT DISTINCT - col1 + col2 * - col0 * ( col2 ) FROM tab1 AS cor0
----
-207946
-737293
-8774

onlyif mysql # use DIV operator for integer division
query I rowsort label-6869
SELECT ALL + + col2 DIV - cor0.col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6869
SELECT ALL + + col2 / - cor0.col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT - + col1 + + col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 + col2 * 76 AS col2 FROM tab1 cor0
----
4107
4396
7376

query I rowsort
SELECT - 8 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT DISTINCT + 68 + col2 AS col1 FROM tab1
----
122
125
164

query I rowsort
SELECT ALL - tab1.col1 + col2 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL - 74 + - tab1.col0 AS col0 FROM tab1
----
-138
-154
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL 82 * + col2 AS col1 FROM tab1 AS cor0
----
4428
4674
7872

query I rowsort
SELECT ALL + ( - 41 ) FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 47b9ef972839428f4f71d9f5b0944edf

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-6881
SELECT - cor0.col1 DIV - col2 - - col2 DIV - col0 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-6881
SELECT - cor0.col1 / - col2 - - col2 / - col0 FROM tab1 cor0
----
-1
-18
0

query I rowsort
SELECT + 23 AS col0 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT + col0 + ( - col2 ) * col0 AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + col1 + cor0.col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL col1 * 44 + + col0 * col2 AS col2 FROM tab1 AS cor0
----
1306
4088
8252

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - col2 * + 60 FROM tab1 AS cor0
----
-3240
-3420
-5760

query I rowsort
SELECT + + col0 * 39 FROM tab0 AS cor0
----
1365
3471
936

query I rowsort
SELECT ALL + - col0 * + 12 + cor0.col0 * + col2 + - 69 AS col0 FROM tab0 AS cor0
----
-454
435
6161

query I rowsort
SELECT DISTINCT + col2 * - 2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT - - col1 + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col2 * cor0.col2 + + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT col1 * - col1 + col2 FROM tab1 cor0
----
-43
-622
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - ( col2 ) * + col0 * col1 + + 46 col0 FROM tab2 cor0
----
-119528
-50909
-5806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6895
SELECT DISTINCT + col0 DIV + 70 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6895
SELECT DISTINCT + col0 / + 70 FROM tab1 cor0
----
0
1

query I rowsort
SELECT 20 * + col2 + + 82 FROM tab2
----
602
622
842

query I rowsort
SELECT DISTINCT - col1 + - col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT - 69 * - col2 FROM tab1
----
3726
3933
6624

query I rowsort
SELECT DISTINCT 18 + col1 AS col1 FROM tab0
----
104
109
115

query I rowsort
SELECT ALL - 74 - + tab2.col0 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to a21993c64b5f5f2357e8546d119ca05d

query I rowsort
SELECT + + col0 + col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT col0 * - col0 + + 98 AS col2 FROM tab1 AS cor0
----
-3998
-6302
89

query I rowsort
SELECT DISTINCT + col1 * col2 + cor0.col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL + - cor0.col0 + col0 - + col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 71 + + col2 AS col1 FROM tab0 AS cor0
----
104
153
72

query I rowsort
SELECT DISTINCT - col0 + - col0 + col1 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT ALL + 28 - - col0 AS col0 FROM tab0 cor0
----
117
52
63

query I rowsort
SELECT DISTINCT + col0 + + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col2 + + cor0.col0 * col0 * col1 FROM tab1 AS cor0
----
288
41017
83296

query I rowsort
SELECT ALL - cor0.col1 * cor0.col1 - col1 * 50 AS col1 FROM tab2 AS cor0
----
-1139
-2511
-6431

query I rowsort
SELECT + - cor0.col2 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + + 48 FROM tab2 AS cor0
----
48

query I rowsort
SELECT DISTINCT - ( + col1 ) - - col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL - 65 AS col1 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT + col2 + 4 AS col0 FROM tab0 AS cor0
----
37
5
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 90 col0 FROM tab2 AS cor0
----
-90
-90
-90

query I rowsort
SELECT ALL col2 * 85 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
241230
634270
8245

query I rowsort
SELECT + + 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 + + col2 col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + 55 FROM tab1 AS cor0
----
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6921
SELECT + CAST( + col1 AS SIGNED ) + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-6921
SELECT + CAST ( + col1 AS INTEGER ) + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL + col1 * - ( col1 * + 37 ) FROM tab2 AS cor0
----
-10693
-128797
-35557

query I rowsort
SELECT ( + 94 ) * col0 AS col0 FROM tab1 cor0
----
282
6016
7520

query I rowsort
SELECT ALL ( - col0 ) * col0 AS col1 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + + 28 FROM tab0 AS cor0
----
28

query I rowsort
SELECT - 42 + tab2.col0 - + col2 FROM tab2
----
-1
-62
10

query I rowsort
SELECT ALL + - col1 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + 30 + col2 FROM tab0 AS cor0
----
-29
3
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6929
SELECT ALL - col1 DIV col1 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6929
SELECT ALL - col1 / col1 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col2 * + col2 + 24 FROM tab1 AS cor0
----
-2892
-3225
-9192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 23 + - col1 * cor0.col2 col0 FROM tab0 AS cor0
----
-2815
-74
-7439

query I rowsort
SELECT DISTINCT - + col1 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - tab2.col2 + - 4 AS col0 FROM tab2
----
-30
-31
-42

query I rowsort
SELECT DISTINCT + 98 * - tab0.col2 - col2 FROM tab0
----
-3267
-8118
-99

query I rowsort
SELECT 91 * ( - cor0.col1 ) FROM tab1, tab0 AS cor0
----
9 values hashing to a77725e3def29fc968577fc9f01effc2

query I rowsort
SELECT col0 + - col2 * col1 AS col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - cor0.col1 + ( 5 ) AS col1 FROM tab0 AS cor0
----
-81
-86
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6938
SELECT - CAST( NULL AS SIGNED ) * - col1 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6938
SELECT - CAST ( NULL AS INTEGER ) * - col1 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + 12 * - col0 AS col0 FROM tab2 AS cor0
----
-115
-965
-995

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col0 + col0 * col2 col1 FROM tab1 AS cor0
----
14080
171
7744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - 32 ) col2 FROM tab1 AS cor0
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + tab2.col2 col1 FROM tab2
----
55
58
85

query I rowsort
SELECT + 83 + col1 AS col1 FROM tab2 AS cor0
----
100
114
142

query I rowsort
SELECT 21 AS col1 FROM tab2 AS cor0
----
21
21
21

query I rowsort
SELECT - 13 + - col2 AS col2 FROM tab2 AS cor0
----
-39
-40
-51

query I rowsort
SELECT DISTINCT - 99 AS col0 FROM tab1 AS cor0
----
-99

query I rowsort
SELECT ALL - col1 + + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL + + 82 FROM tab0 AS cor0
----
82
82
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6949
SELECT col0 * col0 + - CAST( col1 AS SIGNED ) * - col2 FROM tab1 cor0
----
1413
4666
7648

skipif mysql # not compatible
query I rowsort label-6949
SELECT col0 * col0 + - CAST ( col1 AS INTEGER ) * - col2 FROM tab1 cor0
----
1413
4666
7648

query I rowsort
SELECT 37 * + 55 FROM tab2
----
2035
2035
2035

query I rowsort
SELECT + col0 + + 47 + + col2 FROM tab1
----
104
168
223

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6952
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + col1 + col0 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6952
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + col1 + col0 AS col0 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT 43 FROM tab1, tab1 AS cor0
----
43

query I rowsort
SELECT DISTINCT col2 + + 25 FROM tab0
----
107
26
58

query I rowsort
SELECT DISTINCT ( - ( + col2 ) ) * col1 * 3 + col2 FROM tab0
----
-22304
-290
-8481

query I rowsort
SELECT cor0.col2 + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col2 + - cor0.col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT col0 * tab2.col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col0 * ( + col2 ) + col0 AS col1 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT - - col1 * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - cor0.col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - 80 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 26dbcc98d4b4e864ffa31be685a5dfbd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col2 ) + + col2 col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + tab1.col2 FROM tab1, tab1 AS cor0, tab0, tab2 cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT ALL col1 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6966
SELECT ALL - col1 - CAST( NULL AS SIGNED ) * 71 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6966
SELECT ALL - col1 - CAST ( NULL AS INTEGER ) * 71 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col0 + - col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6968
SELECT DISTINCT - + col2 * - CAST( 4 AS SIGNED ) * - col1 AS col1 FROM tab2 AS cor0
----
-2584
-3348
-6136

skipif mysql # not compatible
query I rowsort label-6968
SELECT DISTINCT - + col2 * - CAST ( 4 AS INTEGER ) * - col1 AS col1 FROM tab2 AS cor0
----
-2584
-3348
-6136

query I rowsort
SELECT DISTINCT + - col1 * + 32 AS col2 FROM tab0 cor0
----
-2752
-2912
-3104

query I rowsort
SELECT + 88 * - col2 FROM tab0
----
-2904
-7216
-88

query I rowsort
SELECT ALL + col0 * 74 FROM tab1 AS cor0
----
222
4736
5920

query I rowsort
SELECT - col2 + - 18 AS col0 FROM tab0 AS cor0
----
-100
-19
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6973
SELECT - col1 + + col2 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
-85
-91
-97

skipif mysql # not compatible
query I rowsort label-6973
SELECT - col1 + + col2 / cor0.col0 AS col2 FROM tab0 AS cor0
----
-85
-91
-97

query I rowsort
SELECT col2 + 84 * - 75 + col0 FROM tab1 AS cor0
----
-6124
-6179
-6243

query I rowsort
SELECT ALL - - col1 + + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6976
SELECT ALL 21 DIV + col1 AS col1 FROM tab1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6976
SELECT ALL 21 / + col1 AS col1 FROM tab1
----
0
1
2

query I rowsort
SELECT DISTINCT + col0 * - col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT col1 + - col2 AS col1 FROM tab1
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6979
SELECT tab0.col1 DIV - tab0.col1 + col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-6979
SELECT tab0.col1 / - tab0.col1 + col1 FROM tab0
----
85
90
96

query I rowsort
SELECT cor0.col0 * + col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + cor0.col2 * + ( + 40 ) FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 26e45cd9fe71a2b90a8bdef20c88e70d

query I rowsort
SELECT ( tab0.col0 * col0 + col2 ) AS col2 FROM tab0
----
1226
609
8003

query I rowsort
SELECT cor1.col2 * - 6 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 6c831792e43e43dff996e9b406056291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 32 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT + + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ( + col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 * - 26 + + cor0.col1 * - col2 AS col2 FROM tab0 cor0
----
-2214
-5148
813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6989
SELECT col0 + col1 - CAST( - 9 * col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1005
884
999

skipif mysql # not compatible
query I rowsort label-6989
SELECT col0 + col1 - CAST ( - 9 * col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1005
884
999

onlyif mysql # use DIV operator for integer division
query I rowsort label-6990
SELECT + - col2 * + col0 - - ( col1 ) DIV - col0 AS col1 FROM tab1 cor0
----
-170
-3648
-7680

skipif mysql # not compatible
query I rowsort label-6990
SELECT + - col2 * + col0 - - ( col1 ) / - col0 AS col1 FROM tab1 cor0
----
-170
-3648
-7680

query I rowsort
SELECT - col1 + col0 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT - 80 * col1 * + col0 - ( + col2 ) AS col0 FROM tab2
----
-107478
-17387
-368186

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6993
SELECT + col0 * col1 * CAST( col1 AS SIGNED ) + - col1 + 18 AS col0 FROM tab0 cor0
----
177436
329236
736936

skipif mysql # not compatible
query I rowsort label-6993
SELECT + col0 * col1 * CAST ( col1 AS INTEGER ) + - col1 + 18 AS col0 FROM tab0 cor0
----
177436
329236
736936

query I rowsort
SELECT + ( + col1 ) * col2 + + ( 20 ) FROM tab1 AS cor0
----
1268
1424
590

query I rowsort
SELECT DISTINCT + col0 * 62 FROM tab2 cor0
----
434
4836
4898

query I rowsort
SELECT + - ( + col1 ) * + cor0.col2 + + 4 FROM tab0 AS cor0
----
-2834
-7458
-93

query I rowsort
SELECT ALL + - cor0.col2 * - 54 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
151
1868
4519

query I rowsort
SELECT + col0 * 20 + col2 AS col2 FROM tab2 AS cor0
----
1586
1618
167

query I rowsort
SELECT DISTINCT col0 * col2 + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( 7 ) + + cor0.col2 col2 FROM tab2 AS cor0
----
33
34
45

query I rowsort
SELECT col2 + + 61 AS col0 FROM tab0 cor0
----
143
62
94

query I rowsort
SELECT DISTINCT ( - tab0.col1 ) * - tab0.col0 + col2 FROM tab0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 * col1 + - col0 col2 FROM tab0 AS cor0
----
6856
7191
7725

query I rowsort
SELECT ALL 14 AS col2 FROM tab2 AS cor0
----
14
14
14

query I rowsort
SELECT + + 85 - col0 FROM tab1 AS cor0
----
21
5
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7006
SELECT - CAST( col1 AS SIGNED ) DIV - col1 - col0 * cor0.col2 FROM tab0 AS cor0
----
-34
-7297
-791

skipif mysql # not compatible
query I rowsort label-7006
SELECT - CAST ( col1 AS INTEGER ) / - col1 - col0 * cor0.col2 FROM tab0 AS cor0
----
-34
-7297
-791

onlyif mysql # use DIV operator for integer division
query I rowsort label-7007
SELECT DISTINCT - col1 DIV cor0.col2 + - col2 FROM tab0 AS cor0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-7007
SELECT DISTINCT - col1 / cor0.col2 + - col2 FROM tab0 AS cor0
----
-35
-83
-98

query I rowsort
SELECT DISTINCT 77 * col1 - - col1 * + 80 AS col1 FROM tab1 AS cor0
----
1570
2041
4082

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7009
SELECT ALL - CAST( NULL AS DECIMAL ) + + cor0.col0 / + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7009
SELECT ALL - CAST ( NULL AS REAL ) + + cor0.col0 / + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 * col0 * + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-114155
-5110
-52806

query I rowsort
SELECT DISTINCT - - col0 + + cor0.col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL col2 * col1 + - col0 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL - 36 * col1 + col0 FROM tab1 AS cor0
----
-296
-388
-933

query I rowsort
SELECT DISTINCT + - col2 * - col0 - col2 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT - 49 AS col1 FROM tab2 AS cor0
----
-49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7016
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 1 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7016
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 1 AS col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 98 * 47 * - col1 + - ( col1 * col2 ) col2 FROM tab0 AS cor0
----
-398954
-426608
-446879

query I rowsort
SELECT DISTINCT col2 * + col2 + - ( col2 ) * + col1 + col0 AS col2 FROM tab2 AS cor0
----
-101
-780
877

query I rowsort
SELECT + + 6 + col1 * - col0 + - col1 AS col2 FROM tab1 cor0
----
-1047
-644
-98

query I rowsort
SELECT ALL - - 68 * col2 + - col1 AS col0 FROM tab0 AS cor0
----
-29
2158
5485

query I rowsort
SELECT - col1 * - col0 + 0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col2 + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT - col2 + - col1 * - col1 AS col0 FROM tab2 cor0
----
251
3455
934

query I rowsort
SELECT ( - col0 ) + col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + - col2 - col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT - col1 * col2 + ( col2 ) + + col0 AS col0 FROM tab0 AS cor0
----
-2781
-61
-7291

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7027
SELECT DISTINCT + ( + col2 ) * CAST( + col2 AS SIGNED ) FROM tab0 cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-7027
SELECT DISTINCT + ( + col2 ) * CAST ( + col2 AS INTEGER ) FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL 58 + + 28 FROM tab0
----
86
86
86

query I rowsort
SELECT DISTINCT col1 * - col2 * + col0 + 79 * col0 FROM tab0
----
-630
-657087
-66216

query I rowsort
SELECT ALL + col0 * 99 AS col1 FROM tab1 AS cor0
----
297
6336
7920

query I rowsort
SELECT DISTINCT col2 + 26 AS col1 FROM tab2 AS cor0
----
52
53
64

query I rowsort
SELECT col2 * 70 AS col2 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT + 37 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT DISTINCT col1 - - col2 AS col1 FROM tab1
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7035
SELECT col2 * CAST( ( - col1 ) AS SIGNED ) AS col1 FROM tab2
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-7035
SELECT col2 * CAST ( ( - col1 ) AS INTEGER ) AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT 1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT col0 + + 48 * col1 - + col0 AS col2 FROM tab1
----
1248
480
624

query I rowsort
SELECT DISTINCT col2 - - ( + 99 + col2 ) FROM tab2
----
151
153
175

query I rowsort
SELECT ALL + col1 * - ( + 66 ) - col2 FROM tab2
----
-1160
-2073
-3920

onlyif mysql # use DIV operator for integer division
query I rowsort label-7040
SELECT + col2 DIV - ( + ( + col0 ) ) AS col1 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7040
SELECT + col2 / - ( + ( + col0 ) ) AS col1 FROM tab0
----
-1
0
0

query I rowsort
SELECT ALL col2 * tab1.col0 - tab1.col2 AS col1 FROM tab1
----
108
3591
7584

query I rowsort
SELECT DISTINCT col1 * 61 * col2 - - col1 FROM tab0
----
173204
455273
6014

onlyif mysql # use DIV operator for integer division
query I rowsort label-7043
SELECT DISTINCT - col0 DIV - ( - col1 ) - col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7043
SELECT DISTINCT - col0 / - ( - col1 ) - col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT col1 - 74 * + col0 FROM tab0
----
-1690
-2493
-6495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - 82 col0 FROM tab1
----
-18
-2
-79

query I rowsort
SELECT DISTINCT col0 + + col0 * col2 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT 75 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT - + cor0.col2 - + 69 AS col0 FROM tab0 cor0
----
-102
-151
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7049
SELECT cor0.col2 DIV 50 AS col2 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7049
SELECT cor0.col2 / 50 AS col2 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT - tab2.col2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + 50 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT + col1 + 62 FROM tab2
----
121
79
93

query I rowsort
SELECT ALL + 79 + - col1 AS col2 FROM tab1
----
53
66
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col0 * col2 col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT - cor1.col0 * + cor1.col1 + cor0.col1 FROM tab2, tab2 AS cor0, tab1 cor1
----
9 values hashing to 774cc4c4b3a3818c3927615362490898

query I rowsort
SELECT - ( + 84 ) * col2 FROM tab0 cor0
----
-2772
-6888
-84

query I rowsort
SELECT col1 * 44 FROM tab0 AS cor0
----
3784
4004
4268

query I rowsort
SELECT ALL + 1 + - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT - - 53 - col2 * col0 * + col0 AS col0 FROM tab1 cor0
----
-233419
-433
-614347

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT 63 * - col1 AS col0 FROM tab1
----
-1638
-630
-819

onlyif mysql # use DIV operator for integer division
query I rowsort label-7062
SELECT - col1 * col0 DIV - col1 + ( col1 ) FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-7062
SELECT - col1 * col0 / - col1 + ( col1 ) FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 17 col0 FROM tab0
----
17
17
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 75 + + col1 col2 FROM tab0 AS cor0
----
11
16
22

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2, tab2 cor0, tab2 cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7066
SELECT ALL - col1 DIV ( - 23 ) AS col0 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7066
SELECT ALL - col1 / ( - 23 ) AS col0 FROM tab2 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 8 col0 FROM tab0 AS cor0
----
-688
-728
-776

query I rowsort
SELECT DISTINCT + cor0.col0 * 51 AS col0 FROM tab1 AS cor0
----
153
3264
4080

query I rowsort
SELECT ALL + col2 * col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort
SELECT + - col1 + CAST ( col0 AS REAL ) AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + + col1 * 60 FROM tab2 AS cor0
----
1020
1860
3540

query I rowsort
SELECT + col2 * - col0 + - col0 FROM tab1
----
-165
-3712
-7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * ( col1 * col0 ) col2 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7075
SELECT ALL + + col2 * CAST( NULL AS DECIMAL ) + col2 + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7075
SELECT ALL + + col2 * CAST ( NULL AS REAL ) + col2 + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * + ( - col2 ) col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7077
SELECT + col0 * cor0.col1 DIV - col2 AS col1 FROM tab0 AS cor0
----
-3395
-62
-98

skipif mysql # not compatible
query I rowsort label-7077
SELECT + col0 * cor0.col1 / - col2 AS col1 FROM tab0 AS cor0
----
-3395
-62
-98

query I rowsort
SELECT ALL - ( col2 ) * - col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT col0 * 83 FROM tab2
----
581
6474
6557

query I rowsort
SELECT ALL - - 44 + 52 AS col0 FROM tab2 AS cor0
----
96
96
96

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 46 AS REAL ) FROM tab0 cor0
----
46
46
46

query I rowsort
SELECT DISTINCT 90 AS col0 FROM tab1
----
90

query I rowsort
SELECT + ( 3 ) FROM tab2
----
3
3
3

query I rowsort
SELECT ( - 7 ) AS col0 FROM tab2
----
-7
-7
-7

query I rowsort
SELECT + 48 * col2 FROM tab0 AS cor0
----
1584
3936
48

query I rowsort
SELECT - col2 + + col0 * col1 * cor0.col1 + - col1 AS col2 FROM tab0 AS cor0
----
177385
329217
736836

query I rowsort
SELECT - ( 1 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT ALL 63 * - col0 AS col0 FROM tab0 cor0
----
-1512
-2205
-5607

query I rowsort
SELECT col2 * - col0 * + col0 + - col2 FROM tab0 AS cor0
----
-1226
-19041
-649604

query I rowsort
SELECT - 64 AS col0 FROM tab2 AS cor0
----
-64
-64
-64

query I rowsort
SELECT + - col2 * + col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7092
SELECT DISTINCT - col1 * CAST( NULL AS SIGNED ) + - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7092
SELECT DISTINCT - col1 * CAST ( NULL AS INTEGER ) + - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + + col2 + + 27 FROM tab2 AS cor0
----
53
54
65

query I rowsort
SELECT col1 * - cor0.col0 * + col2 + col2 FROM tab1 AS cor0
----
-36423
-4158
-99744

query I rowsort
SELECT ALL + col1 * 89 + col1 FROM tab1 AS cor0
----
1170
2340
900

query I rowsort
SELECT - + cor0.col1 * + ( - col1 ) FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL + col2 * + 10 + ( + cor0.col0 * - cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-1768
-2622
81

query I rowsort
SELECT col2 + + col0 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col2 - col0 AS col0 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT ALL - - col2 + ( - cor0.col0 ) * - col2 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-7101
SELECT + - col0 DIV 4 - col1 FROM tab2 AS cor0
----
-32
-36
-78

skipif mysql # not compatible
query I rowsort label-7101
SELECT + - col0 / 4 - col1 FROM tab2 AS cor0
----
-32
-36
-78

query I rowsort
SELECT cor0.col2 * + 85 FROM tab1 cor0
----
4590
4845
8160

query I rowsort
SELECT - + col2 * 20 + - col0 AS col2 FROM tab2 AS cor0
----
-547
-598
-839

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7104
SELECT + CAST( NULL AS SIGNED ) + 79 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-7104
SELECT + CAST ( NULL AS INTEGER ) + 79 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7105
SELECT + col2 DIV ( + 65 ) FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7105
SELECT + col2 / ( + 65 ) FROM tab1
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * tab2.col2 + tab2.col2 col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT + + cor0.col0 - 35 FROM tab1 cor0
----
-32
29
45

query I rowsort
SELECT 80 + + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1009
-6644
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7109
SELECT + ( + 55 ) DIV + col2 + 29 * + col0 * col0 AS col0 FROM tab1 cor0
----
118784
185600
262

skipif mysql # not compatible
query I rowsort label-7109
SELECT + ( + 55 ) / + col2 + 29 * + col0 * col0 AS col0 FROM tab1 cor0
----
118784
185600
262

query I rowsort
SELECT + + col1 * - col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - cor0.col0 + + col2 + - col2 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7112
SELECT + col2 * col1 * col2 - + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7112
SELECT + col2 * col1 * col2 - + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col2 - + col2 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT - cor0.col2 + cor0.col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - + 61 + + 15 FROM tab0 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL - 30 * col0 FROM tab2 AS cor0
----
-210
-2340
-2370

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 * + col1 - - col1 col1 FROM tab2 AS cor0
----
1326
2418
4602

query I rowsort
SELECT ALL col1 * + ( col2 ) AS col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + ( - cor0.col1 ) * col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7120
SELECT ALL CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7120
SELECT ALL CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col1 * - col1 + cor0.col2 + - 94 AS col2 FROM tab1 AS cor0
----
171
63
636

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 1 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - 88 * cor0.col2 FROM tab1 AS cor0
----
-4752
-5016
-8448

query I rowsort
SELECT ALL + 24 * col1 AS col0 FROM tab0 AS cor0
----
2064
2184
2328

onlyif mysql # use DIV operator for integer division
query I rowsort label-7126
SELECT DISTINCT - col2 * - col0 + + col1 DIV cor0.col1 FROM tab2 AS cor0
----
190
2029
3003

skipif mysql # not compatible
query I rowsort label-7126
SELECT DISTINCT - col2 * - col0 + + col1 / cor0.col1 FROM tab2 AS cor0
----
190
2029
3003

query I rowsort
SELECT - 16 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
81 values hashing to 6a726f8493b62c5d4e1dd657007160c3

query I rowsort
SELECT cor0.col1 * 64 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to be56c593f30c9e7cba2a929d877750e7

query I rowsort
SELECT ALL col0 - - 77 * col1 AS col0 FROM tab2
----
1388
2394
4621

query I rowsort
SELECT ALL 97 FROM tab1
----
97
97
97

query I rowsort
SELECT + cor0.col0 * ( col2 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col2 * + 55 FROM tab1
----
-2970
-3135
-5280

query I rowsort
SELECT + col0 * 75 FROM tab2 cor0
----
525
5850
5925

query I rowsort
SELECT ALL 78 AS col1 FROM tab1, tab1 cor0, tab0 cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7135
SELECT - - cor0.col2 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7135
SELECT - - cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + ( col1 + col2 * + col1 ) FROM tab2 AS cor0
----
23436
25194
41418

query I rowsort
SELECT - - col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 11 * - 93 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ea76dde9164e84e01638b7187c28848a

query I rowsort
SELECT ALL 94 * - cor0.col1 + + col1 AS col1 FROM tab0 AS cor0
----
-7998
-8463
-9021

query I rowsort
SELECT + 12 AS col0 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT ALL + - cor0.col2 * cor0.col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 43 + col2 col1 FROM tab1 AS cor0
----
100
139
97

query I rowsort
SELECT ALL + + ( - col2 ) * + col0 + col0 * col2 + col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + - col0 * - col1 + 46 - + col0 AS col0 FROM tab2 AS cor0
----
1310
256
4570

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 AS col0 FROM tab2 cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col0 - + 70 col2 FROM tab1 AS cor0
----
-4166
-6470
-79

query I rowsort
SELECT DISTINCT 11 AS col1 FROM tab2 AS cor0
----
11

query I rowsort
SELECT DISTINCT + 59 + + col0 AS col2 FROM tab2 AS cor0
----
137
138
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-7149
SELECT + col0 * - col1 DIV - col1 AS col0 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7149
SELECT + col0 * - col1 / - col1 AS col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + 1 AS col0 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7151
SELECT DISTINCT + cor0.col0 DIV 98 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7151
SELECT DISTINCT + cor0.col0 / 98 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + col0 * col0 + cor0.col1 AS col1 FROM tab0 AS cor0
----
1322
662
8012

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

onlyif mysql # use DIV operator for integer division
query I rowsort label-7154
SELECT DISTINCT col0 DIV - col0 + cor0.col2 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-7154
SELECT DISTINCT col0 / - col0 + cor0.col2 AS col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL + 33 * - ( + col2 ) AS col2 FROM tab2 cor0
----
-1254
-858
-891

query I rowsort
SELECT ALL 20 + - 48 AS col1 FROM tab0 AS cor0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col0 + 55 ) col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 155b397adecdafdd0a7d3f4fc2adf6a5

query I rowsort
SELECT DISTINCT col0 * - cor0.col2 - col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT - col2 * - col2 - col2 AS col2 FROM tab1 AS cor0
----
2862
3192
9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col0 + + cor0.col2 col1 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7161
SELECT ALL + cor0.col1 DIV + col1 + ( - col2 ) AS col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-7161
SELECT ALL + cor0.col1 / + col1 + ( - col2 ) AS col1 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - 30 * + col0 FROM tab2 AS cor0
----
-210
-2340
-2370

query I rowsort
SELECT DISTINCT + ( col1 ) AS col0 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL + + col2 * - col2 - ( - 48 + col0 ) * + 30 FROM tab2 AS cor0
----
-1576
-2374
501

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7165
SELECT ALL 53 * col0 + CAST( + col0 AS SIGNED ) * + cor0.col2 FROM tab2 AS cor0
----
560
6162
7189

skipif mysql # not compatible
query I rowsort label-7165
SELECT ALL 53 * col0 + CAST ( + col0 AS INTEGER ) * + cor0.col2 FROM tab2 AS cor0
----
560
6162
7189

query I rowsort
SELECT + col0 + col2 * cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - 9 + - col0 FROM tab2 AS cor0
----
-16
-87
-88

query I rowsort
SELECT DISTINCT + ( col1 ) - col0 AS col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT DISTINCT + 27 * col1 AS col2 FROM tab0 AS cor0
----
2322
2457
2619

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + 38 + - 51 FROM tab0
----
-13
-13
-13

query I rowsort
SELECT ALL - 78 FROM tab2
----
-78
-78
-78

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) FROM tab1
----
3
64
80

query I rowsort
SELECT tab0.col0 + - col0 * col2 * - col1 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT + 82 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
243 values hashing to f31a8ab881ea414a64db3cbb3dee97bc

query I rowsort
SELECT - - 74 FROM tab1 cor0
----
74
74
74

query I rowsort
SELECT ALL + 57 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT DISTINCT + 95 + col2 FROM tab1 AS cor0
----
149
152
191

query I rowsort
SELECT ALL + cor0.col1 * tab0.col2 AS col1 FROM tab0, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 2e57e4b12842f2ed2947ccb372f0c23b

query I rowsort
SELECT - 97 - - col2 FROM tab0
----
-15
-64
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 col2 FROM tab0
----
24
35
89

query I rowsort
SELECT + col0 * + tab0.col2 + col2 AS col1 FROM tab0
----
36
7380
825

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-7184
SELECT DISTINCT col0 * + col0 + + col1 DIV col2 FROM tab1
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-7184
SELECT DISTINCT col0 * + col0 + + col1 / col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col0 + 22 FROM tab1
----
102
25
86

query I rowsort
SELECT ALL - col2 + 3 + col2 FROM tab2
----
3
3
3

query I rowsort
SELECT - col0 + - ( tab2.col2 ) FROM tab2
----
-104
-117
-34

query I rowsort
SELECT ALL col1 + 70 + - col0 * + tab0.col2 FROM tab0
----
-636
-7137
132

query I rowsort
SELECT ALL + cor0.col1 * col0 + + col1 * col0 * ( - col0 ) FROM tab2 cor0
----
-104754
-1302
-354354

query I rowsort
SELECT DISTINCT - col0 * 78 AS col2 FROM tab2 AS cor0
----
-546
-6084
-6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col2 col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + + col2 * 16 AS col2 FROM tab0 AS cor0
----
1312
16
528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 + col1 col1 FROM tab1 AS cor0
----
109
93
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7194
SELECT - col2 - - CAST( col0 AS SIGNED ) AS col1 FROM tab0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-7194
SELECT - col2 - - CAST ( col0 AS INTEGER ) AS col1 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7195
SELECT ALL - col2 DIV col2 + col1 * - col2 FROM tab0
----
-2839
-7463
-98

skipif mysql # not compatible
query I rowsort label-7195
SELECT ALL - col2 / col2 + col1 * - col2 FROM tab0
----
-2839
-7463
-98

query I rowsort
SELECT - col1 * ( + col2 ) + col2 * ( 28 ) - + col0 * col0 FROM tab0
----
-1294
-13087
-2490

onlyif mysql # use DIV operator for integer division
query I rowsort label-7197
SELECT ALL col1 DIV col0 + - col1 + col0 FROM tab0
----
-1
-59
-60

skipif mysql # not compatible
query I rowsort label-7197
SELECT ALL col1 / col0 + - col1 + col0 FROM tab0
----
-1
-59
-60

query I rowsort
SELECT - cor0.col0 * col0 * + col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT + ( + col2 ) * col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 28 AS col1 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT ALL 40 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7202
SELECT ALL - CAST( + col1 AS SIGNED ) FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-7202
SELECT ALL - CAST ( + col1 AS INTEGER ) FROM tab1
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7204
SELECT + col0 + - col2 DIV col0 FROM tab0 AS cor0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-7204
SELECT + col0 + - col2 / col0 FROM tab0 AS cor0
----
23
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7205
SELECT + col2 DIV + 16 FROM tab0 AS cor0
----
0
2
5

skipif mysql # not compatible
query I rowsort label-7205
SELECT + col2 / + 16 FROM tab0 AS cor0
----
0
2
5

query I rowsort
SELECT ALL - col1 + 91 * - col1 AS col2 FROM tab0 AS cor0
----
-7912
-8372
-8924

onlyif mysql # use DIV operator for integer division
query I rowsort label-7207
SELECT + ( 72 ) DIV + cor0.col1 AS col2 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-7207
SELECT + ( 72 ) / + cor0.col1 AS col2 FROM tab2 AS cor0
----
1
2
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col2 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + + ( 59 ) FROM tab1 AS cor0
----
59
59
59

query I rowsort
SELECT + + 16 + ( col1 ) * + cor0.col2 FROM tab1 AS cor0
----
1264
1420
586

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7211
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7211
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - ( 94 ) FROM tab0 AS cor0
----
-94
-94
-94

query I rowsort
SELECT - + col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-7214
SELECT ALL - 96 DIV col2 FROM tab0 AS cor0
----
-1
-2
-96

skipif mysql # not compatible
query I rowsort label-7214
SELECT ALL - 96 / col2 FROM tab0 AS cor0
----
-1
-2
-96

query I rowsort
SELECT + col2 * - col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT + 44 AS col1 FROM tab0 AS cor0
----
44

query I rowsort
SELECT + col1 + cor0.col0 FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 + - cor0.col0 * cor0.col1 col0 FROM tab0 AS cor0
----
-2048
-3379
-8083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7219
SELECT - - CAST( NULL AS SIGNED ) * - 91 + + col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7219
SELECT - - CAST ( NULL AS INTEGER ) * - 91 + + col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 70 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2, tab0 cor3
----
3645 values hashing to 0705df526be8eeded96d0c20ae938712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) * col0 * 48 col0 FROM tab2
----
-2352
-292032
-299568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( tab2.col2 ) col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - 52 FROM tab2
----
-52
-52
-52

query I rowsort
SELECT - 50 + + col1 - col0 FROM tab0
----
-48
12
12

query I rowsort
SELECT col1 * col1 + - col0 * + col1 * - 76 AS col2 FROM tab2
----
102357
17453
353233

query I rowsort
SELECT DISTINCT - tab2.col0 * tab2.col0 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL + 43 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( tab0.col1 ) col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT 91 AS col2 FROM tab1
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 10 col2 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
10

query I rowsort
SELECT ALL - 71 * + col1 AS col2 FROM tab2 AS cor0
----
-1207
-2201
-4189

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7233
SELECT DISTINCT - cor0.col1 * + col1 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7233
SELECT DISTINCT - cor0.col1 * + col1 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7234
SELECT ALL tab0.col1 DIV col2 AS col0 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-7234
SELECT ALL tab0.col1 / col2 AS col0 FROM tab0
----
1
2
97

query I rowsort
SELECT ALL + col1 * 4 FROM tab0 AS cor0
----
344
364
388

query I rowsort
SELECT DISTINCT - col1 * 2 + + col0 FROM tab1 AS cor0
----
-49
44
54

query I rowsort
SELECT - col0 * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col0 * - ( - 93 ) FROM tab1 cor0
----
-279
-5952
-7440

query I rowsort
SELECT + 80 FROM tab0, tab1 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT + col0 + cor0.col0 * + ( col1 * ( cor0.col2 ) ) FROM tab2 AS cor0
----
119730
51113
5866

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7241
SELECT + col1 - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7241
SELECT + col1 - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * ( - 45 ) AS col2 FROM tab1
----
-2430
-2565
-4320

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab0 AS cor0, tab1 AS cor1
----
972 values hashing to 82e15d5967b272804e574774895a0222

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - - cor0.col0 * 57 + col2 AS col0 FROM tab0 cor0
----
1401
1996
5155

query I rowsort
SELECT ALL + 49 * cor0.col0 FROM tab1 AS cor0
----
147
3136
3920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 * cor0.col1 col0 FROM tab1 AS cor0
----
-1274
-490
-637

query I rowsort
SELECT + - ( 43 ) - + col2 FROM tab0 AS cor0
----
-125
-44
-76

query I rowsort
SELECT DISTINCT + ( + 33 ) AS col0 FROM tab0 AS cor0
----
33

query I rowsort
SELECT ALL - cor0.col1 + + col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * 0 * col0 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 86 * 71 + + col2 AS col0 FROM tab0 AS cor0
----
6107
6139
6188

query I rowsort
SELECT DISTINCT + + 78 + - col0 * col2 FROM tab2 cor0
----
-111
-1950
-2924

onlyif mysql # use DIV operator for integer division
query I rowsort label-7254
SELECT - col2 DIV + col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7254
SELECT - col2 / + col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT col0 * + 93 FROM tab1 AS cor0
----
279
5952
7440

query I rowsort
SELECT ALL + + ( - col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7257
SELECT ALL - CAST( + 19 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
35
38
77

skipif mysql # not compatible
query I rowsort label-7257
SELECT ALL - CAST ( + 19 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
35
38
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7258
SELECT + + col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7258
SELECT + + col0 / + col2 AS col1 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7259
SELECT ALL - CAST( col1 AS SIGNED ) * - col1 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-7259
SELECT ALL - CAST ( col1 AS INTEGER ) * - col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT ( 31 ) FROM tab2 cor0
----
31

query I rowsort
SELECT col2 * col2 + col2 * col1 AS col0 FROM tab2 AS cor0
----
1566
2090
2210

query I rowsort
SELECT - cor0.col0 + - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + ( + col1 ) + + 28 FROM tab2 AS cor0
----
45
59
87

query I rowsort
SELECT 84 * - col1 - 10 FROM tab1
----
-1102
-2194
-850

query I rowsort
SELECT - col1 * + col2 + ( col2 ) AS col0 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT + + ( col2 ) + - cor0.col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 2 + + cor0.col0 FROM tab0 AS cor0
----
26
37
91

query I rowsort
SELECT ALL + col2 - + col0 * - col1 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL - 27 + + col2 FROM tab2 AS cor0
----
-1
0
11

query I rowsort
SELECT DISTINCT col0 + - col2 + ( - col1 ) AS col1 FROM tab2 AS cor0
----
-51
-7
24

query I rowsort
SELECT ALL - cor0.col1 * ( - col0 ) * + col2 - - col0 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT ALL + col0 * 99 AS col2 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT DISTINCT - col0 + - col0 * 34 FROM tab0 AS cor0
----
-1225
-3115
-840

query I rowsort
SELECT DISTINCT + col1 - + cor0.col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7275
SELECT CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7275
SELECT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + - 21 FROM tab1 AS cor0
----
-21

onlyif mysql # use DIV operator for integer division
query I rowsort label-7277
SELECT cor0.col2 DIV col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7277
SELECT cor0.col2 / col1 FROM tab2 AS cor0
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7278
SELECT DISTINCT - - 6 + col1 DIV ( + col2 ) AS col2 FROM tab1 AS cor0
----
6

skipif mysql # not compatible
query I rowsort label-7278
SELECT DISTINCT - - 6 + col1 / ( + col2 ) AS col2 FROM tab1 AS cor0
----
6

query I rowsort
SELECT - 98 - + col0 * + tab1.col2 FROM tab1
----
-260
-3746
-7778

query I rowsort
SELECT DISTINCT tab1.col0 * col1 * + col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT 40 * col0 AS col0 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 18 FROM tab2 AS cor0
----
18

query I rowsort
SELECT - - 22 AS col0 FROM tab2 cor0
----
22
22
22

query I rowsort
SELECT ALL 11 * col2 AS col0 FROM tab2 AS cor0
----
286
297
418

query I rowsort
SELECT + - col1 + - col2 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL 74 AS col0 FROM tab1 AS cor0
----
74
74
74

query I rowsort
SELECT ALL 94 FROM tab0, tab0 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1, tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7290
SELECT ALL + col1 DIV - ( + tab2.col0 ) col0 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7290
SELECT ALL + col1 / - ( + tab2.col0 ) col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT ALL - 33 * tab2.col0 AS col2 FROM tab2
----
-231
-2574
-2607

query I rowsort
SELECT ALL - ( - cor0.col0 ) * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 4 * - col0 FROM tab2 AS cor0
----
-28
-312
-316

query I rowsort
SELECT DISTINCT + col1 * + col1 * - col0 FROM tab1 cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT - ( - col0 ) * - col0 + + col1 AS col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT - + col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + col2 + - col1 * 18 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-24136
-3879
-82810

query I rowsort
SELECT ALL - ( col0 ) - - cor0.col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + - 96 + + col1 FROM tab1 AS cor0
----
-70
-83
-86

query I rowsort
SELECT - 84 * col0 AS col0 FROM tab1 AS cor0
----
-252
-5376
-6720

query I rowsort
SELECT DISTINCT + - ( col0 ) * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col1 * 56 + tab1.col2 FROM tab1
----
-1402
-503
-632

query I rowsort
SELECT col2 + col0 * - col0 AS col1 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT ALL + col0 * ( ( col1 ) * - col0 ) + + col0 FROM tab1
----
-231
-40896
-83120

query I rowsort
SELECT ALL col2 + col2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT ALL - - col0 + 18 AS col0 FROM tab0 AS cor0
----
107
42
53

query I rowsort
SELECT + - col2 + col0 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT col1 * ( ( cor0.col0 ) ) FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7309
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-7309
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to 2507aa9f48c3db94de9fec065edf3731

query I rowsort
SELECT + col1 * + cor0.col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + cor0.col1 * col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - + 69 * + 16 + col0 FROM tab1 AS cor0
----
-1024
-1040
-1101

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-7315
SELECT ALL - 50 DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7315
SELECT ALL - 50 / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col0 * + col1 + col2 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7317
SELECT ALL CAST( NULL AS DECIMAL ) + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7317
SELECT ALL CAST ( NULL AS REAL ) + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 89 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

onlyif mysql # use DIV operator for integer division
query I rowsort label-7319
SELECT 79 DIV - cor0.col0 FROM tab1 AS cor0
----
-1
-26
0

skipif mysql # not compatible
query I rowsort label-7319
SELECT 79 / - cor0.col0 FROM tab1 AS cor0
----
-1
-26
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7320
SELECT - col1 * - cor0.col0 + col1 DIV ( 61 * - col2 + col2 ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-7320
SELECT - col1 * - cor0.col0 + col1 / ( 61 * - col2 + col2 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + 91 + + 96 * cor0.col2 AS col2 FROM tab0 AS cor0
----
187
3259
7963

query I rowsort
SELECT + + col1 * ( - col0 ) + - col2 AS col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 FROM tab2, tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + ( + 43 ) AS col0 FROM tab1 cor0
----
43
43
43

query I rowsort
SELECT ALL + 56 * + 11 FROM tab1 AS cor0
----
616
616
616

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT - 31 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-109
-110
-38

query I rowsort
SELECT 15 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT col2 * + 46 FROM tab0 AS cor0
----
1518
3772
46

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2, tab1 AS cor0, tab0, tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - - col0 + 91 * col1 FROM tab1 AS cor0
----
1263
2369
974

query I rowsort
SELECT ALL - ( + col0 ) + - col2 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT - col1 * col0 + - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7334
SELECT ALL - - CAST( NULL AS SIGNED ) * col1 + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7334
SELECT ALL - - CAST ( NULL AS INTEGER ) * col1 + - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + ( 2 ) * + col2 + - col2 AS col2 FROM tab2 AS cor0
----
-114
-78
-81

query I rowsort
SELECT + ( + col2 ) * col2 + + 91 AS col0 FROM tab0 AS cor0
----
1180
6815
92

query I rowsort
SELECT 96 AS col2 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT ALL + col0 + 73 AS col2 FROM tab0 AS cor0
----
108
162
97

query I rowsort
SELECT 11 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab1 AS cor0
----
76

query I rowsort
SELECT + 73 * - col2 + + col0 FROM tab2 AS cor0
----
-1820
-1964
-2695

query I rowsort
SELECT - + ( + col1 ) * 26 AS col1 FROM tab0 AS cor0
----
-2236
-2366
-2522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7343
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7343
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 57 * - cor0.col2 FROM tab1 cor0
----
-3078
-3249
-5472

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + cor0.col2 + + 89 col0 FROM tab1 AS cor0
----
156
169
198

query I rowsort
SELECT DISTINCT + - col2 * + ( col0 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col1 - - col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT + + col1 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + col1 * - col2 + + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL 11 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - + col2 + col1 * + 27 FROM tab1 cor0
----
213
255
648

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7353
SELECT DISTINCT + - col2 + - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7353
SELECT DISTINCT + - col2 + - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 * + col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col0 * + 96 AS col0 FROM tab2 AS cor0
----
672
7488
7584

query I rowsort
SELECT - col1 + col2 * cor0.col1 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7357
SELECT DISTINCT - cor0.col1 DIV - col0 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-7357
SELECT DISTINCT - cor0.col1 / - col0 FROM tab2 cor0
----
0
4

query I rowsort
SELECT DISTINCT - 80 FROM tab0, tab0 AS cor0
----
-80

query I rowsort
SELECT DISTINCT + col2 + - 15 * col1 FROM tab0
----
-1257
-1283
-1454

query I rowsort
SELECT tab2.col2 * ( tab2.col0 ) AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col1 * col2 * col1 + col1 FROM tab0
----
-243982
-678951
-9312

query I rowsort
SELECT - 88 * tab1.col0 AS col2 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to dbfa8a3822aeacc9525417aff440e381

query I rowsort
SELECT cor0.col0 * - tab2.col1 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 778568a0294a40217171bb2f1bbf2149

query I rowsort
SELECT col2 + col1 * - col2 + + col2 FROM tab0
----
-2772
-7298
-95

query I rowsort
SELECT DISTINCT - 78 AS col2 FROM tab1, tab0 AS cor0
----
-78

query I rowsort
SELECT DISTINCT tab2.col0 + - tab2.col2 FROM tab2
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 * + col2 + col0 * col1 col0 FROM tab2
----
115419
5320
57330

query I rowsort
SELECT DISTINCT col2 * tab2.col2 + 15 FROM tab2
----
1459
691
744

query I rowsort
SELECT + col0 * + cor0.col1 * + col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT cor0.col2 * - cor0.col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + col0 * - col0 AS col1 FROM tab0 cor0
----
-1225
-576
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7372
SELECT DISTINCT ( col0 ) + + CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7372
SELECT DISTINCT ( col0 ) + + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT + col2 + - CAST ( col0 AS REAL ) * - col0 * col2 FROM tab1 AS cor0
----
233529
540
614496

query I rowsort
SELECT ALL + cor0.col1 * + 19 + + ( col2 ) - col1 FROM tab2 AS cor0
----
1088
344
585

query I rowsort
SELECT - - 65 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT - col0 * tab0.col2 AS col0 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7377
SELECT col0 DIV col2 AS col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7377
SELECT col0 / col2 AS col2 FROM tab0
----
0
1
35

query I rowsort
SELECT + 25 FROM tab2, tab1, tab1 cor0
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT col0 + ( cor0.col2 ) FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + + 36 + 86 * - col1 AS col2 FROM tab1 AS cor0
----
-1082
-2200
-824

query I rowsort
SELECT - col1 * 35 AS col0 FROM tab1
----
-350
-455
-910

query I rowsort
SELECT col2 * + 26 AS col1 FROM tab1 AS cor0
----
1404
1482
2496

query I rowsort
SELECT + - ( col0 ) * - col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col0 * col0 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT 71 * + cor1.col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
213
4544
5680

query I rowsort
SELECT DISTINCT + tab0.col1 * + 8 AS col2 FROM tab0
----
688
728
776

query I rowsort
SELECT + ( 82 ) FROM tab0, tab2 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7388
SELECT CAST( NULL AS SIGNED ) * 40 AS col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7388
SELECT CAST ( NULL AS INTEGER ) * 40 AS col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT col1 * ( + col1 ) AS col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7390
SELECT - - ( - col0 ) * cor0.col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7390
SELECT - - ( - col0 ) * cor0.col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * + 78 FROM tab1 AS cor0
----
234
4992
6240

query I rowsort
SELECT 13 * + 77 FROM tab2 AS cor0
----
1001
1001
1001

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col0 col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - ( - col2 ) * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 63 AS col2 FROM tab2 AS cor0
----
63
63
63

query I rowsort
SELECT ALL + + col2 * 50 AS col1 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT + cor0.col2 FROM tab0, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col2 * col0 * - cor0.col2 FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7401
SELECT ALL - cor0.col1 + col0 + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7401
SELECT ALL - cor0.col1 + col0 + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 31 * + col2 AS col1 FROM tab2 AS cor0
----
1178
806
837

query I rowsort
SELECT + 4 FROM tab0
----
4
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * tab1.col2 + tab1.col1 col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to de537f92ff372a95840b3a018721701b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7405
SELECT CAST( NULL AS DECIMAL ) AS col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7405
SELECT CAST ( NULL AS REAL ) AS col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT tab2.col1 + - tab2.col0 FROM tab2, tab2 cor0
----
9 values hashing to 023677f2362ebf8bd60cb629f4090df4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7407
SELECT DISTINCT col1 DIV - col1 AS col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-7407
SELECT DISTINCT col1 / - col1 AS col0 FROM tab1
----
-1

query I rowsort
SELECT ALL + ( - col2 ) * col1 FROM tab0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7409
SELECT ALL CAST( NULL AS SIGNED ) * - col1 + col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7409
SELECT ALL CAST ( NULL AS INTEGER ) * - col1 + col1 AS col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7410
SELECT DISTINCT col1 + - col2 DIV col0 + 34 FROM tab2
----
51
62
93

skipif mysql # not compatible
query I rowsort label-7410
SELECT DISTINCT col1 + - col2 / col0 + 34 FROM tab2
----
51
62
93

query I rowsort
SELECT ALL - col0 + col2 + + col1 AS col0 FROM tab0
----
63
84
95

query I rowsort
SELECT - 21 + col1 AS col0 FROM tab2 AS cor0
----
-4
10
38

query I rowsort
SELECT - + 31 AS col0 FROM tab0 AS cor0
----
-31
-31
-31

query I rowsort
SELECT + tab1.col2 * col2 - 30 * tab1.col0 FROM tab1
----
1329
2826
6816

query I rowsort
SELECT + 32 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

query I rowsort
SELECT ALL 97 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
291
6208
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 95 * + cor0.col0 col0 FROM tab0 AS cor0
----
-2280
-3325
-8455

query I rowsort
SELECT col0 * - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + 25 AS col2 FROM tab1 cor0
----
25
25
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-7420
SELECT + col0 DIV cor0.col2 col1 FROM tab0 cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7420
SELECT + col0 / cor0.col2 col1 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - ( col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - - 39 * - col0 FROM tab1 AS cor0
----
-117
-2496
-3120

query I rowsort
SELECT - col0 * 93 * tab1.col0 - - col2 * 68 FROM tab1
----
-377052
-588672
2835

query I rowsort
SELECT + col0 * col0 + 56 FROM tab2 AS cor0
----
105
6140
6297

query I rowsort
SELECT + col1 + + cor0.col1 AS col1 FROM tab1 cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7426
SELECT + col2 * cor0.col2 DIV col2 + + cor0.col2 * + col0 AS col0 FROM tab0 AS cor0
----
36
7380
825

skipif mysql # not compatible
query I rowsort label-7426
SELECT + col2 * cor0.col2 / col2 + + cor0.col2 * + col0 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - + col1 * + 53 + col0 FROM tab2 AS cor0
----
-1636
-3049
-822

query I rowsort
SELECT + cor0.col2 - col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7429
SELECT - col2 * + col2 - cor0.col0 DIV - cor0.col0 col0 FROM tab2 AS cor0
----
-1443
-675
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7429
SELECT - col2 * + col2 - cor0.col0 / - cor0.col0 col0 FROM tab2 AS cor0
----
-1443
-675
-728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 + col1 + col2 col0 FROM tab2 AS cor0
----
2113
247
3057

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7431
SELECT - CAST( NULL AS SIGNED ) + 79 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7431
SELECT - CAST ( NULL AS INTEGER ) + 79 * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7432
SELECT + 48 DIV ( col1 ) AS col0 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7432
SELECT + 48 / ( col1 ) AS col0 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT - 72 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1224
-2232
-4248

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT DISTINCT - - 22 + col0 * - col1 FROM tab2 cor0
----
-1321
-195
-4580

query I rowsort
SELECT ALL - + 34 AS col1 FROM tab2 AS cor0
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - col1 col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + + col2 * - col0 + col1 * col2 AS col2 FROM tab1 AS cor0
----
-3078
-6432
1242

onlyif mysql # use DIV operator for integer division
query I rowsort label-7440
SELECT DISTINCT - col0 DIV + col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-7440
SELECT DISTINCT - col0 / + col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT col1 + + cor0.col0 * - 97 AS col1 FROM tab0 AS cor0
----
-2242
-3298
-8542

query I rowsort
SELECT ALL cor0.col0 * + col0 + - 15 * col2 FROM tab0 AS cor0
----
1210
6691
81

query I rowsort
SELECT + col1 * 25 + 35 FROM tab0 cor0
----
2185
2310
2460

onlyif mysql # use DIV operator for integer division
query I rowsort label-7444
SELECT ALL + + col1 + - ( + 77 ) DIV col1 FROM tab2 cor0
----
13
29
58

skipif mysql # not compatible
query I rowsort label-7444
SELECT ALL + + col1 + - ( + 77 ) / col1 FROM tab2 cor0
----
13
29
58

query I rowsort
SELECT DISTINCT cor0.col1 - + ( + col0 ) FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + + col1 + - col2 * - 29 FROM tab0 AS cor0
----
1043
126
2469

query I rowsort
SELECT DISTINCT - col2 + col1 * cor0.col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-7450
SELECT col2 DIV cor0.col1 + - col2 FROM tab2 AS cor0
----
-26
-27
-36

skipif mysql # not compatible
query I rowsort label-7450
SELECT col2 / cor0.col1 + - col2 FROM tab2 AS cor0
----
-26
-27
-36

query I rowsort
SELECT DISTINCT - - col2 * + 39 AS col2 FROM tab1 cor0
----
2106
2223
3744

query I rowsort
SELECT + tab1.col0 + tab1.col0 * 13 AS col2 FROM tab1
----
1120
42
896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - tab2.col2 + 70 col2 FROM tab2
----
-1464
-576
-767

query I rowsort
SELECT 17 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT ALL tab1.col2 + - col0 * ( col2 ) AS col1 FROM tab1
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * + 93 + - 64 col1 FROM tab2 cor0
----
587
7190
7283

query I rowsort
SELECT DISTINCT + + col0 * ( cor0.col1 ) - - col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7458
SELECT ALL col1 DIV ( col2 + cor0.col0 ) FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7458
SELECT ALL col1 / ( col2 + cor0.col0 ) FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT - col2 * col2 + 4 AS col0 FROM tab1 AS cor0
----
-2912
-3245
-9212

query I rowsort
SELECT ALL + col1 - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT col1 + + 81 FROM tab0 AS cor0
----
167
172
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 col0 FROM tab2 AS cor0
----
45
45
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7463
SELECT col0 * + CAST( col1 AS SIGNED ) - col0 FROM tab1
----
576
75
960

skipif mysql # not compatible
query I rowsort label-7463
SELECT col0 * + CAST ( col1 AS INTEGER ) - col0 FROM tab1
----
576
75
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7464
SELECT ALL - CAST( NULL AS DECIMAL ) col1 FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7464
SELECT ALL - CAST ( NULL AS REAL ) col1 FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT + - col0 * ( col2 + col0 ) AS col2 FROM tab2 cor0
----
-238
-8112
-9243

query I rowsort
SELECT ALL + col0 * + 11 AS col0 FROM tab2 AS cor0
----
77
858
869

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT ALL - + col1 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + - col0 * col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7470
SELECT - col1 + cor0.col2 DIV col2 + col0 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1129
491
7831

skipif mysql # not compatible
query I rowsort label-7470
SELECT - col1 + cor0.col2 / col2 + col0 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1129
491
7831

onlyif mysql # use DIV operator for integer division
query I rowsort label-7471
SELECT - - col0 DIV col0 + ( + cor0.col2 ) * + col0 AS col2 FROM tab1 AS cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-7471
SELECT - - col0 / col0 + ( + cor0.col2 ) * + col0 AS col2 FROM tab1 AS cor0
----
163
3649
7681

onlyif mysql # use DIV operator for integer division
query I rowsort label-7472
SELECT + + ( - col2 ) DIV ( + col1 ) + col0 + ( - 15 ) AS col0 FROM tab1 AS cor0
----
-14
44
58

skipif mysql # not compatible
query I rowsort label-7472
SELECT + + ( - col2 ) / ( + col1 ) + col0 + ( - 15 ) AS col0 FROM tab1 AS cor0
----
-14
44
58

query I rowsort
SELECT + ( ( tab1.col0 ) ) + col1 + col0 FROM tab1
----
138
173
32

query I rowsort
SELECT ALL + 26 + col0 * + 4 AS col0 FROM tab0
----
122
166
382

query I rowsort
SELECT ALL tab1.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT + 42 + - col0 * - 62 * 53 + tab0.col0 * ( col2 ) AS col0 FROM tab0
----
115087
299794
79698

query I rowsort
SELECT DISTINCT - + col0 + col2 * cor0.col2 AS col2 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT - 39 AS col2 FROM tab2 AS cor0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - - 88 AS col2 FROM tab2 AS cor0
----
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-7480
SELECT + 94 DIV col1 AS col1 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7480
SELECT + 94 / col1 AS col1 FROM tab0
----
0
1
1

query I rowsort
SELECT ALL - 86 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9d2e1e8eda15b3b83dd7136dfc4f19af

query I rowsort
SELECT ALL + 64 * - col2 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT DISTINCT + 57 * + col1 * col1 AS col0 FROM tab0 AS cor0
----
421572
472017
536313

query I rowsort
SELECT col0 + - col1 * + col1 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ALL 97 + - col2 + - 36 FROM tab1 cor0
----
-35
4
7

query I rowsort
SELECT DISTINCT + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + + col0 * + col2 + - col1 AS col0 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-7488
SELECT DISTINCT 50 DIV tab1.col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-7488
SELECT DISTINCT 50 / tab1.col2 FROM tab1
----
0

query I rowsort
SELECT ALL - 1 + tab2.col0 AS col2 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to b0368675532cc334130b524d1349d372

query I rowsort
SELECT DISTINCT + - col0 * cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col1 + col0 * col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - - col2 * 73 AS col0 FROM tab0 AS cor0
----
2409
5986
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-7493
SELECT DISTINCT col1 DIV - col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7493
SELECT DISTINCT col1 / - col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT col0 * 84 AS col1 FROM tab0
----
2016
2940
7476

query I rowsort
SELECT DISTINCT + col2 * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - + col1 + + 36 AS col2 FROM tab0 AS cor0
----
-50
-55
-61

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to be7848c91584d04f21fd5bbb0d239aca

query I rowsort
SELECT + - col2 * 55 + col0 * cor0.col0 FROM tab0 AS cor0
----
-1239
1170
3411

query I rowsort
SELECT col1 * - 73 + col0 AS col0 FROM tab2 cor0
----
-1162
-2256
-4229

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

onlyif mysql # use DIV operator for integer division
query I rowsort label-7501
SELECT 3 + col1 DIV col1 AS col1 FROM tab0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-7501
SELECT 3 + col1 / col1 AS col1 FROM tab0
----
4
4
4

query I rowsort
SELECT DISTINCT + ( col1 ) FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT 41 * ( - col0 + tab1.col2 ) AS col0 FROM tab1
----
-287
2091
656

query I rowsort
SELECT ALL + - 99 * - col2 FROM tab2 AS cor0
----
2574
2673
3762

onlyif mysql # use DIV operator for integer division
query I rowsort label-7505
SELECT ALL + col0 DIV + 70 - - col2 FROM tab2 AS cor0
----
27
27
39

skipif mysql # not compatible
query I rowsort label-7505
SELECT ALL + col0 / + 70 - - col2 FROM tab2 AS cor0
----
27
27
39

query I rowsort
SELECT ALL - 54 * ( + col0 ) - 60 * - col0 AS col0 FROM tab1 AS cor0
----
18
384
480

query I rowsort
SELECT + 10 AS col1 FROM tab1 AS cor0
----
10
10
10

query I rowsort
SELECT DISTINCT - - ( - cor0.col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + + 22 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT - ( + col1 ) + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + 37 * col1 * ( - 77 ) + + cor0.col2 * + 97 - - col2 AS col0 FROM tab2 AS cor0
----
-165543
-44709
-85673

query I rowsort
SELECT ALL - 23 + + col0 + - cor0.col2 FROM tab1 cor0
----
-16
-39
-74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7513
SELECT ALL cor0.col2 + col2 * CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
1560
684
864

skipif mysql # not compatible
query I rowsort label-7513
SELECT ALL cor0.col2 + col2 * CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL + cor0.col2 + + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - - col2 * col0 - + col0 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-7516
SELECT - col2 DIV cor0.col0 - + col2 * col2 FROM tab0 AS cor0
----
-1
-1090
-6724

skipif mysql # not compatible
query I rowsort label-7516
SELECT - col2 / cor0.col0 - + col2 * col2 FROM tab0 AS cor0
----
-1
-1090
-6724

query I rowsort
SELECT DISTINCT col1 + col0 * + col2 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT 85 AS col1 FROM tab0
----
85

query I rowsort
SELECT 42 + + 89 AS col1 FROM tab0
----
131
131
131

query I rowsort
SELECT + ( - col2 ) + col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT 27 AS col0 FROM tab2
----
27
27
27

query I rowsort
SELECT ALL - 13 FROM tab1
----
-13
-13
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-7523
SELECT + col0 - tab0.col1 DIV col2 col2 FROM tab0
----
-62
22
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7523
SELECT + col0 - tab0.col1 / col2 col2 FROM tab0
----
-62
22
88

query I rowsort
SELECT col1 * 5 + col1 + + cor0.col0 * + 18 * col2 AS col1 FROM tab1 AS cor0
----
138318
3072
65724

query I rowsort
SELECT - col1 * col0 + 62 * col0 * 2 FROM tab0 AS cor0
----
2937
912
945

query I rowsort
SELECT + col1 + - col1 + col2 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - - col1 + - col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col0 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to e1120e7b687b32270ef70393236e7341

query I rowsort
SELECT DISTINCT - 55 * col0 AS col2 FROM tab1 AS cor0
----
-165
-3520
-4400

query I rowsort
SELECT - 52 * col2 AS col0 FROM tab0 AS cor0
----
-1716
-4264
-52

query I rowsort
SELECT DISTINCT 95 AS col0 FROM tab0, tab0 AS cor0
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 0 col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + 37 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1147
2183
629

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 + 51 col0 FROM tab0, tab1 AS cor0
----
140
75
86

query I rowsort
SELECT DISTINCT 43 AS col0 FROM tab1
----
43

query I rowsort
SELECT + - 11 * - cor0.col1 + + 3 FROM tab0 AS cor0
----
1004
1070
949

query I rowsort
SELECT col2 + + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL 81 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT - col0 * col1 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - cor0.col2 * + col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT col2 * + 63 FROM tab1 AS cor0
----
3402
3591
6048

query I rowsort
SELECT + col0 * 98 AS col0 FROM tab1 cor0
----
294
6272
7840

query I rowsort
SELECT ALL + 34 AS col2 FROM tab1
----
34
34
34

query I rowsort
SELECT - cor0.col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT col1 * - col1 * - col2 FROM tab2
----
10982
25947
90506

skipif mysql # not compatible
query I rowsort
SELECT CAST ( tab0.col2 AS REAL ) FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7547
SELECT ALL col0 * - CAST( NULL AS SIGNED ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7547
SELECT ALL col0 * - CAST ( NULL AS INTEGER ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7548
SELECT + col0 DIV + ( + col1 ) + col0 * - col1 FROM tab2 AS cor0
----
-1339
-217
-4601

skipif mysql # not compatible
query I rowsort label-7548
SELECT + col0 / + ( + col1 ) + col0 * - col1 FROM tab2 AS cor0
----
-1339
-217
-4601

query I rowsort
SELECT DISTINCT + col2 * - col0 + - col0 * col1 FROM tab0 AS cor0
----
-15397
-2856
-3430

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT cor0.col1 + + col0 * col0 * col0 + 29 AS col2 FROM tab2 AS cor0
----
403
474640
493085

query I rowsort
SELECT - col0 * + cor0.col2 * col1 + col2 FROM tab2 AS cor0
----
-119626
-50996
-5832

query I rowsort
SELECT ALL col1 + + ( - col0 + col0 ) * col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col1 * col0 * - col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT col0 - ( col0 ) FROM tab0
----
0
0
0

query I rowsort
SELECT tab0.col2 * 45 + + 83 AS col2 FROM tab0
----
128
1568
3773

query I rowsort
SELECT - col2 * - col0 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7558
SELECT DISTINCT - col2 DIV 9 + + col0 AS col0 FROM tab2
----
4
75
76

skipif mysql # not compatible
query I rowsort label-7558
SELECT DISTINCT - col2 / 9 + + col0 AS col0 FROM tab2
----
4
75
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-7559
SELECT DISTINCT - + 40 + col1 DIV col0 FROM tab0 AS cor0
----
-37
-38
-39

skipif mysql # not compatible
query I rowsort label-7559
SELECT DISTINCT - + 40 + col1 / col0 FROM tab0 AS cor0
----
-37
-38
-39

query I rowsort
SELECT DISTINCT - col2 * 92 + col2 AS col1 FROM tab2 AS cor0
----
-2366
-2457
-3458

query I rowsort
SELECT DISTINCT - ( + 17 ) - col2 AS col0 FROM tab2 AS cor0
----
-43
-44
-55

query I rowsort
SELECT ALL + ( col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7563
SELECT + + col0 DIV - ( - col1 ) + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7563
SELECT + + col0 / - ( - col1 ) + col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + col2 + col0 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-7565
SELECT ALL - col1 + + 17 DIV - 32 AS col0 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7565
SELECT ALL - col1 + + 17 / - 32 AS col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT tab1.col0 + 18 * - col0 AS col0 FROM tab1
----
-1088
-1360
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - 11 * - col0 col0 FROM tab2
----
108
886
917

onlyif mysql # use DIV operator for integer division
query I rowsort label-7568
SELECT col1 + - col1 DIV col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-7568
SELECT col1 + - col1 / col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT ALL col1 * 38 AS col2 FROM tab1
----
380
494
988

query I rowsort
SELECT + ( col2 + tab2.col0 ) AS col0 FROM tab2
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 - cor0.col1 col2 FROM tab2 AS cor0
----
-43
-57
-85

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT - 86 + - col0 * 4 * + 91 AS col1 FROM tab2 AS cor0
----
-2634
-28478
-28842

query I rowsort
SELECT - cor0.col1 + - cor0.col2 * 7 AS col2 FROM tab1 AS cor0
----
-404
-409
-685

query I rowsort
SELECT - + 46 + + col2 AS col2 FROM tab1 AS cor0
----
11
50
8

query I rowsort
SELECT DISTINCT + 27 FROM tab2 AS cor0
----
27

query I rowsort
SELECT DISTINCT - - 71 AS col1 FROM tab2 AS cor0
----
71

query I rowsort
SELECT DISTINCT - ( col0 ) * + col0 * col1 AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + + 35 + - col0 FROM tab1 AS cor0
----
-29
-45
32

query I rowsort
SELECT ALL 70 FROM tab2
----
70
70
70

query I rowsort
SELECT DISTINCT tab2.col0 * col1 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL 47 * + 3 FROM tab1
----
141
141
141

query I rowsort
SELECT ALL tab0.col0 - tab0.col0 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT + col1 - - col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - col1 * - col1 + - cor0.col1 FROM tab2 cor0
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - col1 col2 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 41 col1 FROM tab2 AS cor0
----
-41

query I rowsort
SELECT ALL + cor0.col1 * + col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col1 * col2 * ( col1 * - col1 ) + - cor0.col0 * - col2 * + col1 FROM tab2 AS cor0
----
237728
5459506
810216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7590
SELECT - col1 DIV + col0 + + col1 FROM tab0 AS cor0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-7590
SELECT - col1 / + col0 + + col1 FROM tab0 AS cor0
----
83
90
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7591
SELECT ALL col1 DIV + tab1.col0 + col0 AS col2 FROM tab1
----
11
64
80

skipif mysql # not compatible
query I rowsort label-7591
SELECT ALL col1 / + tab1.col0 + col0 AS col2 FROM tab1
----
11
64
80

query I rowsort
SELECT - 49 * col2 AS col1 FROM tab2
----
-1274
-1323
-1862

query I rowsort
SELECT DISTINCT + 91 FROM tab1 AS cor0
----
91

query I rowsort
SELECT ALL + - col2 * + 87 FROM tab0 AS cor0
----
-2871
-7134
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 97 * + col0 + + col0 * col2 * + col0 col0 FROM tab1 AS cor0
----
239680
622160
777

onlyif mysql # use DIV operator for integer division
query I rowsort label-7596
SELECT - - ( + col1 ) DIV - col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7596
SELECT - - ( + col1 ) / - col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col1 + + col0 - col2 FROM tab0 AS cor0
----
131
77
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7598
SELECT - col0 DIV + col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7598
SELECT - col0 / + col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + 72 * - col1 AS col2 FROM tab0 cor0
----
-6192
-6552
-6984

onlyif mysql # use DIV operator for integer division
query I rowsort label-7600
SELECT DISTINCT col0 DIV col1 + - 54 AS col2 FROM tab1 AS cor0
----
-48
-54

skipif mysql # not compatible
query I rowsort label-7600
SELECT DISTINCT col0 / col1 + - 54 AS col2 FROM tab1 AS cor0
----
-48
-54

query I rowsort
SELECT ALL - 74 + col1 FROM tab1 AS cor0
----
-48
-61
-64

query I rowsort
SELECT ALL - + 30 AS col0 FROM tab2 AS cor0
----
-30
-30
-30

onlyif mysql # use DIV operator for integer division
query I rowsort label-7603
SELECT DISTINCT - col1 DIV col0 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-7603
SELECT DISTINCT - col1 / col0 FROM tab1 AS cor0
----
-8
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7604
SELECT - ( col2 ) * CAST( - 77 AS SIGNED ) + - col0 * ( col1 ) col1 FROM tab0 cor0
----
-1785
-3318
477

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7604
SELECT - ( col2 ) * CAST ( - 77 AS INTEGER ) + - col0 * ( col1 ) col1 FROM tab0 cor0
----
-1785
-3318
477

query I rowsort
SELECT ALL col0 + col2 * - 83 FROM tab1 AS cor0
----
-4479
-4667
-7888

query I rowsort
SELECT ALL + ( col1 ) + - 0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col2 * - col0 + 76 * cor0.col0 * col0 FROM tab2 AS cor0
----
3535
460356
471314

query I rowsort
SELECT ALL 99 * - col1 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT DISTINCT ( + col1 ) * col0 + + ( tab0.col0 + col2 ) * ( col2 ) AS col2 FROM tab0
----
22121
3431
3945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + - col2 + - col0 col2 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-7611
SELECT DISTINCT col2 DIV - tab0.col2 + col1 AS col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7611
SELECT DISTINCT col2 / - tab0.col2 + col1 AS col1 FROM tab0
----
85
90
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7612
SELECT ALL - CAST( NULL AS SIGNED ) + - 95 + + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7612
SELECT ALL - CAST ( NULL AS INTEGER ) + - 95 + + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * + 63 + col0 * 71 * + 31 AS col1 FROM tab0
----
201622
58242
83146

query I rowsort
SELECT - 95 * - col1 * + 51 FROM tab1 AS cor0
----
125970
48450
62985

query I rowsort
SELECT DISTINCT + col1 * col2 + col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT + 4 * - col2 + col0 AS col1 FROM tab1 AS cor0
----
-164
-213
-304

query I rowsort
SELECT - + cor0.col1 + + cor0.col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL + - col2 * cor0.col1 * col2 + cor0.col1 AS col2 FROM tab0 cor0
----
-611793
-93568
0

query I rowsort
SELECT DISTINCT col2 + col1 * col1 - - cor0.col1 AS col0 FROM tab0 AS cor0
----
7515
8454
9507

query I rowsort
SELECT col2 + ( - 8 ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
-378
-399
-672

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7621
SELECT - col0 + CAST( NULL AS SIGNED ) * - col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7621
SELECT - col0 + CAST ( NULL AS INTEGER ) * - col0 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7622
SELECT DISTINCT + col1 DIV - col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7622
SELECT DISTINCT + col1 / - col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + col2 + + 95 AS col0 FROM tab1 AS cor0
----
149
152
191

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - col0 * + col1 col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT - col2 + + cor0.col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL + col1 * col2 * col0 + col1 * - col1 FROM tab0 cor0
----
-6014
60716
655837

query I rowsort
SELECT DISTINCT - + col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - col0 * - col0 * + 55 FROM tab0 AS cor0
----
31680
435655
67375

query I rowsort
SELECT ALL + col1 + ( - col2 ) AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ( + col1 ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + col2 + - col2 * 78 + col0 FROM tab2 AS cor0
----
-1924
-2072
-2847

query I rowsort
SELECT ALL col0 + + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7634
SELECT ALL - col0 * + CAST( NULL AS DECIMAL ) + + 27 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7634
SELECT ALL - col0 * + CAST ( NULL AS REAL ) + + 27 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * ( col0 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col0 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col0 - + 17 AS col1 FROM tab1
----
-14
47
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 94 + - 49 col1 FROM tab0 AS cor0
----
-143
-143
-143

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - 5 + + col1 * col1 - col1 col2 FROM tab1
----
40
520
91

query I rowsort
SELECT DISTINCT - col2 * - 63 AS col0 FROM tab0 AS cor0
----
2079
5166
63

query I rowsort
SELECT ALL + - 38 + - col2 * cor0.col1 FROM tab2 AS cor0
----
-1572
-684
-875

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7642
SELECT + CAST( + col2 AS SIGNED ) + col0 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-7642
SELECT + CAST ( + col2 AS INTEGER ) + col0 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7643
SELECT ALL tab1.col1 * 6 - 61 DIV + col2 FROM tab1
----
155
59
78

skipif mysql # not compatible
query I rowsort label-7643
SELECT ALL tab1.col1 * 6 - 61 / + col2 FROM tab1
----
155
59
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7644
SELECT col0 + col1 + col1 DIV col1 FROM tab1
----
30
75
94

skipif mysql # not compatible
query I rowsort label-7644
SELECT col0 + col1 + col1 / col1 FROM tab1
----
30
75
94

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab0, tab2 cor1
----
243 values hashing to 60bd71ee2159222231bb3b5819bc5dca

onlyif mysql # use DIV operator for integer division
query I rowsort label-7646
SELECT ALL - col2 DIV 72 - - col0 * col2 AS col2 FROM tab0
----
35
7297
792

skipif mysql # not compatible
query I rowsort label-7646
SELECT ALL - col2 / 72 - - col0 * col2 AS col2 FROM tab0
----
35
7297
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + - col0 * col1 col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - ( - 20 ) + - col1 * - cor0.col1 FROM tab0 AS cor0
----
7416
8301
9429

onlyif mysql # use DIV operator for integer division
query I rowsort label-7649
SELECT + 32 DIV - col2 + + cor0.col2 * + col0 col0 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7649
SELECT + 32 / - col2 + + cor0.col2 * + col0 col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7650
SELECT - + col0 * + col0 - - col0 DIV cor0.col0 AS col1 FROM tab0 AS cor0
----
-1224
-575
-7920

skipif mysql # not compatible
query I rowsort label-7650
SELECT - + col0 * + col0 - - col0 / cor0.col0 AS col1 FROM tab0 AS cor0
----
-1224
-575
-7920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) + col0 col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT tab2.col1 * + col0 AS col1 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7653
SELECT 36 DIV 20 AS col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7653
SELECT 36 / 20 AS col1 FROM tab2
----
1
1
1

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to ea21cea53be47edd19229592e3d26141

onlyif mysql # use DIV operator for integer division
query I rowsort label-7655
SELECT 46 DIV + 26 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7655
SELECT 46 / + 26 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT - - ( + col2 ) - cor0.col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7657
SELECT ALL - CAST( + col1 AS SIGNED ) * - col1 FROM tab1 cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-7657
SELECT ALL - CAST ( + col1 AS INTEGER ) * - col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT + + col1 - col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + cor0.col0 + - col1 * col1 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-7660
SELECT ALL col2 DIV col0 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7660
SELECT ALL col2 / col0 FROM tab0 cor0
----
0
0
1

query I rowsort
SELECT ALL + + 78 * col1 + - col1 - ( + col2 ) FROM tab1 cor0
----
1948
713
905

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) / + col1 FROM tab1
----
1
1
1

query I rowsort
SELECT + 89 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab0
----
63

query I rowsort
SELECT 39 + - ( cor0.col1 ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 28c5fefdf864b5f7d50fb003217904e5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7666
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7666
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL col2 * col2 * 6 AS col2 FROM tab2
----
4056
4374
8664

query I rowsort
SELECT DISTINCT + + ( col1 ) * - 4 * cor0.col1 FROM tab0 cor0
----
-29584
-33124
-37636

skipif mysql # not compatible
query I rowsort
SELECT CAST ( 22 AS REAL ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT + - col2 * ( ( col2 ) * + 70 ) AS col0 FROM tab2 AS cor0
----
-101080
-47320
-51030

query I rowsort
SELECT ALL + + col2 + - col1 * 16 + + col2 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-1454
1495
6088

query I rowsort
SELECT + 19 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT - + col2 + - col0 * cor0.col1 AS col2 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT 72 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT DISTINCT + col1 - cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + col2 * - tab0.col1 + col0 AS col1 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT col2 FROM tab0 WHERE ( col1 * col1 ) <= NULL
----

query I rowsort
SELECT DISTINCT + tab2.col0 * + col0 AS col0 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + cor0.col0 + col2 col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT cor0.col2 + - col0 FROM tab2 AS cor0
----
-41
-52
20

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <= ( - col1 + - col0 )
----

query I rowsort
SELECT ALL + tab0.col0 * - col2 * - col2 AS col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 cor0 WHERE ( NULL ) NOT IN ( col1 )
----

query I rowsort
SELECT col1 * col0 + - col2 + col1 AS col1 FROM tab1
----
50
593
957

query I rowsort
SELECT DISTINCT - col2 * col2 * col2 FROM tab1
----
-157464
-185193
-884736

query I rowsort
SELECT DISTINCT col0 * col1 + - col2 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT ALL + col0 + + col0 FROM tab0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-7688
SELECT DISTINCT + col0 * cor0.col0 DIV - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-7688
SELECT DISTINCT + col0 * cor0.col0 / - col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7689
SELECT - - col0 DIV col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-7689
SELECT - - col0 / col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT - col1 - col2 * + col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT + col0 * - col0 + - col0 - cor0.col2 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-911
2736
2904

onlyif mysql # use DIV operator for integer division
query I rowsort label-7692
SELECT - - cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7692
SELECT - - cor0.col2 / - cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - - col2 * cor0.col1 + - col2 FROM tab2 AS cor0
----
1508
608
810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 + col2 - + col0 col1 FROM tab0 AS cor0
----
-69
-7305
-783

query I rowsort
SELECT - col0 * col0 + col1 * - cor0.col2 FROM tab1 AS cor0
----
-1413
-4666
-7648

query I rowsort
SELECT DISTINCT - col0 + col2 * + col2 AS col0 FROM tab0
----
-34
1065
6635

query I rowsort
SELECT - col0 * - col0 + + tab0.col2 + col2 * col2 FROM tab0
----
1227
14727
1698

onlyif mysql # use DIV operator for integer division
query I rowsort label-7698
SELECT + col2 * col1 DIV - col0 FROM tab1
----
-15
-468
-8

skipif mysql # not compatible
query I rowsort label-7698
SELECT + col2 * col1 / - col0 FROM tab1
----
-15
-468
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 + col1 col1 FROM tab1
----
29
3
77

query I rowsort
SELECT - col2 + + col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7701
SELECT + col1 * - col0 + col0 DIV col0 - - col0 AS col0 FROM tab1 AS cor0
----
-575
-74
-959

skipif mysql # not compatible
query I rowsort label-7701
SELECT + col1 * - col0 + col0 / col0 - - col0 AS col0 FROM tab1 AS cor0
----
-575
-74
-959

onlyif mysql # use DIV operator for integer division
query I rowsort label-7702
SELECT + - cor0.col2 + - col0 DIV + col0 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-7702
SELECT + - cor0.col2 + - col0 / + col0 FROM tab2 AS cor0
----
-27
-28
-39

query I rowsort
SELECT - col2 + col0 * col0 + col2 * col1 AS col2 FROM tab1 AS cor0
----
1359
4609
7552

query I rowsort
SELECT + col2 - + col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - + col1 + + col1 - col1 AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT tab1.col0 - - col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + 93 * + col1 - 56 * col2 AS col0 FROM tab2
----
-547
1371
4031

onlyif mysql # use DIV operator for integer division
query I rowsort label-7708
SELECT DISTINCT - 43 DIV - col2 - - col0 * col2 AS col0 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-7708
SELECT DISTINCT - 43 / - col2 - - col0 * col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col2 * + col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col1 + - col0 * 53 AS col2 FROM tab2 AS cor0
----
-340
-4075
-4170

query I rowsort
SELECT DISTINCT - - cor0.col2 * + col2 AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - col2 - + col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL + + col2 * col1 * col1 AS col1 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7714
SELECT col0 DIV cor0.col2 - - col0 * + col0 FROM tab1 AS cor0
----
4097
6400
9

skipif mysql # not compatible
query I rowsort label-7714
SELECT col0 / cor0.col2 - - col0 * + col0 FROM tab1 AS cor0
----
4097
6400
9

query I rowsort
SELECT ALL - col2 + + col2 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 * 82 AS col2 FROM tab2 cor0
----
574
6396
6478

onlyif mysql # use DIV operator for integer division
query I rowsort label-7717
SELECT ALL + col2 DIV col2 + + col0 AS col0 FROM tab1 cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-7717
SELECT ALL + col2 / col2 + + col0 AS col0 FROM tab1 cor0
----
4
65
81

query I rowsort
SELECT - col0 * - 29 AS col1 FROM tab2 AS cor0
----
203
2262
2291

query I rowsort
SELECT DISTINCT + - col2 + - 12 AS col0 FROM tab0 AS cor0
----
-13
-45
-94

query I rowsort
SELECT ALL col2 + 71 FROM tab1 AS cor0
----
125
128
167

query I rowsort
SELECT tab0.col0 + - tab0.col0 * - col0 * col0 AS col1 FROM tab0
----
13848
42910
705058

query I rowsort
SELECT col1 - + col0 FROM tab2
----
-19
-62
24

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL <= col2 * col0
----

query I rowsort
SELECT - col0 * col2 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL col1 - - col0 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT col1 * - col1 + - col0 + tab0.col0 * col0 * tab0.col1 AS col2 FROM tab0
----
109381
42116
712441

onlyif mysql # use DIV operator for integer division
query I rowsort label-7727
SELECT DISTINCT col0 + + col1 DIV - col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7727
SELECT DISTINCT col0 + + col1 / - col2 FROM tab1
----
3
64
80

query I rowsort
SELECT col0 + - tab0.col2 * - col0 * col1 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT col0 + - col1 * tab2.col0 AS col1 FROM tab2 WHERE col0 * col1 <> NULL
----

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 WHERE NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL col2 FROM tab0 WHERE ( - col2 ) < ( NULL )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE ( NULL ) < col1 * + col1
----

query I rowsort
SELECT ALL col0 * tab0.col1 AS col2 FROM tab0 WHERE ( + col0 ) IN ( - tab0.col0 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL <= col1 / col2
----

query I rowsort
SELECT 87 * + 18 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 87d55567340cc7c7e3577ae786ce2572

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7736
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 83 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7736
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 83 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT col2 + - tab0.col2 AS col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT col1 - col1 AS col0 FROM tab2
----
0

query I rowsort
SELECT + tab2.col2 - col2 FROM tab2
----
0
0
0

query I rowsort
SELECT - col0 - - col2 FROM tab2 WHERE + col0 NOT IN ( + col0 + + col1 )
----
-41
-52
20

query I rowsort
SELECT col2 * - col0 AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col2 * + tab2.col2 - + col2 / + col1 FROM tab2 WHERE + col2 <> ( NULL )
----

query I rowsort
SELECT col1 * + col1 FROM tab2 WHERE NOT NULL IN ( + col1 )
----

query I rowsort
SELECT ALL col0 * + col2 + col0 AS col2 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL + col2 * tab0.col2 * - tab0.col0 + col0 * - col1 * tab0.col0 FROM tab0
----
-118860
-1319247
-75672

query I rowsort
SELECT DISTINCT col1 * - col1 + col1 AS col0 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT ALL tab1.col2 * col2 - 46 AS col2 FROM tab1
----
2870
3203
9170

query I rowsort
SELECT DISTINCT tab0.col2 - - col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT - 42 - col0 FROM tab2
----
-120
-121
-49

query I rowsort
SELECT DISTINCT - col1 * - tab2.col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 58 + - tab0.col0 AS col2 FROM tab0
----
-31
23
34

query I rowsort
SELECT - tab1.col1 + col0 * + col2 FROM tab1
----
136
3638
7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - cor0.col0 * 43 + - col2 col0 FROM tab2 cor0
----
-301
-3354
-3397

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - col0 col1 FROM tab0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + cor0.col0 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * + col0 + + cor0.col2 * - 68 FROM tab2 AS cor0
----
-1787
3657
4316

query I rowsort
SELECT DISTINCT - + cor0.col0 AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT 20 + col2 AS col2 FROM tab0 AS cor0
----
102
21
53

query I rowsort
SELECT + col1 + tab1.col2 * + col0 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-7760
SELECT DISTINCT + col1 DIV col0 AS col1 FROM tab2
----
0
4

skipif mysql # not compatible
query I rowsort label-7760
SELECT DISTINCT + col1 / col0 AS col1 FROM tab2
----
0
4

query I rowsort
SELECT ALL - 48 FROM tab1
----
-48
-48
-48

query I rowsort
SELECT - col2 + - col2 * - col0 + + col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - ( + 38 + col2 * + col2 ) col0 FROM tab2 AS cor0
----
-1465
-655
-736

query I rowsort
SELECT - + col1 * 20 + + col1 + + col1 AS col0 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT + col1 + 4 FROM tab1 AS cor0
----
14
17
30

query I rowsort
SELECT - + col2 - cor0.col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT - col0 * + ( ( - col2 ) ) + - col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT + - col1 - + cor0.col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - 38 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab1 cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7771
SELECT ALL col0 DIV - ( + col2 * + col2 + - col1 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7771
SELECT ALL col0 / - ( + col2 * + col2 + - col1 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - - col1 + 33 AS col0 FROM tab0 AS cor0
----
119
124
130

query I rowsort
SELECT - col2 * col2 - 19 FROM tab1 AS cor0
----
-2935
-3268
-9235

query I rowsort
SELECT + - col2 + + col1 * + col0 AS col0 FROM tab2 AS cor0
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + col1 * 0 col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col0 + 75 AS col0 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT + cor0.col0 * - 57 + col2 FROM tab2 AS cor0
----
-372
-4420
-4465

query I rowsort
SELECT DISTINCT + col0 * + 98 AS col2 FROM tab1 cor0
----
294
6272
7840

query I rowsort
SELECT DISTINCT - - 53 * ( col2 ) + col1 FROM tab0 AS cor0
----
150
1835
4437

query I rowsort
SELECT + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col1 + - col1 * col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT ( + 42 ) FROM tab0
----
42

query I rowsort
SELECT ALL col1 * 29 * + col0 + 93 * - 50 AS col2 FROM tab2 AS cor0
----
128808
1643
34297

query I rowsort
SELECT DISTINCT + - col1 * - col0 + col2 * col0 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT - col2 * 69 AS col0 FROM tab0 AS cor0
----
-2277
-5658
-69

query I rowsort
SELECT ALL ( col1 ) + cor0.col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL - 43 * - 53 + col1 * col0 * col1 FROM tab2 AS cor0
----
25110
273797
9006

query I rowsort
SELECT DISTINCT col2 + + col0 * col2 - + col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL col0 * + 29 FROM tab0 AS cor0
----
1015
2581
696

query I rowsort
SELECT ALL - + col1 + 91 FROM tab2 AS cor0
----
32
60
74

query I rowsort
SELECT ALL - 52 + col2 * col2 + + col0 FROM tab0 AS cor0
----
-16
1061
6761

query I rowsort
SELECT DISTINCT 73 * col1 FROM tab0 AS cor0
----
6278
6643
7081

query I rowsort
SELECT DISTINCT + - 14 * - col2 FROM tab1 AS cor0
----
1344
756
798

query I rowsort
SELECT DISTINCT - col1 * col2 * + col1 FROM tab1 cor0
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-7795
SELECT DISTINCT + col1 + - col1 DIV col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-7795
SELECT DISTINCT + col1 + - col1 / col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT ALL - 64 * + col2 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT ALL + 84 * + col1 + - col0 FROM tab1 AS cor0
----
1012
2181
776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 50 ) col1 FROM tab0
----
50
50
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7799
SELECT - col1 * - col1 / CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7799
SELECT - col1 * - col1 / CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 + - col0 * - 6 col0 FROM tab2 AS cor0
----
-1066
-172
-795

query I rowsort
SELECT ALL + ( cor0.col0 ) + + ( ( col1 ) ) FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col0 + col0 * - col0 * - col0 AS col1 FROM tab2 AS cor0
----
350
474630
493118

onlyif mysql # use DIV operator for integer division
query I rowsort label-7803
SELECT DISTINCT + col0 DIV + col2 AS col1 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7803
SELECT DISTINCT + col0 / + col2 AS col1 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - col2 * col2 * + col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + 36 + + col0 AS col2 FROM tab2 AS cor0
----
114
115
43

query I rowsort
SELECT ALL - 38 + col2 FROM tab0 AS cor0
----
-37
-5
44

query I rowsort
SELECT DISTINCT - - 56 + + col0 * + col1 * col1 AS col2 FROM tab0 cor0
----
177560
329371
737065

query I rowsort
SELECT DISTINCT + + col2 - + col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + 69 AS col1 FROM tab2 AS cor0
----
69
69
69

query I rowsort
SELECT col1 + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - - 84 AS col0 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT - + col0 * + 85 + col2 AS col2 FROM tab1 AS cor0
----
-201
-5383
-6704

query I rowsort
SELECT + 87 + cor0.col1 FROM tab2 AS cor0
----
104
118
146

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - 22 AS REAL ) FROM tab1, tab1 AS cor0
----
-22

query I rowsort
SELECT ( 19 ) FROM tab1, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 48 + 98 col2 FROM tab2
----
12
23
24

query I rowsort
SELECT DISTINCT 46 AS col2 FROM tab1
----
46

query I rowsort
SELECT ALL 89 AS col2 FROM tab2
----
89
89
89

query I rowsort
SELECT DISTINCT 46 FROM tab1, tab0 AS cor0
----
46

query I rowsort
SELECT - ( + ( - col0 ) * col1 + - col0 ) AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT + - ( col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + cor0.col0 + 33 AS col0 FROM tab1 cor0
----
113
36
97

query I rowsort
SELECT DISTINCT + 58 AS col0 FROM tab1 cor0
----
58

query I rowsort
SELECT + 13 * - col1 FROM tab2
----
-221
-403
-767

query I rowsort
SELECT 93 * - 43 * + col1 FROM tab2
----
-123969
-235941
-67983

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( ( + col0 ) AS REAL ) AS col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7828
SELECT - CAST( NULL AS SIGNED ) * - 73 - col0 * - ( - cor0.col0 ) / - cor0.col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7828
SELECT - CAST ( NULL AS INTEGER ) * - 73 - col0 * - ( - cor0.col0 ) / - cor0.col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 77 + + col2 FROM tab0
----
110
159
78

skipif mysql # not compatible
query I rowsort
SELECT - ( cor0.col0 ) + col2 * - CAST ( + col0 AS REAL ) AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - + ( col0 ) * + col2 - + col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT + col0 * + col2 * col2 + col2 * 98 AS col1 FROM tab1 AS cor0
----
14040
213522
746688

onlyif mysql # use DIV operator for integer division
query I rowsort label-7833
SELECT ALL - ( + 82 ) DIV - col0 FROM tab1 AS cor0
----
1
1
27

skipif mysql # not compatible
query I rowsort label-7833
SELECT ALL - ( + 82 ) / - col0 FROM tab1 AS cor0
----
1
1
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 col1 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT 21 * - 26 AS col1 FROM tab1 AS cor0
----
-546
-546
-546

query I rowsort
SELECT ALL - ( ( - col0 ) ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + cor0.col1 + + col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT cor0.col1 - - col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7839
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7839
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7840
SELECT ALL + CAST( - 12 AS SIGNED ) + col1 AS col0 FROM tab0 AS cor0
----
74
79
85

skipif mysql # not compatible
query I rowsort label-7840
SELECT ALL + CAST ( - 12 AS INTEGER ) + col1 AS col0 FROM tab0 AS cor0
----
74
79
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7841
SELECT DISTINCT + CAST( col2 AS SIGNED ) + + col0 * 2 AS col0 FROM tab0 cor0
----
260
71
81

skipif mysql # not compatible
query I rowsort label-7841
SELECT DISTINCT + CAST ( col2 AS INTEGER ) + + col0 * 2 AS col0 FROM tab0 cor0
----
260
71
81

query I rowsort
SELECT ( col2 + + col2 ) * + col1 AS col1 FROM tab2
----
1292
1674
3068

query I rowsort
SELECT ALL - col0 + + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * col1 + - 86 AS col1 FROM tab2 AS cor0
----
-1620
-732
-923

query I rowsort
SELECT DISTINCT + - col2 + - col1 * + col2 FROM tab2 AS cor0
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-7846
SELECT ALL col0 * + col1 + + 98 DIV - 76 FROM tab0 cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-7846
SELECT ALL col0 * + col1 + + 98 / - 76 FROM tab0 cor0
----
2063
3394
8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - col0 col1 FROM tab1 AS cor0
----
-121
-176
-57

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 37 col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT + col2 * + cor0.col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT + col1 * ( col1 ) AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + 75 AS col2 FROM tab2
----
75
75
75

query I rowsort
SELECT - 72 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT DISTINCT tab2.col0 AS col0 FROM tab2, tab0, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col0 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 88213a0de4c0a44aaefe8bbffbcaf44a

query I rowsort
SELECT ALL + col2 * 18 * 13 FROM tab1
----
12636
13338
22464

query I rowsort
SELECT - + col1 + + 23 * - 6 AS col2 FROM tab2 AS cor0
----
-155
-169
-197

query I rowsort
SELECT ALL + ( + 9 ) FROM tab0 AS cor0
----
9
9
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7861
SELECT + CAST( + 72 AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
1728
2520
6408

skipif mysql # not compatible
query I rowsort label-7861
SELECT + CAST ( + 72 AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT DISTINCT ( col1 ) + - col2 * + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7863
SELECT + 66 DIV + col0 FROM tab2
----
0
0
9

skipif mysql # not compatible
query I rowsort label-7863
SELECT + 66 / + col0 FROM tab2
----
0
0
9

query I rowsort
SELECT ( - 1 ) FROM tab2
----
-1
-1
-1

query I rowsort
SELECT - 52 * col0 + - col2 AS col0 FROM tab0
----
-1281
-1821
-4710

query I rowsort
SELECT 47 + col1 + - col2 * - 11 AS col1 FROM tab0
----
1040
155
496

query I rowsort
SELECT DISTINCT - 28 * tab2.col2 * - col2 + col2 * + col0 FROM tab2
----
20601
20956
43434

query I rowsort
SELECT + 85 * col1 FROM tab2 AS cor0
----
1445
2635
5015

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * col1 + col2 col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT ALL + col0 + col1 - + col2 AS col0 FROM tab2 cor0
----
11
111
58

query I rowsort
SELECT DISTINCT - 95 AS col2 FROM tab0 cor0
----
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 - col0 col0 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT + - 66 * col1 FROM tab2 AS cor0
----
-1122
-2046
-3894

query I rowsort
SELECT DISTINCT col0 * col2 * - ( - col0 * + col0 ) + + col2 FROM tab0
----
42876
456225
57807540

query I rowsort
SELECT ALL tab1.col0 + + col0 FROM tab1
----
128
160
6

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab1 cor0, tab2 AS cor1
----
972 values hashing to 01a5931cccc3dad8792a1bc6df09c614

query I rowsort
SELECT + col0 * col2 * - ( + col2 ) AS col0 FROM tab0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-7878
SELECT - - 2 DIV - col1 + col1 DIV - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7878
SELECT - - 2 / - col1 + col1 / - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * col2 + + col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7881
SELECT - ( col0 ) * - CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-7881
SELECT - ( col0 ) * - CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 * - col1 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL + - col0 * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col0 * + 9 AS col1 FROM tab2 AS cor0
----
63
702
711

query I rowsort
SELECT DISTINCT + + cor0.col0 * - 34 FROM tab2 cor0
----
-238
-2652
-2686

query I rowsort
SELECT ALL - col1 * + 18 FROM tab1 AS cor0
----
-180
-234
-468

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - col1 * + 32 col0 FROM tab2 AS cor0
----
-1019
-1914
-582

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col0 + col2 col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + col1 * 86 + + col2 FROM tab1 AS cor0
----
1214
2290
917

query I rowsort
SELECT ALL cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + col1 * col0 * - col0 AS col2 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT - 20 AS col1 FROM tab1
----
-20
-20
-20

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col2 FROM tab1, tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 + + col0 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL + col0 * + col2 AS col0 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7897
SELECT ALL + col1 * - CAST( col1 * col1 AS SIGNED ) FROM tab2 AS cor0
----
-205379
-29791
-4913

skipif mysql # not compatible
query I rowsort label-7897
SELECT ALL + col1 * - CAST ( col1 * col1 AS INTEGER ) FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT ALL + cor0.col1 + 8 * ( col2 * - ( - col1 ) ) AS col2 FROM tab2 AS cor0
----
12331
5185
6727

query I rowsort
SELECT DISTINCT + col2 - + col1 AS col1 FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort
SELECT ALL + + cor0.col2 + col0 + + CAST ( col0 AS REAL ) * col1 AS col1 FROM tab0 cor0
----
2121
3431
8270

query I rowsort
SELECT DISTINCT + col0 * col0 - col1 AS col0 FROM tab2 cor0
----
18
6025
6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-7902
SELECT DISTINCT 16 * + col2 - + 6 * col0 DIV col0 FROM tab2 AS cor0
----
410
426
602

skipif mysql # not compatible
query I rowsort label-7902
SELECT DISTINCT 16 * + col2 - + 6 * col0 / col0 FROM tab2 AS cor0
----
410
426
602

query I rowsort
SELECT + - 31 AS col1 FROM tab1 AS cor0
----
-31
-31
-31

query I rowsort
SELECT + 27 * + tab1.col0 + tab1.col1 FROM tab1
----
107
1738
2173

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7905
SELECT CAST( NULL AS SIGNED ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7905
SELECT CAST ( NULL AS INTEGER ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
75

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT 64 AS col2 FROM tab1
----
64

query I rowsort
SELECT ALL - 98 FROM tab0
----
-98
-98
-98

query I rowsort
SELECT ALL + ( col0 ) * + 78 + - 66 FROM tab0 cor0
----
1806
2664
6876

query I rowsort
SELECT ALL - ( + cor0.col0 ) * - col1 + col2 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7913
SELECT DISTINCT + cor0.col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7913
SELECT DISTINCT + cor0.col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT 58 AS col2 FROM tab1
----
58
58
58

query I rowsort
SELECT tab2.col1 + - col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + col1 + 90 AS col1 FROM tab0
----
176
181
187

query I rowsort
SELECT col0 * + col2 + col2 AS col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT - col0 + 83 AS col0 FROM tab0
----
-6
48
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7919
SELECT DISTINCT - cor0.col2 DIV + col2 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7919
SELECT DISTINCT - cor0.col2 / + col2 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT col1 + 53 * - col2 FROM tab2 cor0
----
-1319
-1400
-1997

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7921
SELECT ALL + col0 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7921
SELECT ALL + col0 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7922
SELECT DISTINCT + col1 + col0 DIV + col0 + col0 * + col2 FROM tab1
----
189
3659
7694

skipif mysql # not compatible
query I rowsort label-7922
SELECT DISTINCT + col1 + col0 / + col0 + col0 * + col2 FROM tab1
----
189
3659
7694

query I rowsort
SELECT col2 * - ( - tab0.col0 ) + col1 + col2 FROM tab0
----
133
7471
911

query I rowsort
SELECT ALL - tab0.col0 + - 63 * - col2 AS col1 FROM tab0
----
2055
28
5077

onlyif mysql # use DIV operator for integer division
query I rowsort label-7925
SELECT col1 + col1 * 62 DIV col0 FROM tab0
----
154
268
308

skipif mysql # not compatible
query I rowsort label-7925
SELECT col1 + col1 * 62 / col0 FROM tab0
----
154
268
308

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7927
SELECT ALL CAST( 26 AS SIGNED ) * + col0 AS col0 FROM tab0 AS cor0
----
2314
624
910

skipif mysql # not compatible
query I rowsort label-7927
SELECT ALL CAST ( 26 AS INTEGER ) * + col0 AS col0 FROM tab0 AS cor0
----
2314
624
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-7928
SELECT DISTINCT + + cor0.col1 * 69 DIV + col2 col2 FROM tab0 AS cor0
----
179
6693
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7928
SELECT DISTINCT + + cor0.col1 * 69 / + col2 col2 FROM tab0 AS cor0
----
179
6693
76

query I rowsort
SELECT ALL - cor0.col0 - + ( + cor0.col1 * - 84 + col0 ) AS col0 FROM tab2 AS cor0
----
1270
2590
4800

query I rowsort
SELECT - + 12 * col1 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT + 16 * col2 FROM tab2 AS cor0
----
416
432
608

query I rowsort
SELECT ALL + + col1 + col2 * cor0.col0 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7933
SELECT DISTINCT CAST( NULL AS SIGNED ) * + ( col2 ) col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7933
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + ( col2 ) col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 77 AS col2 FROM tab0 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( cor0.col1 ) * col1 + + ( col0 ) col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT - + 6 AS col1 FROM tab2 AS cor0
----
-6
-6
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-7937
SELECT DISTINCT + - 54 + + col0 DIV + col2 AS col1 FROM tab1 AS cor0
----
-53
-54

skipif mysql # not compatible
query I rowsort label-7937
SELECT DISTINCT + - 54 + + col0 / + col2 AS col1 FROM tab1 AS cor0
----
-53
-54

query I rowsort
SELECT ALL - + col2 * col2 - cor0.col0 * + ( col0 + - col2 ) * - 82 FROM tab2 AS cor0
----
-12209
264154
331916

onlyif mysql # use DIV operator for integer division
query I rowsort label-7939
SELECT DISTINCT - col0 DIV - ( col1 + + col0 ) col1 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7939
SELECT DISTINCT - col0 / - ( col1 + + col0 ) col1 FROM tab0
----
0

query I rowsort
SELECT ALL col1 * - col1 AS col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT tab2.col1 FROM tab2, tab0 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # use DIV operator for integer division
query I rowsort label-7942
SELECT ALL - col0 DIV - col0 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7942
SELECT ALL - col0 / - col0 AS col1 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7943
SELECT + - CAST( col0 AS SIGNED ) + + col2 * 15 FROM tab0 AS cor0
----
-20
1141
471

skipif mysql # not compatible
query I rowsort label-7943
SELECT + - CAST ( col0 AS INTEGER ) + + col2 * 15 FROM tab0 AS cor0
----
-20
1141
471

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7944
SELECT DISTINCT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7944
SELECT DISTINCT + CAST ( NULL AS REAL ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT ALL + ( ( col1 ) ) FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7946
SELECT - 7 DIV col0 AS col0 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7946
SELECT - 7 / col0 AS col0 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT - - ( col1 ) + 43 AS col2 FROM tab2 AS cor0
----
102
60
74

query I rowsort
SELECT - col0 * cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + col0 + - col0 * col0 - - col0 FROM tab2 cor0
----
-35
-5928
-6083

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 41 col0 FROM tab1 AS cor0
----
-137
-95
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7951
SELECT DISTINCT + cor0.col2 DIV col0 + - col2 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
180
3648
7681

skipif mysql # not compatible
query I rowsort label-7951
SELECT DISTINCT + cor0.col2 / col0 + - col2 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
180
3648
7681

query I rowsort
SELECT col2 - cor0.col1 * + col2 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7953
SELECT DISTINCT + + col0 + + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7953
SELECT DISTINCT + + col0 + + CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + cor0.col0 + 52 FROM tab1 cor0
----
116
132
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7955
SELECT - cor0.col2 * - CAST( NULL AS SIGNED ) + + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7955
SELECT - cor0.col2 * - CAST ( NULL AS INTEGER ) + + col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + col2 - col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col1 * ( 76 ) + col0 * 94 - - col0 AS col0 FROM tab2 AS cor0
----
-1691
2926
6213

query I rowsort
SELECT col0 * + col1 + col2 - + col1 FROM tab1 AS cor0
----
106
1123
687

query I rowsort
SELECT - col2 * + 27 + 37 FROM tab1 AS cor0
----
-1421
-1502
-2555

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 ) * - col2 + col0 col0 FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + cor0.col1 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 16ae0e1090cb09b93854a4788f17716b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7962
SELECT - ( col0 ) DIV + col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7962
SELECT - ( col0 ) / + col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - 5 FROM tab2, tab1 AS cor0
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT col0 * + col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + 49 * + col2 FROM tab2 AS cor0
----
1274
1323
1862

query I rowsort
SELECT col2 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + + cor0.col2 * col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + - col0 - - ( + ( + col2 ) ) FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7969
SELECT - col0 * - CAST( + 49 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
343
3822
3871

skipif mysql # not compatible
query I rowsort label-7969
SELECT - col0 * - CAST ( + 49 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
343
3822
3871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col2 FROM tab1
----
57
57
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7971
SELECT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7971
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ( col1 ) + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 29 AS col2 FROM tab1, tab2 AS cor0
----
29

query I rowsort
SELECT col0 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT + 80 FROM tab0
----
80

query I rowsort
SELECT DISTINCT + ( ( + col2 ) ) AS col0 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + col0 - - col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - col0 + + col1 * col2 * - 93 FROM tab2 AS cor0
----
-142584
-59999
-77834

query I rowsort
SELECT DISTINCT - 24 FROM tab2
----
-24

query I rowsort
SELECT 59 * 49 FROM tab1
----
2891
2891
2891

query I rowsort
SELECT 16 FROM tab0, tab0 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT + - 53 + + col1 FROM tab0 AS cor0
----
33
38
44

query I rowsort
SELECT ALL - 6 * - col2 FROM tab0 AS cor0
----
198
492
6

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 28412d50061391eec23a02d0efcfb3f9

query I rowsort
SELECT - col1 * cor0.col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col2 * col1 * col2 + 88 * - col0 FROM tab2
----
17596
21983
33020

query I rowsort
SELECT ALL - 89 AS col2 FROM tab1
----
-89
-89
-89

query I rowsort
SELECT tab2.col1 - col1 AS col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL - 10 AS col0 FROM tab0
----
-10
-10
-10

query I rowsort
SELECT 33 * + col0 * - ( 29 ) AS col2 FROM tab0 AS cor0
----
-22968
-33495
-85173

query I rowsort
SELECT DISTINCT - + 76 + + col0 * + 92 FROM tab2 AS cor0
----
568
7100
7192

query I rowsort
SELECT ALL + col0 - - col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - 78 FROM tab2 AS cor0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 94 ) * tab2.col2 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 11ce4c64173a21b96c5aae8e74b78b22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - 27 col2 FROM tab0
----
-26
55
6

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-3
-64
-80

query I rowsort
SELECT ALL col0 * 73 FROM tab0
----
1752
2555
6497

query I rowsort
SELECT ALL col0 * - ( + col1 ) FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8000
SELECT ALL - tab1.col0 DIV col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-8000
SELECT ALL - tab1.col0 / col1 FROM tab1
----
-6
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8001
SELECT 8 * 57 DIV - tab1.col2 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 2c094509d3363cbc78b6f7cf2b886c85

skipif mysql # not compatible
query I rowsort label-8001
SELECT 8 * 57 / - tab1.col2 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 2c094509d3363cbc78b6f7cf2b886c85

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab1, tab0 AS cor0
----
78

query I rowsort
SELECT + col2 + - ( col1 ) + col2 FROM tab1
----
104
179
82

query I rowsort
SELECT DISTINCT col0 * + col2 - + col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT - - 37 + + col0 AS col2 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT ( ( + col0 ) ) AS col1 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT - col2 * 1 + + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - 32 + + col2 * col2 * 8 AS col1 FROM tab2 AS cor0
----
11520
5376
5800

query I rowsort
SELECT + ( ( + col1 ) ) * - 74 * - col0 AS col2 FROM tab2 AS cor0
----
16058
340548
99382

query I rowsort
SELECT col0 + col2 * col2 AS col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT DISTINCT + 55 + - col0 FROM tab0 cor0
----
-34
20
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 2 col1 FROM tab0 AS cor0
----
-2

query I rowsort
SELECT DISTINCT col0 * + col1 * col1 AS col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL 61 FROM tab2 cor0
----
61
61
61

query I rowsort
SELECT - + 77 * col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1999
-706
-921

query I rowsort
SELECT DISTINCT + + 12 * col1 FROM tab1 AS cor0
----
120
156
312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 53 * + col2 col0 FROM tab2 AS cor0
----
-1378
-1431
-2014

query I rowsort
SELECT col2 * col0 * col0 + + col0 AS col0 FROM tab1 AS cor0
----
233536
489
614480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8019
SELECT - CAST( NULL AS SIGNED ) + - col0 / - col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8019
SELECT - CAST ( NULL AS INTEGER ) + - col0 / - col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 * + col1 + ( + col1 ) + col1 AS col2 FROM tab0 AS cor0
----
7568
8463
9603

query I rowsort
SELECT DISTINCT - col1 + - 25 FROM tab1 AS cor0
----
-35
-38
-51

query I rowsort
SELECT 21 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-8023
SELECT DISTINCT - col2 DIV - col2 + 16 AS col1 FROM tab1 AS cor0
----
17

skipif mysql # not compatible
query I rowsort label-8023
SELECT DISTINCT - col2 / - col2 + 16 AS col1 FROM tab1 AS cor0
----
17

query I rowsort
SELECT + - col2 + - ( - col1 ) FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + 43 FROM tab2, tab2 AS cor0
----
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-8026
SELECT ALL + + col2 DIV col1 + + 6 AS col2 FROM tab1 cor0
----
11
13
8

skipif mysql # not compatible
query I rowsort label-8026
SELECT ALL + + col2 / col1 + + 6 AS col2 FROM tab1 cor0
----
11
13
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8027
SELECT ALL col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8027
SELECT ALL col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 + - col2 + - col0 AS col1 FROM tab0 AS cor0
----
-260
-71
-81

query I rowsort
SELECT 97 * 20 + col0 FROM tab1 cor0
----
1943
2004
2020

query I rowsort
SELECT - 29 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8031
SELECT CAST( col0 AS SIGNED ) * + col2 + - col2 AS col0 FROM tab2 cor0
----
162
2002
2964

skipif mysql # not compatible
query I rowsort label-8031
SELECT CAST ( col0 AS INTEGER ) * + col2 + - col2 AS col0 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT + col0 + col2 * col0 AS col0 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT - 65 FROM tab2, tab2 AS cor0
----
-65

query I rowsort
SELECT - tab0.col1 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT + cor0.col0 * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 6 * + col1 FROM tab0 AS cor0
----
-516
-546
-582

query I rowsort
SELECT - col0 - col0 AS col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT - + col1 + + col0 AS col1 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL + col1 - + col1 * col2 AS col2 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT cor0.col1 + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col2 - col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT cor0.col2 * - col2 * - col2 + col2 FROM tab2 AS cor0
----
17602
19710
54910

onlyif mysql # use DIV operator for integer division
query I rowsort label-8043
SELECT DISTINCT - col2 DIV col2 AS col0 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-8043
SELECT DISTINCT - col2 / col2 AS col0 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ALL col1 - col0 * - col1 AS col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT + cor1.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ( - tab0.col2 ) * - col2 + - col2 FROM tab0
----
0
1056
6642

query I rowsort
SELECT DISTINCT + tab1.col0 - col0 FROM tab1
----
0

query I rowsort
SELECT - 14 AS col0 FROM tab0, tab2, tab2 cor0
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT DISTINCT tab1.col0 * + col2 - col1 AS col1 FROM tab1
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-8050
SELECT + col0 + - 84 + col2 DIV col2 FROM tab0
----
-48
-59
6

skipif mysql # not compatible
query I rowsort label-8050
SELECT + col0 + - 84 + col2 / col2 FROM tab0
----
-48
-59
6

query I rowsort
SELECT ALL - col0 * col1 - col1 AS col0 FROM tab1
----
-104
-1053
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-8052
SELECT DISTINCT col2 * col0 + col1 DIV + tab1.col1 FROM tab1
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-8052
SELECT DISTINCT col2 * col0 + col1 / + tab1.col1 FROM tab1
----
163
3649
7681

query I rowsort
SELECT DISTINCT - 85 - - col1 FROM tab1 AS cor0
----
-59
-72
-75

query I rowsort
SELECT ALL + + col1 * col1 + - cor0.col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT + 23 * col1 * 44 - col2 AS col0 FROM tab0 AS cor0
----
86999
92010
98163

query I rowsort
SELECT DISTINCT + cor0.col1 + - col2 * - col0 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT col0 * + col1 FROM tab0 cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + col1 * - col0 + + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-8060
SELECT ALL + cor0.col0 * cor0.col0 + col0 * - col1 DIV col1 + - col1 AS col1 FROM tab1 AS cor0
----
-20
4022
6307

skipif mysql # not compatible
query I rowsort label-8060
SELECT ALL + cor0.col0 * cor0.col0 + col0 * - col1 / col1 + - col1 AS col1 FROM tab1 AS cor0
----
-20
4022
6307

query I rowsort
SELECT DISTINCT cor0.col0 - - cor0.col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - col1 + - col2 AS col0 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + col0 + - col0 AS col0 FROM tab2
----
0

query I rowsort
SELECT + col0 + - cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - col1 * ( col2 ) + col2 + 2 FROM tab0 AS cor0
----
-2803
-7378
-94

query I rowsort
SELECT - col2 + cor0.col0 * cor0.col1 + cor0.col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT 38 * col2 AS col2 FROM tab0
----
1254
3116
38

query I rowsort
SELECT + + col0 + 74 AS col2 FROM tab2 AS cor0
----
152
153
81

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col0 + - col0 AS col1 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - col1 * + ( ( - cor0.col1 ) ) AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - col0 - - 73 * col2 AS col2 FROM tab0 AS cor0
----
2385
38
5897

query I rowsort
SELECT col1 * + col1 + + 85 * col1 FROM tab0 AS cor0
----
14706
16016
17654

query I rowsort
SELECT col0 + + ( - col0 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * ( + cor0.col1 ) + col0 AS col2 FROM tab0 AS cor0
----
-7372
-8192
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8075
SELECT - CAST( - col1 * col2 AS SIGNED ) AS col2 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-8075
SELECT - CAST ( - col1 * col2 AS INTEGER ) AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + 28 * - 65 FROM tab2 AS cor0
----
-1820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + cor0.col0 * col1 col0 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL 49 FROM tab2 AS cor0
----
49
49
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8079
SELECT + CAST( NULL AS DECIMAL ) / + ( - col2 * col1 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8079
SELECT + CAST ( NULL AS REAL ) / + ( - col2 * col1 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 + col2 + col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT DISTINCT - - 72 * col2 AS col2 FROM tab1 AS cor0
----
3888
4104
6912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8082
SELECT ALL + - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8082
SELECT ALL + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 85 * 43 * col2 FROM tab1 AS cor0
----
-197370
-208335
-350880

query I rowsort
SELECT ALL 29 AS col0 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT DISTINCT 14 * col2 AS col0 FROM tab2
----
364
378
532

onlyif mysql # use DIV operator for integer division
query I rowsort label-8086
SELECT + 9 + col2 DIV - col1 AS col2 FROM tab2 AS cor0
----
7
9
9

skipif mysql # not compatible
query I rowsort label-8086
SELECT + 9 + col2 / - col1 AS col2 FROM tab2 AS cor0
----
7
9
9

query I rowsort
SELECT ALL - col0 + + col0 * + col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT DISTINCT 77 FROM tab2 AS cor0
----
77

query I rowsort
SELECT ALL - cor0.col0 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 82 * - col0 AS col0 FROM tab2 AS cor0
----
-574
-6396
-6478

query I rowsort
SELECT - 83 * col1 * col0 FROM tab1 AS cor0
----
-53120
-6474
-86320

query I rowsort
SELECT ALL 91 * - 70 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 05122c7763e3eafa2c2296eb29f66b2c

query I rowsort
SELECT DISTINCT - col1 * col1 AS col2 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT col1 * - col2 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 * + col0 AS col2 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + - col1 + + col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT col1 * - col1 + col2 * tab0.col2 FROM tab0
----
-1557
-6307
-9408

query I rowsort
SELECT - col2 * col0 + - col1 * col0 AS col1 FROM tab0 AS cor0
----
-15397
-2856
-3430

query I rowsort
SELECT ALL tab0.col0 + + col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL + col2 + + col0 * + col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT - + col0 * col1 * col1 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT col0 * col0 * col1 FROM tab1 cor0
----
234
40960
83200

query I rowsort
SELECT ALL - col1 * - col1 * - col0 AS col0 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT col2 * col0 + col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL - + col0 - - col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 + cor0.col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL col2 - col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - col2 * - col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col1 * - col1 - + col2 * + col0 FROM tab2 cor0
----
-2713
1453
772

onlyif mysql # use DIV operator for integer division
query I rowsort label-8111
SELECT col2 + + col1 DIV - col0 FROM tab1 AS cor0
----
46
57
96

skipif mysql # not compatible
query I rowsort label-8111
SELECT col2 + + col1 / - col0 FROM tab1 AS cor0
----
46
57
96

query I rowsort
SELECT + cor0.col1 * + col2 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - col0 * col0 + cor0.col1 * col2 * col0 AS col2 FROM tab0 AS cor0
----
2170
656197
67536

query I rowsort
SELECT ALL + + col2 + + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col0 * col2 col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - 37 * + col1 AS col2 FROM tab0
----
-3182
-3367
-3589

query I rowsort
SELECT + tab0.col2 * col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT - - col1 + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8119
SELECT + - cor0.col2 + + col1 DIV + cor0.col2 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-8119
SELECT + - cor0.col2 + + col1 / + cor0.col2 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col2 * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - col1 * col2 AS col1 FROM tab1
----
-1248
-1404
-570

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT col2 * + col2 - - col2 * col1 FROM tab2
----
1566
2090
2210

query I rowsort
SELECT ALL - col0 + + col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL col2 * col0 - col0 * - tab0.col1 AS col0 FROM tab0
----
15397
2856
3430

query I rowsort
SELECT tab0.col0 AS col1 FROM tab0 WHERE ( + col1 * col2 + + col2 ) IN ( - col1 )
----

query I rowsort
SELECT ALL + col2 - col1 * col0 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT col0 * - col1 * + col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - col2 + + col1 AS col2 FROM tab0
----
53
9
96

query I rowsort
SELECT col2 AS col0 FROM tab1 WHERE col0 * col2 + tab1.col0 <> NULL
----

query I rowsort
SELECT ALL + col0 * col0 AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT - col2 * + col0 + col2 FROM tab2
----
-162
-2002
-2964

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 / + col1 <= col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8134
SELECT col1 * col1 + - tab1.col1 DIV col1 AS col0 FROM tab1
----
168
675
99

skipif mysql # not compatible
query I rowsort label-8134
SELECT col1 * col1 + - tab1.col1 / col1 AS col0 FROM tab1
----
168
675
99

query I rowsort
SELECT col0 * col2 + + col1 * - col0 AS col0 FROM tab1
----
3008
6640
84

query I rowsort
SELECT + col1 - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT col2 * + tab1.col1 * + col0 - col2 * col0 FROM tab1
----
32832
4050
92160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col1 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * col0 + - col1 * - col2 FROM tab2 AS cor0
----
-4550
-5595
788

onlyif mysql # use DIV operator for integer division
query I rowsort label-8140
SELECT ALL + + col0 DIV - col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8140
SELECT ALL + + col0 / - col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT col0 * col1 * 72 FROM tab0 AS cor0
----
148608
244440
583128

query I rowsort
SELECT DISTINCT + 36 AS col1 FROM tab2 cor0
----
36

query I rowsort
SELECT + ( - cor0.col1 ) + 77 * 69 AS col1 FROM tab0 AS cor0
----
5216
5222
5227

query I rowsort
SELECT ALL cor0.col1 * + col0 + + col2 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-8145
SELECT 47 * cor0.col2 DIV + col1 + col2 AS col0 FROM tab2 AS cor0
----
143
46
67

skipif mysql # not compatible
query I rowsort label-8145
SELECT 47 * cor0.col2 / + col1 + col2 AS col0 FROM tab2 AS cor0
----
143
46
67

query I rowsort
SELECT col0 * col0 + + col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT col2 FROM tab1 WHERE NOT NULL BETWEEN ( col2 ) AND col0 * col0
----

query I rowsort
SELECT ALL col1 * col1 * col1 AS col1 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL - col0 * + col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + tab0.col1 + col2 * + col2 * - col0 FROM tab0
----
-26050
-598345
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 * col2 col0 FROM tab0
----
-2838
-7462
-97

query III rowsort
SELECT ALL * FROM tab1 WHERE ( - col2 + col2 ) > ( NULL )
----

query I rowsort
SELECT - tab0.col0 * col2 + col2 AS col2 FROM tab0
----
-34
-7216
-759

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL >= ( col1 * + col2 )
----

query I rowsort
SELECT ALL - col1 + - col0 + + col0 AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - col0 * + tab0.col2 + - col1 - - col2 AS col0 FROM tab0
----
-131
-7307
-845

query I rowsort
SELECT ALL - col0 + col0 FROM tab0 WHERE NOT NULL < ( NULL )
----

query I rowsort
SELECT DISTINCT col0 * col1 * - col2 AS col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT + col1 * + col2 AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8160
SELECT ALL + cor0.col1 DIV + col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-8160
SELECT ALL + cor0.col1 / + col0 FROM tab1 AS cor0
----
0
0
8

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT ( col1 * - col2 ) <> col1 + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8162
SELECT ALL col2 DIV col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8162
SELECT ALL col2 / col2 FROM tab0
----
1
1
1

query I rowsort
SELECT col1 * col1 - col2 FROM tab1
----
43
622
73

query I rowsort
SELECT ALL + col0 + + col1 - col1 * - col2 AS col1 FROM tab2
----
1671
742
875

onlyif mysql # use DIV operator for integer division
query I rowsort label-8165
SELECT ALL col1 DIV - col1 col2 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8165
SELECT ALL col1 / - col1 col2 FROM tab1
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8166
SELECT col1 DIV tab0.col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-8166
SELECT col1 / tab0.col2 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT tab2.col0 * col2 + col2 - col0 FROM tab2
----
1976
209
2961

onlyif mysql # use DIV operator for integer division
query I rowsort label-8168
SELECT ALL + col2 DIV col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8168
SELECT ALL + col2 / col1 AS col0 FROM tab1
----
2
5
7

query I rowsort
SELECT col0 * col1 + + tab2.col0 + col2 FROM tab2
----
1460
251
4706

query I rowsort
SELECT + col0 * tab0.col1 FROM tab0 WHERE ( col2 + col0 ) <> + col0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8171
SELECT DISTINCT col0 DIV col1 AS col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-8171
SELECT DISTINCT col0 / col1 AS col2 FROM tab2
----
0
1
4

query I rowsort
SELECT col1 + col2 + col1 FROM tab0
----
195
205
264

query I rowsort
SELECT ALL col2 * + tab0.col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - col1 * col2 * + col2 AS col0 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT col2 AS col1 FROM tab1 WHERE + col2 + + col0 < NULL
----

query I rowsort
SELECT ALL + tab2.col2 * col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col0 * col2 * col2 + + col0 + + col1 * - col2 AS col2 FROM tab1 WHERE NOT NULL NOT IN ( + col0 + - col0 )
----

query I rowsort
SELECT ALL tab1.col0 + col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL + 82 FROM tab2, tab1 cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT DISTINCT - + 9 FROM tab0 AS cor0
----
-9

query I rowsort
SELECT ALL - - ( - col0 ) FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col2 col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 94 * - ( + col1 ) AS col0 FROM tab0 AS cor0
----
-8084
-8554
-9118

query I rowsort
SELECT + ( col1 ) AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL ( - 20 ) + col2 AS col0 FROM tab2 cor0
----
18
6
7

query I rowsort
SELECT ALL col2 * col2 * + 68 AS col1 FROM tab0 AS cor0
----
457232
68
74052

query I rowsort
SELECT DISTINCT - + col1 + cor0.col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + 86 FROM tab1 cor0
----
86

query I rowsort
SELECT + col2 + + col1 * - 37 FROM tab0 AS cor0
----
-3149
-3285
-3588

query I rowsort
SELECT - + col2 * + col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8191
SELECT + col2 + - col0 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8191
SELECT + col2 + - col0 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 56 - - cor0.col2 AS col0 FROM tab0, tab2 AS cor0
----
-18
-29
-30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8193
SELECT ALL + col1 * - CAST( 72 AS SIGNED ) + col0 AS col0 FROM tab2 AS cor0
----
-1145
-2225
-4170

skipif mysql # not compatible
query I rowsort label-8193
SELECT ALL + col1 * - CAST ( 72 AS INTEGER ) + col0 AS col0 FROM tab2 AS cor0
----
-1145
-2225
-4170

query I rowsort
SELECT ALL - col1 + + col0 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8195
SELECT DISTINCT + col1 DIV tab0.col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-8195
SELECT DISTINCT + col1 / tab0.col2 FROM tab0
----
1
2
97

query I rowsort
SELECT + col2 * - ( - col1 ) * - col1 + + col2 FROM tab1
----
-16128
-36450
-5643

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( col1 * + cor0.col1 ) col2 FROM tab2 AS cor0
----
205379
29791
4913

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8198
SELECT DISTINCT - col2 * - CAST( NULL AS SIGNED ) - ( col0 ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8198
SELECT DISTINCT - col2 * - CAST ( NULL AS INTEGER ) - ( col0 ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col1 * ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * 12 + - col0 + col1 col1 FROM tab0 AS cor0
----
1070
350
482

query I rowsort
SELECT cor0.col0 + + 13 + col2 FROM tab2 AS cor0
----
117
130
47

query I rowsort
SELECT - - cor0.col2 * + ( col1 ) + - 15 - + col0 * - col1 AS col0 FROM tab2 AS cor0
----
1039
1974
6121

query I rowsort
SELECT DISTINCT - ( 23 ) AS col1 FROM tab1 AS cor0
----
-23

query I rowsort
SELECT - cor0.col0 - + col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - col0 * - ( + cor0.col1 ) * + ( + col2 ) AS col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL + 33 + + col2 * + col0 FROM tab0 AS cor0
----
68
7331
825

query I rowsort
SELECT - - col1 * + col2 + col0 + + 41 AS col2 FROM tab2 AS cor0
----
1653
766
885

query I rowsort
SELECT ALL ( - 22 ) FROM tab0 AS cor0
----
-22
-22
-22

query I rowsort
SELECT - 50 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

query I rowsort
SELECT col2 + - 58 FROM tab0
----
-25
-57
24

query I rowsort
SELECT + tab0.col0 + - col1 AS col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT - - 97 AS col0 FROM tab1, tab0, tab2 AS cor0, tab2
----
81 values hashing to f1d3319b9491f64621f2dbb0808458ca

query I rowsort
SELECT + col1 + + col0 + col0 * - col0 AS col0 FROM tab0
----
-1093
-466
-7741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + ( col1 ) + - col2 col0 FROM tab0
----
131
77
98

query I rowsort
SELECT ALL col1 * ( - col0 ) - - col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT - 50 AS col2 FROM tab1 cor0
----
-50
-50
-50

query I rowsort
SELECT + - 34 FROM tab0 AS cor0
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 col2 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 col0 FROM tab2
----
37
37
37

query I rowsort
SELECT col0 - 81 FROM tab1
----
-1
-17
-78

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab1 cor0
----
-3
-64
-80

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 88213a0de4c0a44aaefe8bbffbcaf44a

query I rowsort
SELECT 39 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8225
SELECT CAST( NULL AS SIGNED ) * 69 / col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8225
SELECT CAST ( NULL AS INTEGER ) * 69 / col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + + col1 + - tab2.col1 * - col2 FROM tab2
----
1619
701
895

query I rowsort
SELECT DISTINCT + ( col0 ) AS col0 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8228
SELECT - - col1 DIV col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8228
SELECT - - col1 / col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - - col2 + - cor0.col0 + + col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + 19 + col2 FROM tab2 AS cor0
----
45
46
57

query I rowsort
SELECT ALL - - col1 AS col2 FROM tab2 cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-8232
SELECT - + 24 DIV col2 - cor0.col0 * + col1 AS col1 FROM tab0 AS cor0
----
-2064
-3419
-8099

skipif mysql # not compatible
query I rowsort label-8232
SELECT - + 24 / col2 - cor0.col0 * + col1 AS col1 FROM tab0 AS cor0
----
-2064
-3419
-8099

query I rowsort
SELECT ALL col1 * - 70 FROM tab2
----
-1190
-2170
-4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8235
SELECT CAST( col1 AS SIGNED ) * + col1 FROM tab0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-8235
SELECT CAST ( col1 AS INTEGER ) * + col1 FROM tab0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8236
SELECT - - col0 + + CAST( + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-8236
SELECT - - col0 + + CAST ( + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - tab0.col0 + - tab0.col0 col0 FROM tab0, tab1, tab1 AS cor0
----
0

query I rowsort
SELECT ALL tab1.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT col0 * + col2 AS col2 FROM tab1 cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * 35 + col2 col0 FROM tab2 AS cor0
----
272
2756
2803

query I rowsort
SELECT tab0.col0 + + col1 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL 18 AS col2 FROM tab0
----
18
18
18

query I rowsort
SELECT ALL + 17 AS col1 FROM tab1
----
17
17
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-8244
SELECT DISTINCT - + col0 + col0 DIV - col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-8244
SELECT DISTINCT - + col0 + col0 / - col0 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT ALL + + col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL cor0.col1 * - col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col2 * + 93 AS col1 FROM tab0 AS cor0
----
3069
7626
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8248
SELECT ALL + - col2 DIV col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-8248
SELECT ALL + - col2 / col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT - + col1 + ( + col0 ) * - col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL - + col0 + cor0.col0 * cor0.col0 - col0 * + cor0.col2 FROM tab0 AS cor0
----
-240
1155
534

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - 52 + - 15 col2 FROM tab1 cor0
----
-2823
-2979
-5007

query I rowsort
SELECT ALL - - col2 + col2 * - col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT 73 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8254
SELECT ALL CAST( - 35 AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

skipif mysql # not compatible
query I rowsort label-8254
SELECT ALL CAST ( - 35 AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT + col1 + + 2 AS col2 FROM tab1 cor0
----
12
15
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8256
SELECT - col2 * + CAST( NULL AS SIGNED ) + - ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8256
SELECT - col2 * + CAST ( NULL AS INTEGER ) + - ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8257
SELECT col1 + col2 DIV col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8257
SELECT col1 + col2 / col1 AS col2 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8258
SELECT DISTINCT - col2 + col2 DIV + col0 AS col0 FROM tab1
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-8258
SELECT DISTINCT - col2 + col2 / + col0 AS col0 FROM tab1
----
-36
-57
-95

query I rowsort
SELECT ALL col1 * col2 * col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - + ( col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col0 * + col2 + + 7 * col0 * col1 FROM tab1
----
14960
708
8128

query I rowsort
SELECT 83 AS col0 FROM tab0 cor0
----
83
83
83

query I rowsort
SELECT + - col0 * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - 50 + - col0 - - tab2.col2 * + col2 FROM tab2
----
1315
548
672

query I rowsort
SELECT col2 + - col0 * ( + col0 ) AS col2 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT - 75 FROM tab0, tab2, tab2 cor0
----
-75

query I rowsort
SELECT DISTINCT col1 - - tab2.col0 * col1 AS col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - 61 * - col2 + col2 * cor0.col0 FROM tab0 AS cor0
----
12300
2805
96

query I rowsort
SELECT - + col1 * col0 * 51 FROM tab2 AS cor0
----
-11067
-234702
-68493

query I rowsort
SELECT - col0 + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - + cor0.col1 * - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - - ( cor1.col2 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * cor0.col1 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + 73 AS col1 FROM tab2 AS cor0
----
73
73
73

query I rowsort
SELECT cor0.col0 * col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + + 57 FROM tab2 AS cor0
----
57

query I rowsort
SELECT + 90 FROM tab1 cor0
----
90
90
90

query I rowsort
SELECT ALL col1 + - col2 AS col0 FROM tab0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8281
SELECT - - col0 + col0 + + CAST( - cor0.col0 AS SIGNED ) * + col1 FROM tab0 AS cor0
----
-2016
-3325
-7921

skipif mysql # not compatible
query I rowsort label-8281
SELECT - - col0 + col0 + + CAST ( - cor0.col0 AS INTEGER ) * + col1 FROM tab0 AS cor0
----
-2016
-3325
-7921

query I rowsort
SELECT - 3 + + col1 * cor0.col2 + - col1 FROM tab2 AS cor0
----
1472
626
803

query I rowsort
SELECT + + col1 + - ( - col0 ) * + col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT col1 * 71 * - col0 AS col0 FROM tab0 AS cor0
----
-146544
-241045
-575029

query I rowsort
SELECT + col2 * 49 AS col2 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT DISTINCT 41 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8287
SELECT + col2 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8287
SELECT + col2 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + ( + col0 + - col2 ) * 49 AS col0 FROM tab0 AS cor0
----
-408
1667
425

query I rowsort
SELECT DISTINCT - col1 * + col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col1 * col1 + cor0.col2 * - col0 AS col1 FROM tab2 AS cor0
----
-1150
-3291
-5509

query I rowsort
SELECT - cor0.col2 + - cor0.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 1d5749dba9e60eff96be70fcb36a7c9d

query I rowsort
SELECT - ( + 94 ) AS col2 FROM tab1 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ALL - - ( col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) + col1 col1 FROM tab1
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8295
SELECT DISTINCT + cor0.col0 DIV cor0.col1 FROM tab1, tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-8295
SELECT DISTINCT + cor0.col0 / cor0.col1 FROM tab1, tab1 AS cor0
----
0
6

query I rowsort
SELECT DISTINCT ( col2 * - tab2.col0 ) AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT cor1.col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - col1 * - col1 col0 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8299
SELECT ALL - CAST( NULL AS SIGNED ) * - col2 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8299
SELECT ALL - CAST ( NULL AS INTEGER ) * - col2 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 46 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
110
126
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-8301
SELECT ALL - + ( 65 ) DIV - col0 + 80 FROM tab2 AS cor0
----
80
80
89

skipif mysql # not compatible
query I rowsort label-8301
SELECT ALL - + ( 65 ) / - col0 + 80 FROM tab2 AS cor0
----
80
80
89

query I rowsort
SELECT + cor0.col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT 99 AS col2 FROM tab2 AS cor0
----
99
99
99

query I rowsort
SELECT ALL - - col2 * cor0.col2 - + col0 AS col1 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT ALL ( + col1 ) * + cor0.col0 + + ( col0 ) FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + + 1 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT ALL + 60 FROM tab1
----
60
60
60

query I rowsort
SELECT DISTINCT + ( col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT 54 + col1 * col2 AS col1 FROM tab2 AS cor0
----
1588
700
891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8310
SELECT ALL + col2 * col0 * CAST( col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1323
158184
237158

skipif mysql # not compatible
query I rowsort label-8310
SELECT ALL + col2 * col0 * CAST ( col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-8311
SELECT DISTINCT + 27 + + cor0.col1 DIV + CAST( col1 + col2 AS SIGNED ) AS col0 FROM tab2 cor0
----
27

skipif mysql # not compatible
query I rowsort label-8311
SELECT DISTINCT + 27 + + cor0.col1 / + CAST ( col1 + col2 AS INTEGER ) AS col0 FROM tab2 cor0
----
27

query I rowsort
SELECT 52 AS col2 FROM tab1 AS cor0
----
52
52
52

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-8314
SELECT DISTINCT - + col0 + - col2 DIV - col2 AS col2 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-8314
SELECT DISTINCT - + col0 + - col2 / - col2 AS col2 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT + - cor0.col0 * - col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - 21 AS col1 FROM tab1, tab0 AS cor0
----
-21

query I rowsort
SELECT + 51 + + col2 * + col0 FROM tab1 AS cor0
----
213
3699
7731

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1
----
243 values hashing to 7e12d99d8ab63d9fd10e95cef9d78998

query I rowsort
SELECT DISTINCT - col1 * ( + 37 * col1 ) FROM tab1
----
-25012
-3700
-6253

onlyif mysql # use DIV operator for integer division
query I rowsort label-8320
SELECT + + 22 + col2 DIV + col1 FROM tab1 AS cor0
----
24
27
29

skipif mysql # not compatible
query I rowsort label-8320
SELECT + + 22 + col2 / + col1 FROM tab1 AS cor0
----
24
27
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 col1 FROM tab0
----
86
91
97

query I rowsort
SELECT + col1 * col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL + 24 * col2 FROM tab0
----
1968
24
792

query I rowsort
SELECT + 91 AS col1 FROM tab0
----
91
91
91

query I rowsort
SELECT ALL 24 + - col0 FROM tab1
----
-40
-56
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-8326
SELECT tab1.col1 * col0 DIV col2 + + 16 FROM tab1
----
17
26
27

skipif mysql # not compatible
query I rowsort label-8326
SELECT tab1.col1 * col0 / col2 + + 16 FROM tab1
----
17
26
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-8327
SELECT 26 DIV + col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-8327
SELECT 26 / + col0 FROM tab1
----
0
0
8

query I rowsort
SELECT DISTINCT 24 * - col0 * + tab2.col0 + + col2 AS col1 FROM tab2
----
-1149
-145990
-149746

query I rowsort
SELECT ALL + + ( col1 ) AS col0 FROM tab0 cor0
----
86
91
97

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT DISTINCT + 83 AS col0 FROM tab0 AS cor0
----
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8332
SELECT ALL - tab0.col0 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8332
SELECT ALL - tab0.col0 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT 56 AS col0 FROM tab0
----
56

query I rowsort
SELECT ALL - ( col2 ) * - ( col0 + cor0.col2 ) FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col0 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + ( col1 ) * + cor0.col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - 8 + cor0.col0 * - col0 AS col0 FROM tab2 cor0
----
-41
-6076
-6233

query I rowsort
SELECT + ( col1 ) + ( col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT 40 + col0 * - 49 FROM tab2
----
-303
-3782
-3831

query I rowsort
SELECT ALL + col2 * - col1 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8341
SELECT ALL + col2 * col2 * CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8341
SELECT ALL + col2 * col2 * CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8342
SELECT - - col2 DIV + 96 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8342
SELECT - - col2 / + 96 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col1 + col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8344
SELECT col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8344
SELECT col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col0 * - col2 col1 FROM tab2 cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-8346
SELECT DISTINCT + col1 DIV - 24 FROM tab0 AS cor0
----
-3
-4

skipif mysql # not compatible
query I rowsort label-8346
SELECT DISTINCT + col1 / - 24 FROM tab0 AS cor0
----
-3
-4

query I rowsort
SELECT ALL col1 * + 90 FROM tab0 AS cor0
----
7740
8190
8730

query I rowsort
SELECT ALL - tab0.col2 * ( col2 ) FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - col1 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL cor0.col2 + ( 6 ) * cor0.col0 AS col2 FROM tab2 cor0
----
494
512
69

query I rowsort
SELECT col2 * ( col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - + col1 * - col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + - col1 + ( col2 ) * - cor0.col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL + col0 * - 82 AS col0 FROM tab2 AS cor0
----
-574
-6396
-6478

query I rowsort
SELECT ALL + col2 * - 13 + - col0 AS col0 FROM tab2 AS cor0
----
-358
-416
-573

query I rowsort
SELECT ALL - + col2 - + col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + cor0.col1 * - col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + 87 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT - 12 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT 68 + - 54 FROM tab1, tab1 cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

onlyif mysql # use DIV operator for integer division
query I rowsort label-8361
SELECT + + col0 DIV col0 + + 33 * cor0.col2 + col1 AS col0 FROM tab2 cor0
----
1272
918
923

skipif mysql # not compatible
query I rowsort label-8361
SELECT + + col0 / col0 + + 33 * cor0.col2 + col1 AS col0 FROM tab2 cor0
----
1272
918
923

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

onlyif mysql # use DIV operator for integer division
query I rowsort label-8363
SELECT + + col0 DIV 88 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8363
SELECT + + col0 / 88 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8364
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8364
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0, tab0 AS cor1, tab2, tab1 cor2
----
3645 values hashing to ae08f1949fd59e00b049f28175217e60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8366
SELECT - col1 + - CAST( - col1 AS SIGNED ) + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8366
SELECT - col1 + - CAST ( - col1 AS INTEGER ) + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8367
SELECT 56 DIV - 97 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8367
SELECT 56 / - 97 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 46 FROM tab0 cor0
----
-46
-46
-46

onlyif mysql # use DIV operator for integer division
query I rowsort label-8369
SELECT + col0 DIV 59 AS col2 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8369
SELECT + col0 / 59 AS col2 FROM tab2 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col1 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col2 * + col2 + + 86 AS col2 FROM tab1 AS cor0
----
-2830
-3163
-9130

query I rowsort
SELECT ALL + + cor0.col2 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col2 + ( col2 ) + col2 col1 FROM tab2 cor0
----
-1368
-624
-675

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + col1 + + ( - col2 ) col0 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8375
SELECT + 39 * cor0.col0 + col1 DIV col0 AS col2 FROM tab1 AS cor0
----
125
2496
3120

skipif mysql # not compatible
query I rowsort label-8375
SELECT + 39 * cor0.col0 + col1 / col0 AS col2 FROM tab1 AS cor0
----
125
2496
3120

query I rowsort
SELECT + col0 * col1 * - col0 FROM tab1
----
-234
-40960
-83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + 36 * + col0 + tab2.col2 col0 FROM tab2
----
286
2912
2961

onlyif mysql # use DIV operator for integer division
query I rowsort label-8378
SELECT ALL tab0.col2 * col0 * col0 + col0 DIV col0 FROM tab0
----
1226
19009
649523

skipif mysql # not compatible
query I rowsort label-8378
SELECT ALL tab0.col2 * col0 * col0 + col0 / col0 FROM tab0
----
1226
19009
649523

query I rowsort
SELECT + ( - 28 ) * col1 FROM tab2
----
-1652
-476
-868

query I rowsort
SELECT - 39 FROM tab1 AS cor0
----
-39
-39
-39

query I rowsort
SELECT + 61 AS col1 FROM tab1 AS cor0
----
61
61
61

query I rowsort
SELECT + cor0.col1 * col2 + + col0 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8383
SELECT cor0.col0 * CAST( NULL AS SIGNED ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8383
SELECT cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 col0 FROM tab0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT 26 * 58 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
1508

query I rowsort
SELECT - + col0 + - col0 * col1 * 69 FROM tab0 AS cor0
----
-142440
-234290
-558920

query I rowsort
SELECT col2 * ( + tab0.col1 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT tab1.col1 + - tab1.col2 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - 43 - + 17 * col1 AS col0 FROM tab1
----
-213
-264
-485

query I rowsort
SELECT 40 * - col2 + - col1 + - ( 96 ) AS col1 FROM tab2
----
-1195
-1207
-1633

query I rowsort
SELECT DISTINCT ( 74 ) FROM tab1 AS cor0
----
74

query I rowsort
SELECT 51 AS col0 FROM tab2 AS cor0
----
51
51
51

query I rowsort
SELECT col2 + 83 * col0 AS col1 FROM tab0 AS cor0
----
2025
2906
7469

query I rowsort
SELECT DISTINCT - - col2 - cor0.col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab2, tab2 cor0
----
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-8396
SELECT ALL + col0 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8396
SELECT ALL + col0 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 66 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-30
12
9

query I rowsort
SELECT ALL - col0 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8399
SELECT col0 * col0 + - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
1224
543
7839

skipif mysql # not compatible
query I rowsort label-8399
SELECT col0 * col0 + - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL + 65 AS col2 FROM tab1 AS cor0
----
65
65
65

query I rowsort
SELECT ALL + col0 * col0 + + col0 AS col0 FROM tab0 AS cor0
----
1260
600
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-8402
SELECT 36 + cor0.col0 DIV + 4 AS col2 FROM tab1 AS cor0
----
36
52
56

skipif mysql # not compatible
query I rowsort label-8402
SELECT 36 + cor0.col0 / + 4 AS col2 FROM tab1 AS cor0
----
36
52
56

query I rowsort
SELECT DISTINCT 62 * col0 AS col0 FROM tab0 AS cor0
----
1488
2170
5518

onlyif mysql # use DIV operator for integer division
query I rowsort label-8404
SELECT DISTINCT - col0 DIV col2 col2 FROM tab1 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8404
SELECT DISTINCT - col0 / col2 col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT + col1 * col1 + 55 AS col0 FROM tab1 AS cor0
----
155
224
731

query I rowsort
SELECT ALL - col0 * col2 + + col1 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8407
SELECT + 8 + + col0 DIV + 74 AS col1 FROM tab2 AS cor0
----
8
9
9

skipif mysql # not compatible
query I rowsort label-8407
SELECT + 8 + + col0 / + 74 AS col1 FROM tab2 AS cor0
----
8
9
9

query I rowsort
SELECT ALL + - cor0.col1 * - col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT col1 + col1 + 46 AS col2 FROM tab0 cor0
----
218
228
240

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - 68 * + col2 AS col2 FROM tab0
----
-2244
-5576
-68

onlyif mysql # use DIV operator for integer division
query I rowsort label-8412
SELECT - ( tab0.col1 ) DIV 83 + - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 0eba5939df2239d1766e37a497daf90f

skipif mysql # not compatible
query I rowsort label-8412
SELECT - ( tab0.col1 ) / 83 + - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 0eba5939df2239d1766e37a497daf90f

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab0 AS cor0
----
37

query I rowsort
SELECT DISTINCT - + col2 * - col0 + - col0 + col1 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
14671
3606
97

query I rowsort
SELECT col1 + - 58 AS col1 FROM tab2 AS cor0
----
-27
-41
1

query I rowsort
SELECT DISTINCT + + cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT cor0.col0 * tab0.col0 * + 35 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 2e8e75f6c06a9907e097367c4dd2dc2e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 col2 FROM tab2
----
20
20
20

query I rowsort
SELECT ALL cor0.col0 * - 6 + - cor0.col0 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 7c704b14fa994e69c045264655a6b741

query I rowsort
SELECT DISTINCT - col1 + ( + 51 ) FROM tab0 AS cor0
----
-35
-40
-46

query I rowsort
SELECT ALL col0 - - cor0.col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + - col0 * 27 FROM tab2 AS cor0
----
-189
-2106
-2133

query I rowsort
SELECT cor0.col1 * 67 AS col2 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 * + col1 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + col1 * cor0.col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT 4 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + col1 * col2 AS col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - + 19 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-108
-43
-54

query I rowsort
SELECT + col0 + - col1 AS col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT - col2 * + col2 + - col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT + - 88 AS col1 FROM tab1 AS cor0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT + - col1 * col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - + 76 * - col1 + col2 FROM tab1 AS cor0
----
1084
2030
817

query I rowsort
SELECT ALL - + ( - col2 ) + col1 * + col1 + col1 FROM tab0 AS cor0
----
7515
8454
9507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8435
SELECT DISTINCT CAST( + col2 AS SIGNED ) - col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-8435
SELECT DISTINCT CAST ( + col2 AS INTEGER ) - col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8436
SELECT + CAST( NULL AS DECIMAL ) AS col1 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8436
SELECT + CAST ( NULL AS REAL ) AS col1 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col2 * - 20 * - 18 FROM tab1
----
19440
20520
34560

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab0 cor0, tab2 AS cor1
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

query I rowsort
SELECT col0 + col1 * col1 AS col2 FROM tab2
----
3559
368
968

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col1 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col0 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT - 91 * 46 AS col2 FROM tab0
----
-4186
-4186
-4186

query I rowsort
SELECT + - 8 AS col2 FROM tab2 AS cor0
----
-8
-8
-8

query I rowsort
SELECT DISTINCT + + 63 AS col1 FROM tab1 AS cor0
----
63

query I rowsort
SELECT DISTINCT col2 + col1 * col0 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-8446
SELECT DISTINCT + 53 + - col2 DIV - col1 FROM tab2 AS cor0
----
53
55

skipif mysql # not compatible
query I rowsort label-8446
SELECT DISTINCT + 53 + - col2 / - col1 FROM tab2 AS cor0
----
53
55

query I rowsort
SELECT ALL + col2 * - col0 + + col0 + col1 FROM tab2 AS cor0
----
-151
-1891
-2906

query I rowsort
SELECT 72 AS col0 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT ALL + col1 * col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL 27 * - col2 + - col1 AS col0 FROM tab1 AS cor0
----
-1484
-1549
-2605

query I rowsort
SELECT DISTINCT - + ( - col2 ) * + col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + 41 + - col2 col0 FROM tab2
----
260
3172
3201

query I rowsort
SELECT DISTINCT cor0.col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8454
SELECT DISTINCT CAST( NULL AS DECIMAL ) + - col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8454
SELECT DISTINCT CAST ( NULL AS REAL ) + - col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col0 + + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + 46 + + col0 * + col0 FROM tab2 AS cor0
----
6130
6287
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8458
SELECT ALL + CAST( NULL AS SIGNED ) + + ( + cor0.col0 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8458
SELECT ALL + CAST ( NULL AS INTEGER ) + + ( + cor0.col0 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col2 * + col1 + 82 FROM tab1
----
1330
1486
652

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8460
SELECT 56 * col0 + - CAST( col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
165
3520
4400

skipif mysql # not compatible
query I rowsort label-8460
SELECT 56 * col0 + - CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
165
3520
4400

query I rowsort
SELECT DISTINCT + 9 * - col0 AS col1 FROM tab1 AS cor0
----
-27
-576
-720

query I rowsort
SELECT DISTINCT + 9 + col2 FROM tab1 cor0
----
105
63
66

query I rowsort
SELECT 71 * + col1 FROM tab0 cor0
----
6106
6461
6887

query I rowsort
SELECT ALL col1 * col1 + + col1 AS col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT + col0 * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - col1 + - col0 * col0 AS col0 FROM tab0 AS cor0
----
-1322
-662
-8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-8467
SELECT DISTINCT col0 DIV - tab1.col0 + col1 * - col2 AS col2 FROM tab1
----
-1249
-1405
-571

skipif mysql # not compatible
query I rowsort label-8467
SELECT DISTINCT col0 / - tab1.col0 + col1 * - col2 AS col2 FROM tab1
----
-1249
-1405
-571

query I rowsort
SELECT ALL + col1 * col0 + + 71 * col2 FROM tab1
----
3912
4687
7856

query I rowsort
SELECT ALL - col0 * col2 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8470
SELECT DISTINCT + col2 + col1 DIV cor0.col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8470
SELECT DISTINCT + col2 + col1 / cor0.col1 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT DISTINCT col2 * 38 AS col0 FROM tab2 AS cor0
----
1026
1444
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8472
SELECT cor0.col0 * + CAST( - cor0.col1 AS SIGNED ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-8472
SELECT cor0.col0 * + CAST ( - cor0.col1 AS INTEGER ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT cor0.col2 + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8474
SELECT - col2 DIV CAST( - col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8474
SELECT - col2 / CAST ( - col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - - cor0.col2 * - 63 - col0 AS col2 FROM tab2 AS cor0
----
-1708
-1716
-2473

query I rowsort
SELECT ALL - col0 * + 73 - + ( + col0 ) FROM tab1 cor0
----
-222
-4736
-5920

query I rowsort
SELECT ALL col2 * + col1 + + 91 FROM tab1 AS cor0
----
1339
1495
661

query I rowsort
SELECT DISTINCT - 10 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT - 13 * col0 FROM tab0 cor0
----
-1157
-312
-455

onlyif mysql # use DIV operator for integer division
query I rowsort label-8481
SELECT - col0 * col2 DIV + ( col1 ) AS col1 FROM tab0 cor0
----
-80
-9
0

skipif mysql # not compatible
query I rowsort label-8481
SELECT - col0 * col2 / + ( col1 ) AS col1 FROM tab0 cor0
----
-80
-9
0

query I rowsort
SELECT col2 + col2 + col1 * - cor0.col2 FROM tab2 AS cor0
----
-1482
-570
-783

query I rowsort
SELECT ALL - ( + col0 + tab0.col2 ) FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL 32 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

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 + + cor0.col0 + + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - - col2 + + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - col2 * + ( cor0.col0 * 69 ) + + 90 FROM tab1 AS cor0
----
-11088
-251622
-529830

query I rowsort
SELECT DISTINCT - 26 FROM tab2, tab0 AS cor0
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 45 col1 FROM tab2 AS cor0
----
-45
-45
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-8491
SELECT + col2 DIV - col0 + col0 * + col0 FROM tab2 AS cor0
----
46
6084
6241

skipif mysql # not compatible
query I rowsort label-8491
SELECT + col2 / - col0 + col0 * + col0 FROM tab2 AS cor0
----
46
6084
6241

query I rowsort
SELECT DISTINCT + + ( 22 ) + cor0.col0 FROM tab2 AS cor0
----
100
101
29

query I rowsort
SELECT - 21 + ( col0 ) AS col1 FROM tab2 cor0
----
-14
57
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-8494
SELECT DISTINCT 26 DIV tab2.col0 col2 FROM tab2, tab1 AS cor0
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8494
SELECT DISTINCT 26 / tab2.col0 col2 FROM tab2, tab1 AS cor0
----
0
3

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 9364ef7545b07c67767dceb70f02c643

query I rowsort
SELECT + 32 AS col1 FROM tab2
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 66 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT 3 FROM tab2
----
3
3
3

query I rowsort
SELECT ALL - + col0 + + cor0.col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - + ( 35 ) * + col2 + + 67 AS col0 FROM tab0 AS cor0
----
-1088
-2803
32

query I rowsort
SELECT 67 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 09fa7af42010457bb3c6ffd0dfea3bc8

query I rowsort
SELECT ALL + 12 AS col1 FROM tab2
----
12
12
12

query I rowsort
SELECT col2 + - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 - - col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + + cor0.col0 + col1 * - cor0.col1 FROM tab0 cor0
----
-7372
-8192
-9374

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

query I rowsort
SELECT ALL - tab1.col1 + - col1 AS col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT DISTINCT tab1.col2 + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT 67 + + 10 FROM tab1, tab2 cor0, tab2 AS cor1
----
77

query I rowsort
SELECT + 74 FROM tab1
----
74
74
74

query I rowsort
SELECT + 56 AS col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

onlyif mysql # use DIV operator for integer division
query I rowsort label-8513
SELECT DISTINCT + col1 DIV col0 + - col2 AS col1 FROM tab0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-8513
SELECT DISTINCT + col1 / col0 + - col2 AS col1 FROM tab0
----
-30
-81
1

query I rowsort
SELECT DISTINCT + col0 + + col0 AS col0 FROM tab0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 82 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8517
SELECT CAST( NULL AS SIGNED ) FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8517
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + col0 * + col0 AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col2 - 24 * cor0.col2 * col1 FROM tab2 cor0
----
-15466
-20061
-36790

query I rowsort
SELECT - + col1 + col2 AS col1 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 48 col0 FROM tab1 AS cor0
----
-48
-48
-48

query I rowsort
SELECT - - ( - col2 ) + col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT - col1 + ( col0 ) AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + tab1.col2 * + col1 AS col1 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8525
SELECT - + CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8525
SELECT - + CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 49 * - col2 + cor0.col1 + - col0 FROM tab1 AS cor0
----
2669
2739
4637

query I rowsort
SELECT ALL - 72 * tab0.col2 AS col0 FROM tab0
----
-2376
-5904
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-8528
SELECT ALL ( col1 ) DIV col2 col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8528
SELECT ALL ( col1 ) / col2 col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8529
SELECT ALL 6 DIV + col0 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8529
SELECT ALL 6 / + col0 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT tab0.col0 - + col2 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT + + col2 * - col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

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 DISTINCT - col2 * - col2 AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + - col2 * + col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col0 + ( - ( - cor0.col1 ) ) * col2 * 62 + - col2 * - col2 AS col2 FROM tab0 cor0
----
177021
469279
5980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + 85 col0 FROM tab0 AS cor0
----
2805
6970
85

query I rowsort
SELECT - col0 * 80 AS col0 FROM tab1 AS cor0
----
-240
-5120
-6400

query I rowsort
SELECT + col2 * - 37 - ( - col2 ) * col1 AS col1 FROM tab0 AS cor0
----
1617
4428
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8539
SELECT ALL + col2 * CAST( NULL AS SIGNED ) + - col2 col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8539
SELECT ALL + col2 * CAST ( NULL AS INTEGER ) + - col2 col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col1 * col2 - col2 * - col1 * - cor0.col2 FROM tab2 AS cor0
----
-21762
-23902
-38350

onlyif mysql # use DIV operator for integer division
query I rowsort label-8541
SELECT + + col1 * - col1 + - col1 + + col0 DIV 92 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

skipif mysql # not compatible
query I rowsort label-8541
SELECT + + col1 * - col1 + - col1 + + col0 / 92 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT + col2 + 66 * 25 FROM tab1 AS cor0
----
1704
1707
1746

query I rowsort
SELECT col2 * col1 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT col0 * - cor0.col1 * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT ALL - col1 * + col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + 99 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + 25 col0 FROM tab2 AS cor0
----
-53
-54
18

query I rowsort
SELECT col0 * + ( - col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - col1 * + ( + 15 ) FROM tab1 AS cor0
----
-150
-195
-390

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8550
SELECT DISTINCT - col1 * CAST( NULL AS SIGNED ) + col2 * col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8550
SELECT DISTINCT - col1 * CAST ( NULL AS INTEGER ) + col2 * col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 * - col2 * col0 - col2 * - col0 FROM tab0 AS cor0
----
26928
605734
70

query I rowsort
SELECT ALL + - col1 * + cor0.col1 + + 66 AS col2 FROM tab1 AS cor0
----
-103
-34
-610

query I rowsort
SELECT + 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-8554
SELECT ALL - + col2 - CAST( NULL AS SIGNED ) * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8554
SELECT ALL - + col2 - CAST ( NULL AS INTEGER ) * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( 93 ) FROM tab0 AS cor0
----
-93
-93
-93

query I rowsort
SELECT + ( col1 ) * col2 + 86 FROM tab1 AS cor0
----
1334
1490
656

query I rowsort
SELECT + + cor0.col1 + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col0 - + 0 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 23 col0 FROM tab0, tab1 AS cor0
----
-23

query I rowsort
SELECT DISTINCT - 77 * + ( col0 ) FROM tab2 AS cor0
----
-539
-6006
-6083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8561
SELECT - - col1 + col2 + col2 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8561
SELECT - - col1 + col2 + col2 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col0 * col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8563
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col2 * col2 / - col1 + + col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8563
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col2 * col2 / - col1 + + col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col0 + + col1 + col2 FROM tab2 AS cor0
----
-24
51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8565
SELECT DISTINCT + - CAST( col1 AS SIGNED ) + col0 FROM tab2 cor0
----
-24
19
62

skipif mysql # not compatible
query I rowsort label-8565
SELECT DISTINCT + - CAST ( col1 AS INTEGER ) + col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT 51 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT ( + 28 ) FROM tab0 AS cor0
----
28
28
28

query I rowsort
SELECT ( - 76 ) * cor0.col2 + 12 * col2 FROM tab2 AS cor0
----
-1664
-1728
-2432

onlyif mysql # use DIV operator for integer division
query I rowsort label-8569
SELECT DISTINCT + col2 DIV + cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8569
SELECT DISTINCT + col2 / + cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - col1 + - cor0.col2 * col2 * + col2 AS col2 FROM tab1 cor0
----
-157490
-185203
-884749

onlyif mysql # use DIV operator for integer division
query I rowsort label-8571
SELECT ALL col0 DIV - col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8571
SELECT ALL col0 / - col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + - cor0.col1 AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - col1 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + 62 * col2 FROM tab2 AS cor0
----
1612
1674
2356

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 40 + col0 col0 FROM tab1 AS cor0
----
104
120
43

query I rowsort
SELECT - 22 * col2 FROM tab2 cor0
----
-572
-594
-836

query I rowsort
SELECT DISTINCT cor0.col0 + col1 * - 95 + - col2 FROM tab0 AS cor0
----
-8179
-8638
-9181

query I rowsort
SELECT ALL - col0 * + cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 31 + - col2 FROM tab2 AS cor0
----
-57
-58
-69

query I rowsort
SELECT DISTINCT 76 + + col1 * col1 AS col2 FROM tab0 AS cor0
----
7472
8357
9485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 + + col1 * + 3 col2 FROM tab2 AS cor0
----
120
203
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8583
SELECT ALL - + col0 * + col2 + col2 DIV ( col0 ) col1 FROM tab0 AS cor0
----
-35
-7298
-791

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8583
SELECT ALL - + col0 * + col2 + col2 / ( col0 ) col1 FROM tab0 AS cor0
----
-35
-7298
-791

query I rowsort
SELECT ALL + 92 * col1 AS col2 FROM tab1 AS cor0
----
1196
2392
920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 * + 2 col0 FROM tab2
----
-14
-14
-14

query I rowsort
SELECT - tab2.col2 + col0 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT + col0 + col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ( - 18 ) - col1 FROM tab1
----
-28
-31
-44

query I rowsort
SELECT ALL - 99 AS col1 FROM tab1 AS cor0
----
-99
-99
-99

query I rowsort
SELECT ALL - col2 * col2 * 62 FROM tab1 AS cor0
----
-180792
-201438
-571392

query I rowsort
SELECT - 93 + + col1 FROM tab2 AS cor0
----
-34
-62
-76

query I rowsort
SELECT DISTINCT + - col2 + col2 - - col1 * - col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + ( - col1 + + col1 ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - 2 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
-2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8595
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-8595
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * ( - cor0.col0 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 + tab2.col1 col0 FROM tab2
----
127
85
99

query I rowsort
SELECT DISTINCT + - 73 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-73

query I rowsort
SELECT ALL - + 82 * + col1 * + col2 AS col2 FROM tab2 AS cor0
----
-125788
-52972
-68634

query I rowsort
SELECT - col2 * col1 + ( + col0 ) FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col0 * col1 + - 82 AS col0 FROM tab2 cor0
----
-1425
-299
-4684

query I rowsort
SELECT DISTINCT + ( 50 ) * - col1 * - cor0.col1 FROM tab0 AS cor0
----
369800
414050
470450

query I rowsort
SELECT col2 * + ( + 71 ) FROM tab1
----
3834
4047
6816

query I rowsort
SELECT 8 + col2 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT DISTINCT - 95 * col0 * col0 + ( - col0 ) * + col0 FROM tab0 AS cor0
----
-117600
-55296
-760416

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col0 col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + ( + col2 ) + - col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT col1 + col1 * - col0 - col2 AS col0 FROM tab1 AS cor0
----
-106
-1123
-687

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT - 76 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT DISTINCT + col2 - + col2 FROM tab2
----
0

query I rowsort
SELECT - 57 FROM tab2
----
-57
-57
-57

query I rowsort
SELECT ALL - col1 + col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 col2 FROM tab2
----
46
46
46

query I rowsort
SELECT 20 AS col1 FROM tab1 AS cor0
----
20
20
20

query I rowsort
SELECT col0 - + col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT col1 * 83 FROM tab2
----
1411
2573
4897

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8617
SELECT ALL + CAST( - col1 AS SIGNED ) + tab0.col0 AS col0 FROM tab0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-8617
SELECT ALL + CAST ( - col1 AS INTEGER ) + tab0.col0 AS col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL - + col2 * - cor0.col2 * col2 + 14 * cor0.col2 * + col0 FROM tab1 AS cor0
----
159732
236265
992256

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8619
SELECT + CAST( 90 AS SIGNED ) + + col0 FROM tab0 AS cor0
----
114
125
179

skipif mysql # not compatible
query I rowsort label-8619
SELECT + CAST ( 90 AS INTEGER ) + + col0 FROM tab0 AS cor0
----
114
125
179

query I rowsort
SELECT ALL col2 + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + + col0 + col0 + - col1 FROM tab1 AS cor0
----
-20
118
147

query I rowsort
SELECT ALL + cor0.col0 + col2 * - col1 * + 46 FROM tab1 AS cor0
----
-26156
-57328
-64581

query I rowsort
SELECT DISTINCT tab1.col2 FROM tab1, tab2 cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8624
SELECT + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-8624
SELECT + CAST ( NULL AS REAL ) FROM tab2 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ALL col2 * ( - col0 + - col0 ) FROM tab0 AS cor0
----
-14596
-1584
-70

query I rowsort
SELECT - col0 + + col0 * 70 AS col2 FROM tab2 AS cor0
----
483
5382
5451

query I rowsort
SELECT - col2 * - 87 + 50 * col2 FROM tab0 cor0
----
11234
137
4521

query I rowsort
SELECT col1 + 38 * + col1 FROM tab2 AS cor0
----
1209
2301
663

query I rowsort
SELECT DISTINCT col2 + - col2 * col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT + - col2 + - cor0.col2 * col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT + col2 + - col0 * + col1 * col0 AS col1 FROM tab2 AS cor0
----
-106059
-1492
-358930

query I rowsort
SELECT DISTINCT - - col0 * + 63 * - col1 AS col1 FROM tab0 AS cor0
----
-130032
-213885
-510237

query I rowsort
SELECT ALL - - col1 * ( - cor0.col0 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 37 col1 FROM tab1 AS cor0
----
-37
-37
-37

query I rowsort
SELECT cor1.col0 AS col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-8636
SELECT - CAST( + ( - col2 ) AS SIGNED ) DIV col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8636
SELECT - CAST ( + ( - col2 ) AS INTEGER ) / col0 AS col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL - + 18 * - col1 FROM tab1 cor0
----
180
234
468

query I rowsort
SELECT + ( 57 ) + + cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to e4e0d28d0cf714c65cf04593ae67aa98

query I rowsort
SELECT ALL + 34 AS col1 FROM tab1 cor0
----
34
34
34

query I rowsort
SELECT + 62 FROM tab2 AS cor0
----
62
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8641
SELECT DISTINCT - ( + cor0.col2 ) DIV col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8641
SELECT DISTINCT - ( + cor0.col2 ) / col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - - col2 + + col0 FROM tab0 cor0
----
171
36
57

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 CROSS JOIN tab0, tab0 AS cor1
----
972 values hashing to b2fa3f9d060540fe1eb4ad1c0754e163

query I rowsort
SELECT - col1 * - 0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * - col0 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 + tab2.col2 AS col0 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8649
SELECT - col2 DIV + cor0.col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8649
SELECT - col2 / + cor0.col1 AS col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8650
SELECT col1 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8650
SELECT col1 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + col1 * 1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8652
SELECT + col2 DIV cor0.col0 AS col0 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8652
SELECT + col2 / cor0.col0 AS col0 FROM tab0 cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8653
SELECT DISTINCT + tab2.col0 + col1 DIV col1 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-8653
SELECT DISTINCT + tab2.col0 + col1 / col1 FROM tab2
----
79
8
80

query I rowsort
SELECT 32 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

query I rowsort
SELECT ALL col2 + + col2 * - col1 AS col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT 83 FROM tab1, tab2 AS cor0
----
83

query I rowsort
SELECT + - col1 * 77 AS col1 FROM tab2 AS cor0
----
-1309
-2387
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-8658
SELECT tab1.col2 DIV + col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8658
SELECT tab1.col2 / + col1 AS col2 FROM tab1
----
2
5
7

query I rowsort
SELECT + 95 FROM tab2, tab0 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8660
SELECT ALL CAST( NULL AS DECIMAL ) * + 93 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8660
SELECT ALL CAST ( NULL AS REAL ) * + 93 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 68 FROM tab2, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT DISTINCT - + cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - + col2 col1 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT col2 * 41 * + col0 - - col2 * + col2 * - col1 AS col1 FROM tab0
----
-312666
-61182
1338

query I rowsort
SELECT DISTINCT col0 * - col2 + col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL - 96 * 82 AS col1 FROM tab2
----
-7872
-7872
-7872

query I rowsort
SELECT ALL + 63 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT DISTINCT tab2.col0 * + col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col2 * + col1 * + col2 AS col0 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT + + col1 + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - col1 * col2 AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + col2 * + cor0.col1 - col1 AS col0 FROM tab0 cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + col0 * - ( - 49 ) * col0 col1 FROM tab1 AS cor0
----
200761
313696
495

query I rowsort
SELECT 88 FROM tab0
----
88
88
88

query I rowsort
SELECT + col1 * + col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + + cor0.col2 * col0 + - col1 AS col0 FROM tab0 AS cor0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - col2 * cor0.col1 col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT + 21 FROM tab2
----
21

query I rowsort
SELECT + cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8680
SELECT ALL col0 * col1 + - cor0.col1 DIV + col1 FROM tab2 AS cor0
----
1342
216
4601

skipif mysql # not compatible
query I rowsort label-8680
SELECT ALL col0 * col1 + - cor0.col1 / + col1 FROM tab2 AS cor0
----
1342
216
4601

query I rowsort
SELECT DISTINCT - 49 + + col0 FROM tab0 AS cor0
----
-14
-25
40

query I rowsort
SELECT DISTINCT + col2 * col1 + + col2 * 53 FROM tab1 AS cor0
----
3591
4266
6336

query I rowsort
SELECT 72 + col2 AS col1 FROM tab2 AS cor0
----
110
98
99

query I rowsort
SELECT ALL - 76 FROM tab2 AS cor0
----
-76
-76
-76

query I rowsort
SELECT ALL col2 * col2 + - col1 FROM tab2
----
1427
617
698

query I rowsort
SELECT DISTINCT - tab1.col2 * col2 + col1 * col2 FROM tab1
----
-1512
-2679
-7968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8687
SELECT ALL + CAST( - col2 AS SIGNED ) + tab0.col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8687
SELECT ALL + CAST ( - col2 AS INTEGER ) + tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - 61 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8689
SELECT - ( + tab0.col2 * CAST( NULL AS SIGNED ) ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8689
SELECT - ( + tab0.col2 * CAST ( NULL AS INTEGER ) ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8690
SELECT ALL + col0 * + col0 * + ( + col1 ) + cor0.col2 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8690
SELECT ALL + col0 * + col0 * + ( + col1 ) + cor0.col2 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + col2 AS col1 FROM tab2 cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 92 col0 FROM tab0
----
92

query I rowsort
SELECT + cor0.col1 FROM tab2, tab1, tab2 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL + col0 * + col0 - - col1 FROM tab2
----
6143
6258
80

skipif mysql # not compatible
query I rowsort
SELECT - col1 + + CAST ( ( col0 ) AS REAL ) * - cor0.col2 FROM tab2 cor0
----
-2087
-220
-3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - col1 col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT ALL col0 - - col1 FROM tab2
----
137
38
96

query I rowsort
SELECT - col1 + ( - col2 ) FROM tab1
----
-109
-67
-80

query I rowsort
SELECT col0 + 47 + - 8 AS col2 FROM tab2
----
117
118
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8700
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) + col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8700
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) + col1 FROM tab1
----
NULL

query I rowsort
SELECT + - 96 + - col1 * col0 FROM tab2 AS cor0
----
-1439
-313
-4698

query I rowsort
SELECT + 50 * - col2 FROM tab2 cor0
----
-1300
-1350
-1900

query I rowsort
SELECT ALL - 27 FROM tab1 AS cor0
----
-27
-27
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * col0 + - col1 + 26 col1 FROM tab2 AS cor0
----
184
1995
3011

query I rowsort
SELECT ALL + + ( col1 ) * col2 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + + col1 * col1 + + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT - ( + col0 ) + col0 * col1 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL col1 + col0 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - ( + 6 ) - col0 FROM tab0 AS cor0
----
-30
-41
-95

query I rowsort
SELECT DISTINCT + col0 * col1 + + col2 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT + + col1 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-8712
SELECT DISTINCT + col0 DIV col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-8712
SELECT DISTINCT + col0 / col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL - col1 * 17 * - col1 AS col1 FROM tab0 cor0
----
125732
140777
159953

query I rowsort
SELECT + + col2 * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 57 * - col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

query I rowsort
SELECT + - col0 + + 94 FROM tab1 cor0
----
14
30
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8717
SELECT ALL + CAST( - cor0.col2 AS SIGNED ) + - col2 AS col2 FROM tab2 cor0
----
-52
-54
-76

skipif mysql # not compatible
query I rowsort label-8717
SELECT ALL + CAST ( - cor0.col2 AS INTEGER ) + - col2 AS col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT 10 + + 25 * col1 + - 87 AS col1 FROM tab2
----
1398
348
698

query I rowsort
SELECT DISTINCT col1 + + col1 + - col2 FROM tab0
----
100
139
193

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + 45 FROM tab2
----
45
45
45

query I rowsort
SELECT ALL 97 AS col1 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT ALL cor1.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + + col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - 0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8726
SELECT DISTINCT 73 DIV ( col0 + - cor0.col2 ) FROM tab1 AS cor0
----
-1
-4
10

skipif mysql # not compatible
query I rowsort label-8726
SELECT DISTINCT 73 / ( col0 + - cor0.col2 ) FROM tab1 AS cor0
----
-1
-4
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-8727
SELECT - + CAST( 85 AS SIGNED ) DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8727
SELECT - + CAST ( 85 AS INTEGER ) / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + + col1 * col0 AS col0 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8730
SELECT + + 84 DIV col1 FROM tab1 cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-8730
SELECT + + 84 / col1 FROM tab1 cor0
----
3
6
8

query I rowsort
SELECT + col0 + col0 * col0 AS col2 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL + - col0 * - col2 - - 71 AS col1 FROM tab1 cor0
----
233
3719
7751

query I rowsort
SELECT ALL + col1 * col0 + ( + 7 ) FROM tab2 AS cor0
----
1350
224
4609

query I rowsort
SELECT DISTINCT - col1 - - col2 * + 54 AS col2 FROM tab0 AS cor0
----
-43
1696
4337

query I rowsort
SELECT + 18 + col2 * 81 FROM tab2 cor0
----
2124
2205
3096

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8736
SELECT ALL col1 + col1 / CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8736
SELECT ALL col1 + col1 / CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 93 AS col2 FROM tab2 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8738
SELECT DISTINCT ( col2 ) DIV - col2 + col2 + + col0 FROM tab0
----
170
35
56

skipif mysql # not compatible
query I rowsort label-8738
SELECT DISTINCT ( col2 ) / - col2 + col2 + + col0 FROM tab0
----
170
35
56

query I rowsort
SELECT DISTINCT + tab0.col2 + 62 FROM tab0
----
144
63
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8740
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-8740
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col1 FROM tab2
----
NULL

query I rowsort
SELECT - - 86 + col1 AS col0 FROM tab2 AS cor0
----
103
117
145

query I rowsort
SELECT + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8743
SELECT + col0 DIV cor0.col2 AS col1 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8743
SELECT + col0 / cor0.col2 AS col1 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT ALL + cor0.col1 * + ( - 21 ) AS col0 FROM tab2 AS cor0
----
-1239
-357
-651

query I rowsort
SELECT DISTINCT col0 + 33 * - ( + col2 * ( + col1 ) ) AS col2 FROM tab1 AS cor0
----
-18746
-41104
-46329

query I rowsort
SELECT DISTINCT + col1 * + col1 + - 98 * - cor0.col0 FROM tab1 AS cor0
----
6372
8009
970

query I rowsort
SELECT ALL col2 + 18 AS col0 FROM tab0 cor0
----
100
19
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8748
SELECT ALL + + col1 * CAST( NULL AS SIGNED ) + col2 + - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8748
SELECT ALL + + col1 * CAST ( NULL AS INTEGER ) + col2 + - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * + col2 * col0 AS col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL - + col1 * col2 + + col0 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-8751
SELECT + - col0 DIV + CAST( + col0 + cor0.col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8751
SELECT + - col0 / + CAST ( + col0 + cor0.col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 + - ( + 64 ) * cor0.col2 + + col0 AS col2 FROM tab1 AS cor0
----
-3450
-3520
-5984

query I rowsort
SELECT ALL - 63 FROM tab1, tab2, tab1 cor0
----
27 values hashing to fc0b533c2773a0a802e1fc8317dcebf2

query I rowsort
SELECT DISTINCT + col0 * col2 * - col1 FROM tab0 cor0
----
-3395
-664118
-68112

skipif mysql # not compatible
query I rowsort
SELECT + col0 + CAST ( - cor0.col0 AS REAL ) FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - 54 * + 69 + + col0 col1 FROM tab1 AS cor0
----
37324
48518
96879

query I rowsort
SELECT DISTINCT - - col1 - 34 AS col2 FROM tab2 AS cor0
----
-17
-3
25

query I rowsort
SELECT DISTINCT col2 * + 47 FROM tab0 AS cor0
----
1551
3854
47

query I rowsort
SELECT + 62 + cor0.col2 * col2 + col1 * col0 FROM tab2 AS cor0
----
1008
2849
5340

query I rowsort
SELECT ALL - 82 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

query I rowsort
SELECT ALL col1 * + 35 + + col0 * col1 - 25 FROM tab2
----
1277
1913
6642

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT col2 + - col2 + - cor0.col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - col2 + + col0 AS col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2, tab1 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT DISTINCT col0 - + 82 FROM tab2
----
-3
-4
-75

query I rowsort
SELECT ALL col1 + + col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT cor0.col0 + 40 - 74 FROM tab0, tab2 AS cor0
----
-27
44
45

query I rowsort
SELECT DISTINCT + col0 + col2 AS col0 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8770
SELECT col2 DIV tab0.col0 AS col1 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8770
SELECT col2 / tab0.col0 AS col1 FROM tab0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8771
SELECT cor0.col1 DIV 74 + + col2 col2 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8771
SELECT cor0.col1 / 74 + + col2 col2 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8772
SELECT col2 + col2 DIV ( + col1 ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8772
SELECT col2 + col2 / ( + col1 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - ( col1 ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT 16 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT DISTINCT 49 * - col1 FROM tab1
----
-1274
-490
-637

query I rowsort
SELECT + col2 + + col0 + + 52 FROM tab1 AS cor0
----
109
173
228

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8777
SELECT - col0 * CAST( NULL AS SIGNED ) * 22 + cor0.col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8777
SELECT - col0 * CAST ( NULL AS INTEGER ) * 22 + cor0.col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8778
SELECT + col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8778
SELECT + col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8779
SELECT ALL + col0 * - 98 + 57 DIV + col0 + + 1 FROM tab2 AS cor0
----
-677
-7643
-7741

skipif mysql # not compatible
query I rowsort label-8779
SELECT ALL + col0 * - 98 + 57 / + col0 + + 1 FROM tab2 AS cor0
----
-677
-7643
-7741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8781
SELECT - col1 * - col2 / col2 + - col2 * + CAST( NULL AS SIGNED ) * 6 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8781
SELECT - col1 * - col2 / col2 + - col2 * + CAST ( NULL AS INTEGER ) * 6 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 col2 FROM tab1 WHERE NOT col2 * - col1 NOT BETWEEN ( NULL ) AND col0 + col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col2 + - col1 * + col0 * col0 col1 FROM tab1
----
-288
-41017
-83296

query I rowsort
SELECT DISTINCT col0 * - col0 + col2 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT - col2 + col1 * col0 AS col0 FROM tab1
----
24
583
944

query I rowsort
SELECT DISTINCT col1 + - col0 AS col1 FROM tab0
----
2
62

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT + tab0.col0 + + col1 * + col2 * - col2 AS col0 FROM tab0
----
-611795
-62
-93630

query I rowsort
SELECT DISTINCT col0 - + col2 AS col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT tab2.col0 + + col0 FROM tab2
----
14
156
158

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT 32 - col1 FROM tab2 cor0
----
-27
1
15

query I rowsort
SELECT 97 * tab1.col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 9b8b41764acadcf6672a8750d607c130

query I rowsort
SELECT DISTINCT - 71 + cor1.col0 FROM tab2, tab0 cor0, tab2 AS cor1
----
-64
7
8

query I rowsort
SELECT ALL - + col1 * - col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-8796
SELECT + col0 + + col0 DIV + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-8796
SELECT + col0 + + col0 / + col0 FROM tab1
----
4
65
81

query I rowsort
SELECT - + ( cor0.col1 ) * - col1 + - col1 AS col1 FROM tab1 cor0
----
156
650
90

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 ALL tab0.col2 FROM tab0 WHERE NOT + col2 IN ( + col2 * - col0 - - col1 )
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8800
SELECT DISTINCT - col1 DIV - col0 + col2 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-8800
SELECT DISTINCT - col1 / - col0 + col2 FROM tab2
----
26
31
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col1 col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT cor0.col1 * col1 AS col0 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT + - col1 * col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT 25 * col2 * 63 AS col1 FROM tab1 AS cor0
----
151200
85050
89775

onlyif mysql # use DIV operator for integer division
query I rowsort label-8805
SELECT + col0 DIV - col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8805
SELECT + col0 / - col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT 9 * col0 AS col1 FROM tab1 cor0
----
27
576
720

query I rowsort
SELECT ALL - col0 * - ( + col0 ) AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - - col2 * 27 AS col2 FROM tab1 AS cor0
----
1458
1539
2592

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor2.col2 col0 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

query I rowsort
SELECT col0 + 67 + col2 FROM tab1 AS cor0
----
124
188
243

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to a3c09af95301183ccb084eb1936b14e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8812
SELECT - col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8812
SELECT - col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - tab0.col1 * col1 AS col0 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT - + 94 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

query I rowsort
SELECT ALL 56 * col1 AS col2 FROM tab2
----
1736
3304
952

onlyif mysql # use DIV operator for integer division
query I rowsort label-8816
SELECT ALL - col1 DIV ( ( - col1 ) ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8816
SELECT ALL - col1 / ( ( - col1 ) ) FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-8818
SELECT + 56 DIV + col2 + col0 FROM tab1 cor0
----
4
64
80

skipif mysql # not compatible
query I rowsort label-8818
SELECT + 56 / + col2 + col0 FROM tab1 cor0
----
4
64
80

query I rowsort
SELECT + 53 * 83 FROM tab2 AS cor0
----
4399
4399
4399

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0, tab1 cor0, tab1 AS cor1, tab1 cor2
----
3
64
80

query I rowsort
SELECT DISTINCT - 33 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-33

query I rowsort
SELECT col1 * + col2 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT + + col2 - ( + col0 + - 76 * 57 ) FROM tab0 AS cor0
----
4298
4325
4341

onlyif mysql # use DIV operator for integer division
query I rowsort label-8824
SELECT DISTINCT ( col2 ) DIV - tab0.col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8824
SELECT DISTINCT ( col2 ) / - tab0.col0 FROM tab0
----
-1
0

query I rowsort
SELECT 44 AS col2 FROM tab0
----
44
44
44

query I rowsort
SELECT + 24 FROM tab2 AS cor0
----
24
24
24

query I rowsort
SELECT ALL col1 * + col2 * + col0 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-8828
SELECT ALL + col2 DIV - 31 FROM tab1
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-8828
SELECT ALL + col2 / - 31 FROM tab1
----
-1
-1
-3

query I rowsort
SELECT - 74 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT ALL + 78 AS col1 FROM tab1
----
78
78
78

query I rowsort
SELECT DISTINCT - col0 * + 34 FROM tab2
----
-238
-2652
-2686

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + 17 * - cor0.col1 FROM tab0, tab1 cor0
----
-170
-221
-442

query I rowsort
SELECT ALL + col0 * + 7 FROM tab0
----
168
245
623

query I rowsort
SELECT DISTINCT ( - col1 ) AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT 27 AS col1 FROM tab1
----
27
27
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8837
SELECT ALL - col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8837
SELECT ALL - col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col2 + + 67 * col0 col2 FROM tab0 AS cor0
----
12687
2346
2697

onlyif mysql # use DIV operator for integer division
query I rowsort label-8840
SELECT col0 DIV - cor0.col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8840
SELECT col0 / - cor0.col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col2 + 63 + - 28 * - col0 AS col0 FROM tab0 AS cor0
----
1044
2637
768

query I rowsort
SELECT + col2 * 72 AS col2 FROM tab1 AS cor0
----
3888
4104
6912

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab2 cor1, tab1, tab2 AS cor2
----
3645 values hashing to 3a186ad492d315801f56fb30a5e89dbb

query I rowsort
SELECT ALL - col2 + - col0 + - 96 AS col0 FROM tab0 AS cor0
----
-132
-153
-267

query I rowsort
SELECT + col1 * + 88 + col1 FROM tab0 AS cor0
----
7654
8099
8633

query I rowsort
SELECT DISTINCT - - col2 + col2 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-8847
SELECT col1 DIV - col1 + + col1 AS col0 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-8847
SELECT col1 / - col1 + + col1 AS col0 FROM tab2 AS cor0
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col1 col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT - col2 + - 66 AS col1 FROM tab2
----
-104
-92
-93

query I rowsort
SELECT DISTINCT tab2.col1 * col1 + ( col1 * - col0 ) FROM tab2
----
-1054
-1121
744

onlyif mysql # use DIV operator for integer division
query I rowsort label-8851
SELECT + col2 DIV - cor0.col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8851
SELECT + col2 / - cor0.col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT 29 + - 77 FROM tab0 AS cor0
----
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-8853
SELECT ALL - cor0.col2 DIV - cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8853
SELECT ALL - cor0.col2 / - cor0.col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT - + col0 * - 8 AS col1 FROM tab0 cor0
----
192
280
712

onlyif mysql # use DIV operator for integer division
query I rowsort label-8855
SELECT DISTINCT - col0 * col2 DIV - col2 col2 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8855
SELECT DISTINCT - col0 * col2 / - col2 col2 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 99 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

onlyif mysql # use DIV operator for integer division
query I rowsort label-8857
SELECT + col0 DIV 10 + col1 * - col0 AS col1 FROM tab1
----
-1032
-634
-78

skipif mysql # not compatible
query I rowsort label-8857
SELECT + col0 / 10 + col1 * - col0 AS col1 FROM tab1
----
-1032
-634
-78

query I rowsort
SELECT DISTINCT col2 * + col2 + - col2 FROM tab1
----
2862
3192
9120

query I rowsort
SELECT ALL + - 24 + + col2 * - col1 FROM tab1 cor0
----
-1272
-1428
-594

query I rowsort
SELECT DISTINCT - col2 - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL + 1 FROM tab1, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL + col1 * + col1 + - col0 AS col2 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL + + col1 + - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - 45 + col2 * 79 FROM tab2 AS cor0
----
2009
2088
2957

query I rowsort
SELECT DISTINCT ( - col0 ) * - 24 FROM tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT ALL + 49 + - cor0.col2 * 69 * - col2 AS col1 FROM tab1 AS cor0
----
201253
224230
635953

onlyif mysql # use DIV operator for integer division
query I rowsort label-8867
SELECT ALL 14 DIV col2 - - col2 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8867
SELECT ALL 14 / col2 - - col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + col0 * cor0.col1 + + ( 93 ) FROM tab1 AS cor0
----
1133
171
733

query I rowsort
SELECT cor0.col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - ( col2 * - col0 ) FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 col2 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8872
SELECT DISTINCT + col2 - col2 DIV - 63 AS col2 FROM tab1
----
54
57
97

skipif mysql # not compatible
query I rowsort label-8872
SELECT DISTINCT + col2 - col2 / - 63 AS col2 FROM tab1
----
54
57
97

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT - + col1 * col0 + - ( col2 + + col0 ) AS col1 FROM tab2 AS cor0
----
-1460
-251
-4706

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + 89 - - col1 FROM tab2
----
106
120
148

query I rowsort
SELECT DISTINCT + tab2.col0 * + col1 + + ( + 67 ) AS col2 FROM tab2
----
1410
284
4669

query I rowsort
SELECT DISTINCT - tab0.col2 + col0 * - tab0.col1 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL col1 - + tab2.col1 * col1 AS col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT 79 - col2 FROM tab0
----
-3
46
78

query I rowsort
SELECT col2 + col1 - - col2 FROM tab1
----
124
134
205

query I rowsort
SELECT DISTINCT + - col0 - cor0.col1 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8883
SELECT DISTINCT - col0 DIV col0 - 9 AS col1 FROM tab2 AS cor0
----
-10

skipif mysql # not compatible
query I rowsort label-8883
SELECT DISTINCT - col0 / col0 - 9 AS col1 FROM tab2 AS cor0
----
-10

query I rowsort
SELECT DISTINCT - 14 * + col0 AS col1 FROM tab2 AS cor0
----
-1092
-1106
-98

query I rowsort
SELECT 9 + col0 + ( ( col0 ) * col2 ) FROM tab0
----
7396
79
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-8886
SELECT DISTINCT tab2.col2 + tab2.col0 DIV 88 AS col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8886
SELECT DISTINCT tab2.col2 + tab2.col0 / 88 AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT col2 * col2 + ( col2 ) * + tab0.col2 AS col1 FROM tab0
----
13448
2
2178

query I rowsort
SELECT DISTINCT + - col2 + - ( col2 + + cor0.col1 ) FROM tab0 cor0
----
-152
-255
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-8889
SELECT ALL + cor0.col2 DIV col2 - + col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-8889
SELECT ALL + cor0.col2 / col2 - + col1 FROM tab1 AS cor0
----
-12
-25
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8890
SELECT + col2 - + 18 DIV - 83 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8890
SELECT + col2 - + 18 / - 83 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL + col0 + + col2 * col0 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8892
SELECT + col2 - CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-8892
SELECT + col2 - CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + + col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - cor0.col0 - col0 * col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - col1 + - col0 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + col2 * - 72 FROM tab2 AS cor0
----
-1872
-1944
-2736

query I rowsort
SELECT + col2 * ( col2 ) + + col1 + + 58 FROM tab0 cor0
----
1233
156
6873

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + 13 col2 FROM tab0 AS cor0
----
-1066
-13
-429

query I rowsort
SELECT col0 - + col2 FROM tab2 cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-8900
SELECT ALL + col0 * - cor0.col1 DIV col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-8900
SELECT ALL + col0 * - cor0.col1 / col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8901
SELECT cor0.col1 * col1 + col2 DIV - col1 + ( - col2 ) FROM tab0 AS cor0
----
7363
8199
9408

skipif mysql # not compatible
query I rowsort label-8901
SELECT cor0.col1 * col1 + col2 / - col1 + ( - col2 ) FROM tab0 AS cor0
----
7363
8199
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 92 ) col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT ALL - ( 84 ) * + col1 AS col1 FROM tab0
----
-7224
-7644
-8148

onlyif mysql # use DIV operator for integer division
query I rowsort label-8904
SELECT DISTINCT 91 DIV cor0.col2 FROM tab0 AS cor0
----
1
2
91

skipif mysql # not compatible
query I rowsort label-8904
SELECT DISTINCT 91 / cor0.col2 FROM tab0 AS cor0
----
1
2
91

query I rowsort
SELECT col2 + + tab2.col1 * col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT DISTINCT - ( - col0 + + col0 ) * col0 AS col1 FROM tab0
----
0

query I rowsort
SELECT ( - col0 ) * col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL col0 * - col1 + - col1 AS col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT DISTINCT - ( 25 ) * col1 FROM tab2 cor0
----
-1475
-425
-775

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( 22 AS REAL ) col2 FROM tab0 AS cor0
----
-22
-22
-22

onlyif mysql # use DIV operator for integer division
query I rowsort label-8911
SELECT + col0 * + ( col2 ) + col1 + col2 DIV col1 col0 FROM tab1 AS cor0
----
190
3663
7700

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8911
SELECT + col0 * + ( col2 ) + col1 + col2 / col1 col0 FROM tab1 AS cor0
----
190
3663
7700

query I rowsort
SELECT ALL - - 18 AS col2 FROM tab1 AS cor0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + col0 col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - col2 + + ( - col2 ) AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT col0 * + 47 FROM tab0 AS cor0
----
1128
1645
4183

query I rowsort
SELECT DISTINCT col2 * + col2 + - col1 FROM tab0 AS cor0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-8917
SELECT - 72 + - cor0.col0 DIV + cor0.col1 AS col0 FROM tab2 AS cor0
----
-72
-73
-76

skipif mysql # not compatible
query I rowsort label-8917
SELECT - 72 + - cor0.col0 / + cor0.col1 AS col0 FROM tab2 AS cor0
----
-72
-73
-76

query I rowsort
SELECT - cor0.col0 * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - 58 AS col0 FROM tab1 cor0
----
-58
-58
-58

query I rowsort
SELECT + ( + col1 ) * 14 FROM tab0 cor0
----
1204
1274
1358

query I rowsort
SELECT col2 + - col0 * + col1 FROM tab1
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-8923
SELECT + ( col1 ) + col0 DIV col1 AS col2 FROM tab2 AS cor0
----
21
31
60

skipif mysql # not compatible
query I rowsort label-8923
SELECT + ( col1 ) + col0 / col1 AS col2 FROM tab2 AS cor0
----
21
31
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-8924
SELECT + - col0 DIV + col1 - + col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8924
SELECT + - col0 / + col1 - + col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + col2 + - 3 AS col2 FROM tab2 AS cor0
----
23
24
35

query I rowsort
SELECT - col0 * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8927
SELECT + col2 * + col1 - + col2 DIV - ( 76 ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-8927
SELECT + col2 * + col1 - + col2 / - ( 76 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + 89 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT + tab0.col1 + + col2 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab0, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - 32 AS col2 FROM tab0 AS cor0
----
-32
-32
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8932
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8932
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col0 * - col0 + 72 FROM tab1 AS cor0
----
-4024
-6328
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) + col1 + + col1 col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT col0 * + 63 AS col2 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT col0 + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL + 55 + + col0 * col1 FROM tab2 AS cor0
----
1398
272
4657

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 97 ) col2 FROM tab1 AS cor0
----
-97
-97
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8939
SELECT 18 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8939
SELECT 18 / + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT tab2.col0 + + col1 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT - ( col0 + 3 ) FROM tab0
----
-27
-38
-92

query I rowsort
SELECT 1 + + 67 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT DISTINCT cor0.col0 + - 25 AS col1 FROM tab2 AS cor0
----
-18
53
54

query I rowsort
SELECT + + col0 * - col0 * - cor0.col1 AS col1 FROM tab2 cor0
----
106097
1519
358956

query I rowsort
SELECT ALL + col0 * + 38 - col2 AS col2 FROM tab2 AS cor0
----
239
2938
2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8947
SELECT - + col0 + CAST( 51 AS SIGNED ) FROM tab1 AS cor0
----
-13
-29
48

skipif mysql # not compatible
query I rowsort label-8947
SELECT - + col0 + CAST ( 51 AS INTEGER ) FROM tab1 AS cor0
----
-13
-29
48

query I rowsort
SELECT 31 FROM tab1, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT - col2 + - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - col2 * + 65 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT DISTINCT col1 + ( - 22 ) AS col1 FROM tab2
----
-5
37
9

query I rowsort
SELECT + 16 * - cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6d54e796162cbe1c1476146788d82d0b

query I rowsort
SELECT + ( + 83 ) FROM tab1
----
83
83
83

query I rowsort
SELECT + + col1 * col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT cor0.col0 + col2 * + col0 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8956
SELECT ALL col1 * col0 * + col2 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8956
SELECT ALL col1 * col0 * + col2 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 95 * - col2 FROM tab2 AS cor0
----
-2470
-2565
-3610

query I rowsort
SELECT 52 * - col2 + col1 FROM tab1 cor0
----
-2782
-2954
-4979

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8959
SELECT ALL - col2 * tab1.col1 * - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8959
SELECT ALL - col2 * tab1.col1 * - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 84 * + col1 AS col0 FROM tab2
----
1428
2604
4956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT - col0 * col2 + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-8963
SELECT - + col2 * col0 + - col1 DIV col1 AS col2 FROM tab0 AS cor0
----
-36
-7299
-793

skipif mysql # not compatible
query I rowsort label-8963
SELECT - + col2 * col0 + - col1 / col1 AS col2 FROM tab0 AS cor0
----
-36
-7299
-793

query I rowsort
SELECT + + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col0 + + 68 * - col0 AS col2 FROM tab1 AS cor0
----
-201
-4288
-5360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 * col1 col0 FROM tab1
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8967
SELECT col1 + + col2 * ( col2 * - col1 + + CAST( col2 AS SIGNED ) ) FROM tab2
----
-21839
-23087
-39149

skipif mysql # not compatible
query I rowsort label-8967
SELECT col1 + + col2 * ( col2 * - col1 + + CAST ( col2 AS INTEGER ) ) FROM tab2
----
-21839
-23087
-39149

query I rowsort
SELECT DISTINCT tab1.col1 + - 13 AS col2 FROM tab1
----
-3
0
13

query I rowsort
SELECT - cor0.col0 + + 90 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
110
38
49

query I rowsort
SELECT - 30 - col2 AS col0 FROM tab2 AS cor0
----
-56
-57
-68

query I rowsort
SELECT DISTINCT col1 * - 71 FROM tab1 AS cor0
----
-1846
-710
-923

query I rowsort
SELECT ALL - col0 * col1 + - col0 AS col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT ALL 41 * + 33 FROM tab1 AS cor0
----
1353
1353
1353

query I rowsort
SELECT ALL - col2 + ( - col2 ) FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8975
SELECT - CAST( NULL AS SIGNED ) + col2 * + cor0.col1 + - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8975
SELECT - CAST ( NULL AS INTEGER ) + col2 * + cor0.col1 + - cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 - 19 AS col1 FROM tab2 AS cor0
----
-12
59
60

query I rowsort
SELECT DISTINCT + - cor0.col2 * - col2 + ( + 37 ) * - col2 AS col0 FROM tab0 AS cor0
----
-132
-36
3690

query I rowsort
SELECT - 60 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
26
31
37

query I rowsort
SELECT ALL + 49 FROM tab1 AS cor0
----
49
49
49

query I rowsort
SELECT ALL - - ( + col2 ) * - ( col1 ) + - col1 * - ( - col2 ) FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT - - col2 * - col1 + 81 + cor0.col1 AS col0 FROM tab0 cor0
----
-2671
-7290
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * + col0 col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + - col2 + 55 FROM tab1 AS cor0
----
-2
-41
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8984
SELECT - + col0 DIV - col0 col1 FROM tab1 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8984
SELECT - + col0 / - col0 col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + cor0.col2 + - 8 * + col2 AS col1 FROM tab2 AS cor0
----
-182
-189
-266

onlyif mysql # use DIV operator for integer division
query I rowsort label-8986
SELECT DISTINCT col2 DIV + CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8986
SELECT DISTINCT col2 / + CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8987
SELECT ALL - col0 DIV col1 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-8987
SELECT ALL - col0 / col1 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT + col1 * 3 AS col2 FROM tab1 cor0
----
30
39
78

query I rowsort
SELECT ALL + + col0 * col1 + col0 AS col1 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT col1 * - 58 FROM tab2 AS cor0
----
-1798
-3422
-986

query I rowsort
SELECT DISTINCT + + col2 + 63 * col2 FROM tab1 AS cor0
----
3456
3648
6144

onlyif mysql # use DIV operator for integer division
query I rowsort label-8992
SELECT DISTINCT - col0 DIV + col0 + 7 * + col1 FROM tab0 cor0
----
601
636
678

skipif mysql # not compatible
query I rowsort label-8992
SELECT DISTINCT - col0 / + col0 + 7 * + col1 FROM tab0 cor0
----
601
636
678

query I rowsort
SELECT DISTINCT + cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT - - 72 AS col1 FROM tab1 AS cor0
----
72

query I rowsort
SELECT + col1 + + col0 * - col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + ( - cor0.col2 ) AS col2 FROM tab2 cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8997
SELECT - col0 DIV 53 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-8997
SELECT - col0 / 53 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT 82 FROM tab2 AS cor0
----
82

query I rowsort
SELECT ALL 92 + cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 2bd2c08456d1ada0768c73d105c0b427

onlyif mysql # use DIV operator for integer division
query I rowsort label-9000
SELECT DISTINCT - col1 DIV 28 FROM tab0
----
-3

skipif mysql # not compatible
query I rowsort label-9000
SELECT DISTINCT - col1 / 28 FROM tab0
----
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9001
SELECT DISTINCT - CAST( + col0 AS SIGNED ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-9001
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col2 * + 54 FROM tab1 AS cor0
----
2916
3078
5184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9003
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9003
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 11 * - cor0.col0 FROM tab0 AS cor0
----
-264
-385
-979

query I rowsort
SELECT col0 * + 8 FROM tab2 AS cor0
----
56
624
632

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 1 col2 FROM tab2 AS cor0
----
1

query I rowsort
SELECT - 35 AS col1 FROM tab1 AS cor0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - ( col2 ) * - cor0.col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT tab2.col0 + - ( col0 ) * col2 FROM tab2
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-9010
SELECT ALL + 48 DIV - col0 + - col2 * cor0.col2 DIV + 24 FROM tab0 cor0
----
-1
-280
-47

skipif mysql # not compatible
query I rowsort label-9010
SELECT ALL + 48 / - col0 + - col2 * cor0.col2 / + 24 FROM tab0 cor0
----
-1
-280
-47

query I rowsort
SELECT DISTINCT - 55 * - cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
1815
4510
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9012
SELECT cor0.col1 + + CAST( NULL AS SIGNED ) / cor0.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9012
SELECT cor0.col1 + + CAST ( NULL AS INTEGER ) / cor0.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ( col0 ) + col0 * 64 AS col1 FROM tab1 cor0
----
195
4160
5200

query I rowsort
SELECT DISTINCT + + ( cor0.col2 ) * col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - 54 + + cor0.col2 FROM tab1 AS cor0
----
0
3
42

query I rowsort
SELECT + + 5 * + col1 AS col1 FROM tab0 AS cor0
----
430
455
485

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - ( 80 ) + + col1 col2 FROM tab1
----
-4294
-4550
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-9018
SELECT DISTINCT + CAST( col2 AS SIGNED ) DIV col0 AS col2 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-9018
SELECT DISTINCT + CAST ( col2 AS INTEGER ) / col0 AS col2 FROM tab0
----
0
1

query I rowsort
SELECT 12 + col0 FROM tab1
----
15
76
92

query I rowsort
SELECT DISTINCT + 80 AS col0 FROM tab0, tab0 cor0
----
80

query I rowsort
SELECT + 94 AS col2 FROM tab0
----
94
94
94

query I rowsort
SELECT DISTINCT 8 + cor0.col1 FROM tab1 AS cor0
----
18
21
34

query I rowsort
SELECT DISTINCT ( 96 ) FROM tab2
----
96

query I rowsort
SELECT - 87 AS col2 FROM tab1
----
-87
-87
-87

query I rowsort
SELECT ALL 69 FROM tab1, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT - col2 * + col2 * + ( col2 * col1 ) AS col2 FROM tab0
----
-3090582
-50174488
-97

query I rowsort
SELECT ( + col1 * + 87 ) + col2 AS col2 FROM tab0
----
7515
7999
8440

query I rowsort
SELECT col2 + - col1 AS col0 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-9029
SELECT ALL col1 DIV 63 + col0 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9029
SELECT ALL col1 / 63 + col0 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + cor0.col0 + col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT - col1 + col2 * ( col2 ) AS col0 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT ( - col1 * col2 ) + col0 AS col2 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT + ( cor0.col0 ) AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT 83 + col1 * 29 FROM tab1
----
373
460
837

query I rowsort
SELECT 2 * + tab0.col1 AS col2 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 30f96c938ee95872f59e2a087590314f

query I rowsort
SELECT 42 * - tab2.col0 AS col2 FROM tab2
----
-294
-3276
-3318

query I rowsort
SELECT ALL - 33 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT DISTINCT - - col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9039
SELECT col2 + CAST( 50 AS SIGNED ) AS col2 FROM tab2
----
76
77
88

skipif mysql # not compatible
query I rowsort label-9039
SELECT col2 + CAST ( 50 AS INTEGER ) AS col2 FROM tab2
----
76
77
88

query I rowsort
SELECT DISTINCT col1 + 22 - col0 FROM tab0 cor0
----
24
84

query I rowsort
SELECT DISTINCT cor0.col1 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + col2 * 23 * - 10 + + col0 + + col1 FROM tab2 AS cor0
----
-5843
-6172
-8644

query I rowsort
SELECT col0 + - 92 AS col0 FROM tab0 AS cor0
----
-3
-57
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * 72 + - col2 col2 FROM tab0 AS cor0
----
6159
6470
6983

query I rowsort
SELECT ALL - col0 * 40 FROM tab2 AS cor0
----
-280
-3120
-3160

onlyif mysql # use DIV operator for integer division
query I rowsort label-9046
SELECT - cor0.col1 DIV - CAST( + 3 AS SIGNED ) + - cor0.col1 FROM tab0 AS cor0
----
-58
-61
-65

skipif mysql # not compatible
query I rowsort label-9046
SELECT - cor0.col1 / - CAST ( + 3 AS INTEGER ) + - cor0.col1 FROM tab0 AS cor0
----
-58
-61
-65

query I rowsort
SELECT DISTINCT + col0 + + 10 AS col2 FROM tab0 AS cor0
----
34
45
99

query I rowsort
SELECT ALL - col0 * 75 + col1 FROM tab2 AS cor0
----
-494
-5791
-5908

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 col1 FROM tab2
----
14
14
14

query I rowsort
SELECT - 29 FROM tab1
----
-29
-29
-29

query I rowsort
SELECT - + col0 * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 * 74 FROM tab0 AS cor0
----
-2442
-6068
-74

query I rowsort
SELECT + col0 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT + col0 * - 74 AS col1 FROM tab1 AS cor0
----
-222
-4736
-5920

query I rowsort
SELECT + + 9 + - col2 * col0 AS col1 FROM tab1 cor0
----
-153
-3639
-7671

query I rowsort
SELECT + col0 * - 63 AS col1 FROM tab1 AS cor0
----
-189
-4032
-5040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + - col0 * col2 col2 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) col2 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 + col1 col1 FROM tab1
----
131
189
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 74 col1 FROM tab0
----
-6364
-6734
-7178

query I rowsort
SELECT - col2 + + col0 AS col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT col0 * 86 + + col2 * - col1 * 32 FROM tab0
----
-231130
-88752
-94

query I rowsort
SELECT + col2 * - col0 + col1 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9064
SELECT - - CAST( NULL AS DECIMAL ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9064
SELECT - - CAST ( NULL AS REAL ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - 95 ) * col2 + tab2.col2 FROM tab2
----
-2444
-2538
-3572

query I rowsort
SELECT DISTINCT + + cor0.col0 + 66 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
144
145
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-9067
SELECT DISTINCT - col0 DIV - col1 AS col0 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-9067
SELECT DISTINCT - col0 / - col1 AS col0 FROM tab1 AS cor0
----
0
6

query I rowsort
SELECT + tab2.col1 AS col1 FROM tab2, tab2 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT ALL col0 * + col1 + + ( - col2 ) * - col2 + + col1 FROM tab1 AS cor0
----
10269
3020
3899

query I rowsort
SELECT ALL - col0 + col0 + 77 AS col0 FROM tab2 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT - - col1 * col0 + - 79 AS col1 FROM tab0 cor0
----
1985
3316
8020

query I rowsort
SELECT - ( col0 ) * + col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + col2 + - col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ( cor0.col2 ) * col0 AS col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + - 64 * cor0.col0 + - 69 + + col0 AS col2 FROM tab1 AS cor0
----
-258
-4101
-5109

query I rowsort
SELECT ALL - - 23 * col1 + col2 * col0 AS col0 FROM tab1 AS cor0
----
3878
760
7979

query I rowsort
SELECT - - col0 + col2 + cor0.col0 AS col2 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT DISTINCT 69 AS col1 FROM tab1 AS cor0
----
69

query I rowsort
SELECT + + ( - col0 ) + - 97 AS col1 FROM tab1 cor0
----
-100
-161
-177

query I rowsort
SELECT ALL - col0 + + col0 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 95 FROM tab2, tab1 AS cor0
----
-95

query I rowsort
SELECT - 61 FROM tab1, tab2 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9084
SELECT - CAST( NULL AS SIGNED ) * - col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9084
SELECT - CAST ( NULL AS INTEGER ) * - col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 - + 82 AS col2 FROM tab1
----
-18
-2
-79

query I rowsort
SELECT ALL 25 AS col2 FROM tab0
----
25
25
25

query I rowsort
SELECT DISTINCT - col1 + - col1 FROM tab2
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9088
SELECT 49 DIV col0 + + 6 + col0 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
2072
3402
8105

skipif mysql # not compatible
query I rowsort label-9088
SELECT 49 / col0 + + 6 + col0 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
2072
3402
8105

query I rowsort
SELECT DISTINCT + tab2.col1 + - tab2.col1 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9090
SELECT col2 DIV - 8 FROM tab0
----
-10
-4
0

skipif mysql # not compatible
query I rowsort label-9090
SELECT col2 / - 8 FROM tab0
----
-10
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9091
SELECT CAST( col2 AS SIGNED ) + + col2 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-9091
SELECT CAST ( col2 AS INTEGER ) + + col2 / cor0.col0 AS col2 FROM tab0 AS cor0
----
1
34
82

query I rowsort
SELECT + col2 * ( col2 ) AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT 68 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT + cor0.col1 * + ( + cor0.col1 + col2 ) FROM tab0 AS cor0
----
10234
15743
9506

query I rowsort
SELECT col1 + col2 AS col0 FROM tab2 cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9096
SELECT col2 DIV 19 AS col2 FROM tab0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-9096
SELECT col2 / 19 AS col2 FROM tab0
----
0
1
4

query I rowsort
SELECT DISTINCT - col0 + - ( col0 * col1 ) - ( + col2 ) AS col1 FROM tab0
----
-2121
-3431
-8270

query I rowsort
SELECT + + 85 FROM tab1 AS cor0
----
85
85
85

query I rowsort
SELECT + - ( col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + col1 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 83 * col0 * + tab0.col2 - ( - col2 ) FROM tab0
----
2906
605816
65769

query I rowsort
SELECT - 13 * 38 - col1 FROM tab2
----
-511
-525
-553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 31 col1 FROM tab0
----
117
122
128

query I rowsort
SELECT DISTINCT col0 + col2 FROM tab2
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9105
SELECT DISTINCT - CAST( - 23 AS SIGNED ) FROM tab0 AS cor0
----
23

skipif mysql # not compatible
query I rowsort label-9105
SELECT DISTINCT - CAST ( - 23 AS INTEGER ) FROM tab0 AS cor0
----
23

query I rowsort
SELECT ALL - 52 + - 42 FROM tab0 AS cor0
----
-94
-94
-94

query I rowsort
SELECT + - cor0.col0 + col1 * - col1 AS col1 FROM tab1 AS cor0
----
-164
-249
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9108
SELECT - + 56 + + ( - col1 ) * + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9108
SELECT - + 56 + + ( - col1 ) * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9109
SELECT ALL + col1 DIV + col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-9109
SELECT ALL + col1 / + col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - 88 FROM tab0, tab0 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT - 3 + + col0 * - col0 FROM tab1 AS cor0
----
-12
-4099
-6403

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab0
----
54

query I rowsort
SELECT + 92 + col2 FROM tab2
----
118
119
130

query I rowsort
SELECT DISTINCT 62 * + col2 * - tab1.col1 FROM tab1
----
-35340
-77376
-87048

query I rowsort
SELECT + 4 FROM tab2
----
4
4
4

query I rowsort
SELECT ALL - col2 * + tab1.col0 * + col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT col1 * - col1 + - col0 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT ALL tab2.col2 + col1 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - col1 + + col2 * col2 AS col1 FROM tab2
----
1427
617
698

query I rowsort
SELECT col0 * tab2.col2 + - col1 + col0 AS col2 FROM tab2
----
165
2047
3064

query I rowsort
SELECT DISTINCT - col1 - + col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + - col0 * - cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + col1 * - cor0.col1 - + col2 AS col0 FROM tab1 cor0
----
43
622
73

query I rowsort
SELECT col0 - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9125
SELECT + col2 DIV tab0.col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9125
SELECT + col2 / tab0.col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT col1 * col1 AS col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL - col2 * col0 + - tab0.col0 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col1 + - col1 * - col2 FROM tab1
----
1417
2080
670

query I rowsort
SELECT ALL col1 * col0 * col1 FROM tab1 AS cor0
----
13520
2028
6400

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 ALL + cor0.col2 AS col0 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9132
SELECT DISTINCT - - col0 DIV + col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9132
SELECT DISTINCT - - col0 / + col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT ALL + + col0 * + col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL col1 * 0 + col1 * + col0 + col2 * - col2 FROM tab1
----
-2609
-2838
-8176

query I rowsort
SELECT ALL col0 + + 32 AS col1 FROM tab1
----
112
35
96

query I rowsort
SELECT 76 + 75 AS col0 FROM tab1
----
151
151
151

query I rowsort
SELECT DISTINCT - ( + col1 ) + col0 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT tab1.col0 + col1 * - tab1.col2 AS col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT col2 * + col1 - - col1 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL 73 + - 7 FROM tab0
----
66
66
66

query I rowsort
SELECT 97 + col2 AS col0 FROM tab2
----
123
124
135

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 34 * 10 col1 FROM tab1 AS cor0
----
340
340
340

query I rowsort
SELECT cor1.col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

onlyif mysql # use DIV operator for integer division
query I rowsort label-9146
SELECT - 49 DIV + col1 AS col0 FROM tab1 AS cor0
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-9146
SELECT - 49 / + col1 AS col0 FROM tab1 AS cor0
----
-1
-3
-4

query I rowsort
SELECT 95 FROM tab1, tab0 cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT DISTINCT + + 93 FROM tab2 AS cor0
----
93

query I rowsort
SELECT DISTINCT - 17 * col2 FROM tab1 AS cor0
----
-1632
-918
-969

query I rowsort
SELECT + - 67 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT ( - col0 ) * col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + 59 AS col2 FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT DISTINCT + + col0 + + col2 * - col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT ALL + - col2 - + col0 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9155
SELECT ALL + col1 DIV col2 - - col2 col0 FROM tab0 AS cor0
----
35
83
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9155
SELECT ALL + col1 / col2 - - col2 col0 FROM tab0 AS cor0
----
35
83
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 + - col2 col2 FROM tab0 cor0
----
-11
-43
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-9157
SELECT ALL - ( col2 ) DIV col2 col2 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9157
SELECT ALL - ( col2 ) / col2 col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - ( col2 ) AS col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ( + 19 ) FROM tab2
----
19
19
19

query I rowsort
SELECT DISTINCT + - col2 + - col1 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - cor0.col2 * cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 20 * + col2 FROM tab1 AS cor0
----
1080
1140
1920

query I rowsort
SELECT ALL - col1 * col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab2 AS cor0
----
39

query I rowsort
SELECT DISTINCT + col0 * col0 * col0 AS col2 FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT DISTINCT ( + col0 + + col2 ) * col1 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT ALL col0 * col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT + cor0.col0 * col1 AS col0 FROM tab1 AS cor0 WHERE NOT NULL >= ( - col0 * - col2 / - col2 + cor0.col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col2 + + col1 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - col1 * - col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col0 / + col2 FROM tab1 WHERE NOT tab1.col1 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( NULL ) <= NULL
----

query I rowsort
SELECT col1 + col2 * col1 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT col0 + col2 * cor0.col1 + cor0.col0 AS col0 FROM tab1 AS cor0
----
1408
1410
698

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 + cor0.col1 + + cor0.col1 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

query I rowsort
SELECT DISTINCT - col0 * col0 * col0 + - col2 + - col2 AS col2 FROM tab2 AS cor0
----
-397
-474604
-493115

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 col0 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col1 col2 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 col0 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9181
SELECT - col1 DIV - col0 AS col1 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-9181
SELECT - col1 / - col0 AS col1 FROM tab1
----
0
0
8

query I rowsort
SELECT col1 * col1 AS col1 FROM tab2 WHERE NOT NULL NOT IN ( + tab2.col1 * + col2 )
----

query I rowsort
SELECT col0 + + tab0.col0 * + tab0.col0 + col0 FROM tab0
----
1295
624
8099

query I rowsort
SELECT DISTINCT col0 + tab1.col0 * - tab1.col0 AS col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT col2 - - col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT + tab1.col2 * + col2 + col0 FROM tab1 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT + tab0.col0 - - col1 * - col2 FROM tab0
----
-2814
-62
-7373

query III rowsort
SELECT * FROM tab2 WHERE col2 = NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL - tab1.col0 - - tab1.col0 * col0 AS col0 FROM tab1
----
4032
6
6320

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL NOT IN ( col1 )
----

query I rowsort
SELECT col0 - col2 * col2 AS col0 FROM tab2
----
-1365
-598
-722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col1 col0 FROM tab0 WHERE NULL IN ( tab0.col1 + - col2 * col1 + col1 )
----

query I rowsort
SELECT col0 + col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col2 * col1 + - cor0.col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT + - col2 * col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-9197
SELECT ALL col1 DIV col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-9197
SELECT ALL col1 / col0 FROM tab1 AS cor0
----
0
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9198
SELECT col0 - - col2 * col2 DIV + col1 FROM tab0 AS cor0
----
162
35
36

skipif mysql # not compatible
query I rowsort label-9198
SELECT col0 - - col2 * col2 / + col1 FROM tab0 AS cor0
----
162
35
36

query I rowsort
SELECT DISTINCT + col1 + - col1 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9200
SELECT + col0 + - col1 DIV cor0.col1 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-9200
SELECT + col0 + - col1 / cor0.col1 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT - - col1 + col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9202
SELECT + cor0.col1 DIV - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9202
SELECT + cor0.col1 / - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + cor0.col0 col1 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9204
SELECT ALL col2 DIV col1 + + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-9204
SELECT ALL col2 / col1 + + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - - col0 * + col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + cor0.col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * - col2 + col1 col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT tab1.col2 * col2 - + col0 FROM tab1
----
2913
3185
9136

query I rowsort
SELECT ALL col1 * + col2 - col0 * + col0 AS col2 FROM tab1
----
-3526
-5152
1395

onlyif mysql # use DIV operator for integer division
query I rowsort label-9210
SELECT + col0 * tab0.col1 DIV - col2 FROM tab0
----
-3395
-62
-98

skipif mysql # not compatible
query I rowsort label-9210
SELECT + col0 * tab0.col1 / - col2 FROM tab0
----
-3395
-62
-98

query I rowsort
SELECT - col0 + - col2 + col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT col2 + tab0.col2 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL + tab0.col0 + col1 AS col2 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-9214
SELECT ALL + col1 - col1 DIV - col0 AS col0 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-9214
SELECT ALL + col1 - col1 / - col0 AS col0 FROM tab2
----
17
35
59

query I rowsort
SELECT DISTINCT - col1 * + tab0.col2 - + col0 * col0 FROM tab0
----
-1322
-15383
-3414

query I rowsort
SELECT DISTINCT - col2 + + col2 FROM tab2
----
0

query I rowsort
SELECT ALL col0 * + col2 + + col1 * + col1 * col0 AS col1 FROM tab1
----
10048
21200
2190

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL > NULL
----

query I rowsort
SELECT DISTINCT + col0 + col0 * + col0 AS col1 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ALL + col1 + col0 + - col2 FROM tab0
----
131
77
98

query I rowsort
SELECT ALL + col2 + col0 + - tab1.col2 * + col1 AS col1 FROM tab1
----
-1072
-1347
-449

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col0 * col1 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - - col1 * - col1 + col2 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT - col0 + + col2 + cor0.col2 FROM tab2 AS cor0
----
-26
-3
47

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT col1 * col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 71 FROM tab2, tab2 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT ALL + + cor0.col0 * + 13 AS col0 FROM tab2 cor0
----
1014
1027
91

query I rowsort
SELECT ALL col1 * ( col1 + + col1 ) AS col1 FROM tab0
----
14792
16562
18818

query I rowsort
SELECT DISTINCT + col2 * - tab2.col2 AS col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL tab2.col2 * tab2.col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT - col2 * ( - 86 ) * col2 AS col2 FROM tab0
----
578264
86
93654

query I rowsort
SELECT - ( cor0.col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col2 + col2 * + col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - cor0.col1 * cor0.col0 * col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL 31 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT + - 64 AS col0 FROM tab1 AS cor0
----
-64
-64
-64

query I rowsort
SELECT + - ( - 73 ) FROM tab2 cor0
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 + + col2 * col2 * - col1 col1 FROM tab0 AS cor0
----
-149
-611936
-93706

query I rowsort
SELECT + cor0.col0 * + 2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - - 36 AS col2 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT cor0.col2 * + 83 AS col1 FROM tab2 AS cor0
----
2158
2241
3154

query I rowsort
SELECT + ( col0 ) + cor0.col1 * col0 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT 53 AS col0 FROM tab0
----
53

query I rowsort
SELECT - 77 * col2 + - 71 AS col0 FROM tab1 cor0
----
-4229
-4460
-7463

query I rowsort
SELECT + col1 + + col2 + col1 * col0 AS col2 FROM tab1 AS cor0
----
1149
158
707

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 44 + - col1 * col2 col0 FROM tab2 AS cor0
----
-1578
-690
-881

onlyif mysql # use DIV operator for integer division
query I rowsort label-9251
SELECT ALL - col2 DIV cor0.col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9251
SELECT ALL - col2 / cor0.col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT + + col1 + col1 * + 24 FROM tab2 AS cor0
----
1475
425
775

query I rowsort
SELECT DISTINCT - ( + col1 ) * ( - col1 ) + cor0.col0 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL + cor0.col1 + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT + col0 + ( - ( - col0 ) ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT col1 * col0 + + 86 AS col0 FROM tab2 cor0
----
1429
303
4688

query I rowsort
SELECT - ( 32 ) * + cor0.col1 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 3faf3d641d3262e983730689fbee3821

query I rowsort
SELECT DISTINCT + 83 AS col1 FROM tab0, tab1 cor0, tab2 AS cor1
----
83

query I rowsort
SELECT - tab1.col2 + col0 + + col1 FROM tab1
----
-25
-3
17

query I rowsort
SELECT + col0 - - 76 FROM tab0 AS cor0
----
100
111
165

query I rowsort
SELECT col0 + - col2 AS col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + 60 col0 FROM tab1 AS cor0
----
-102
-3588
-7620

onlyif mysql # use DIV operator for integer division
query I rowsort label-9264
SELECT + col0 DIV + ( 62 ) AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9264
SELECT + col0 / + ( 62 ) AS col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT col1 + 66 * col2 AS col0 FROM tab1 cor0
----
3590
3772
6349

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * 52 + - 65 * col2 + + col2 col2 FROM tab0 AS cor0
----
-620
-864
1756

query I rowsort
SELECT ALL + col1 * - col1 + col2 * + col1 + - col0 AS col1 FROM tab1 AS cor0
----
406
725
999

query I rowsort
SELECT + + col2 + ( + 70 ) * + col0 AS col1 FROM tab0 AS cor0
----
1713
2451
6312

onlyif mysql # use DIV operator for integer division
query I rowsort label-9269
SELECT ALL - col1 + + col1 DIV + col2 col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9269
SELECT ALL - col1 + + col1 / + col2 col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + ( + col2 ) * col1 col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + - col1 * + ( + cor0.col1 ) + + col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT ALL - col1 * + col0 + 40 FROM tab0 AS cor0
----
-2024
-3355
-8059

query I rowsort
SELECT ALL col2 * - 51 + - col0 FROM tab0 AS cor0
----
-1707
-4271
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-9274
SELECT ALL - col1 DIV + col0 + 85 FROM tab1 AS cor0
----
77
85
85

skipif mysql # not compatible
query I rowsort label-9274
SELECT ALL - col1 / + col0 + 85 FROM tab1 AS cor0
----
77
85
85

query I rowsort
SELECT DISTINCT - + cor0.col0 + - 5 - col1 FROM tab1 AS cor0
----
-34
-79
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 85 * - col1 col1 FROM tab1 cor0
----
-1105
-2210
-850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9277
SELECT ALL + CAST( - col2 AS SIGNED ) * - col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-9277
SELECT ALL + CAST ( - col2 AS INTEGER ) * - col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9278
SELECT + col1 DIV - col2 + col1 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9278
SELECT + col1 / - col2 + col1 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + 28 AS col1 FROM tab2, tab1 AS cor0
----
28

query I rowsort
SELECT 81 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

onlyif mysql # use DIV operator for integer division
query I rowsort label-9282
SELECT ALL + col1 DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9282
SELECT ALL + col1 / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 85 AS col0 FROM tab1 AS cor0
----
-85
-85
-85

query I rowsort
SELECT + - 56 FROM tab1 AS cor0
----
-56
-56
-56

query I rowsort
SELECT 5 + - col0 + col2 FROM tab2 AS cor0
----
-36
-47
25

query I rowsort
SELECT cor0.col1 + - cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + ( col1 ) + col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + 70 FROM tab2 cor0
----
70
70
70

query I rowsort
SELECT DISTINCT - - cor0.col2 + + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + - col0 * col2 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT tab1.col1 * col0 AS col0 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 * + col2 col0 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT DISTINCT + 80 * col0 * col2 + + col0 AS col2 FROM tab2
----
15127
162318
240239

query I rowsort
SELECT DISTINCT - col2 * cor0.col0 + - col2 + col1 FROM tab2 AS cor0
----
-185
-1995
-3023

query I rowsort
SELECT ALL - + 95 * col0 FROM tab2 cor0
----
-665
-7410
-7505

query I rowsort
SELECT col0 * - col1 * - 75 + col2 FROM tab1 AS cor0
----
48057
5904
78096

query I rowsort
SELECT + + ( - col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + + 32 * + col2 + - cor0.col0 FROM tab0 AS cor0
----
-3
1032
2535

query I rowsort
SELECT ALL - col0 + + col2 * cor0.col2 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT - col2 + - col0 AS col2 FROM tab2
----
-104
-117
-34

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0, tab0 cor2
----
3645 values hashing to 78077727601c056ad0d4f4c11c8daffb

query I rowsort
SELECT ALL + 42 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT DISTINCT - + 64 AS col1 FROM tab2 AS cor0
----
-64

query I rowsort
SELECT + ( col1 ) + + ( + col0 ) FROM tab2
----
137
38
96

query I rowsort
SELECT ALL ( - 71 ) FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

query I rowsort
SELECT DISTINCT ( col1 ) * - 44 FROM tab1
----
-1144
-440
-572

onlyif mysql # use DIV operator for integer division
query I rowsort label-9307
SELECT - col0 DIV tab1.col2 AS col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9307
SELECT - col0 / tab1.col2 AS col0 FROM tab1
----
-1
0
0

query I rowsort
SELECT DISTINCT ( - col2 ) * + col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col1 + - col0 * - col2 * - col1 FROM tab1 AS cor0
----
-36470
-4186
-99827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col1 col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT - 20 AS col2 FROM tab1 AS cor0
----
-20

query I rowsort
SELECT ALL 87 + col0 AS col0 FROM tab1 AS cor0
----
151
167
90

query I rowsort
SELECT ALL col1 * 87 + - col1 * + col0 FROM tab0
----
-182
5044
5418

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9314
SELECT ALL + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-9314
SELECT ALL + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT 17 FROM tab1, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

onlyif mysql # use DIV operator for integer division
query I rowsort label-9316
SELECT ALL col2 DIV - 44 + + col1 FROM tab1
----
11
25
9

skipif mysql # not compatible
query I rowsort label-9316
SELECT ALL col2 / - 44 + + col1 FROM tab1
----
11
25
9

query I rowsort
SELECT 92 * + col1 AS col1 FROM tab2
----
1564
2852
5428

query I rowsort
SELECT - ( + 83 ) + tab1.col0 * + ( - col0 ) AS col1 FROM tab1
----
-4179
-6483
-92

query I rowsort
SELECT + ( - col2 ) + + col1 + - col0 * + col1 * col2 FROM tab1
----
-36527
-4240
-99923

query I rowsort
SELECT + ( + col2 ) - col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT + col2 * col2 + col1 FROM tab1
----
2942
3259
9229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col2 col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + col2 * - col1 * col1 + + ( - col0 ) + - col2 FROM tab0
----
-244125
-679213
-9445

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9324
SELECT ( - ( col2 ) ) + - CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-9324
SELECT ( - ( col2 ) ) + - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT col1 + - col1 + - cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + col1 + cor0.col0 * col0 * + col2 FROM tab2 AS cor0
----
1354
158243
237175

query I rowsort
SELECT + + ( + col1 ) + col2 * - col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-9329
SELECT DISTINCT + ( col0 ) + col1 DIV + col1 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-9329
SELECT DISTINCT + ( col0 ) + col1 / + col1 col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL - - 46 * + 2 AS col2 FROM tab0 AS cor0
----
92
92
92

query I rowsort
SELECT DISTINCT + cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT DISTINCT + cor0.col2 - + cor0.col0 FROM tab1, tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT 5 * ( col1 * 7 ) + - col2 + col2 * - ( + col1 ) * col1 AS col2 FROM tab0 AS cor0
----
-241091
-6015
-675939

query I rowsort
SELECT 55 + - col0 FROM tab2
----
-23
-24
48

query I rowsort
SELECT ALL + 3 + + tab1.col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 1dd3e512cdf8698009b4e72486b5a192

query I rowsort
SELECT - col1 + cor0.col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9337
SELECT DISTINCT - 23 DIV - col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9337
SELECT DISTINCT - 23 / - col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + + col0 * + 44 FROM tab1 cor0
----
132
2816
3520

query I rowsort
SELECT - 73 * + col1 AS col2 FROM tab0 AS cor0
----
-6278
-6643
-7081

query I rowsort
SELECT - cor0.col0 + col2 + + col1 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT DISTINCT + - 78 FROM tab1 AS cor0
----
-78

query I rowsort
SELECT DISTINCT + ( - 98 ) FROM tab2 cor0
----
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col2 * - 98 col2 FROM tab0 AS cor0
----
-3234
-8036
-98

query I rowsort
SELECT - 23 * + col0 AS col2 FROM tab2 AS cor0
----
-161
-1794
-1817

query I rowsort
SELECT ALL col0 + + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - ( col2 ) * - tab1.col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT cor0.col0 * - col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - col1 * + cor0.col2 + - col1 * col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT col2 + col2 * - 87 FROM tab0 AS cor0
----
-2838
-7052
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9351
SELECT + ( col2 ) * + CAST( + col2 AS SIGNED ) + + col1 AS col2 FROM tab0 AS cor0
----
1175
6815
98

skipif mysql # not compatible
query I rowsort label-9351
SELECT + ( col2 ) * + CAST ( + col2 AS INTEGER ) + + col1 AS col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT DISTINCT col2 * - ( 2 ) * col1 AS col2 FROM tab0 AS cor0
----
-14924
-194
-5676

query I rowsort
SELECT - col0 * ( + col1 + + col2 ) AS col1 FROM tab0 cor0
----
-15397
-2856
-3430

query I rowsort
SELECT DISTINCT col0 * ( - col0 ) + col2 AS col2 FROM tab1
----
-4039
-6304
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-9355
SELECT ALL col1 DIV col1 + col0 AS col0 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-9355
SELECT ALL col1 / col1 + col0 AS col0 FROM tab2
----
79
8
80

query I rowsort
SELECT 48 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL - cor0.col0 + - 9 AS col1 FROM tab2 AS cor0
----
-16
-87
-88

query I rowsort
SELECT + + col0 + 64 * - col0 AS col0 FROM tab2 AS cor0
----
-441
-4914
-4977

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9360
SELECT - col0 * CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-9360
SELECT - col0 * CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - 94 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9362
SELECT CAST( + 38 AS SIGNED ) FROM tab2 AS cor0
----
38
38
38

skipif mysql # not compatible
query I rowsort label-9362
SELECT CAST ( + 38 AS INTEGER ) FROM tab2 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 44 * col1 + col0 col0 FROM tab0 cor0
----
3808
4093
4303

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9364
SELECT DISTINCT CAST( NULL AS SIGNED ) * + col0 - col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9364
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + col0 - col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col0 + ( - col1 ) FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL - cor0.col1 - ( col0 ) FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9367
SELECT col1 + col1 DIV col2 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-9367
SELECT col1 + col1 / col2 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT DISTINCT + 40 * + cor0.col2 * col0 FROM tab2 AS cor0
----
120080
7560
81120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9369
SELECT DISTINCT - col0 + col0 DIV + col2 + - 16 * col1 col0 FROM tab1 AS cor0
----
-223
-288
-419

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9369
SELECT DISTINCT - col0 + col0 / + col2 + - 16 * col1 col0 FROM tab1 AS cor0
----
-223
-288
-419

query I rowsort
SELECT + col0 + 11 * + col1 FROM tab2 AS cor0
----
266
348
727

query I rowsort
SELECT DISTINCT + col0 * + 3 + - 76 AS col2 FROM tab0
----
-4
191
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-9372
SELECT + col1 DIV ( - 2 ) col1 FROM tab0
----
-43
-45
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9372
SELECT + col1 / ( - 2 ) col1 FROM tab0
----
-43
-45
-48

query I rowsort
SELECT - col1 * - cor0.col1 - - col2 * + ( 65 ) AS col0 FROM tab1 AS cor0
----
3805
4186
6409

query I rowsort
SELECT ALL + tab1.col2 + 81 FROM tab1
----
135
138
177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9375
SELECT col2 * col1 * + col1 + col1 + + CAST( col0 AS SIGNED ) AS col2 FROM tab2
----
11078
25985
90643

skipif mysql # not compatible
query I rowsort label-9375
SELECT col2 * col1 * + col1 + col1 + + CAST ( col0 AS INTEGER ) AS col2 FROM tab2
----
11078
25985
90643

onlyif mysql # use DIV operator for integer division
query I rowsort label-9376
SELECT + + col1 + col1 DIV + 33 AS col0 FROM tab2 AS cor0
----
17
31
60

skipif mysql # not compatible
query I rowsort label-9376
SELECT + + col1 + col1 / + 33 AS col0 FROM tab2 AS cor0
----
17
31
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 * 11 col0 FROM tab2 AS cor0
----
46
799
852

query I rowsort
SELECT - col0 + - col2 * + cor0.col2 FROM tab2 AS cor0
----
-1523
-736
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-9379
SELECT - col0 DIV 21 AS col2 FROM tab0 cor0
----
-1
-1
-4

skipif mysql # not compatible
query I rowsort label-9379
SELECT - col0 / 21 AS col2 FROM tab0 cor0
----
-1
-1
-4

query I rowsort
SELECT - + 82 + 49 * cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 810de9b7cec4774a8ad35911b021d8bf

onlyif mysql # use DIV operator for integer division
query I rowsort label-9381
SELECT col0 * col1 DIV col1 AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9381
SELECT col0 * col1 / col1 AS col0 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9382
SELECT + col2 + col1 DIV - 44 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-9382
SELECT + col2 + col1 / - 44 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col0 + col0 * col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT col2 * - ( col0 ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col1 * - 61 FROM tab1
----
-1586
-610
-793

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab1, tab2 AS cor0
----
48

query I rowsort
SELECT ALL + col2 * - col2 * + col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT col2 * - col0 * col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT col1 * - ( + col1 ) FROM tab2
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 32 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT - cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT cor0.col0 * - cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 34 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 1a92b418ae3c05ba566f88a890a407ae

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9396
SELECT DISTINCT CAST( - col2 * - col1 AS SIGNED ) FROM tab1
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-9396
SELECT DISTINCT CAST ( - col2 * - col1 AS INTEGER ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT 57 * col0 AS col1 FROM tab2
----
399
4446
4503

onlyif mysql # use DIV operator for integer division
query I rowsort label-9398
SELECT - 22 DIV col1 FROM tab2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9398
SELECT - 22 / col1 FROM tab2
----
-1
0
0

query I rowsort
SELECT + 55 * - col1 - 6 FROM tab0 AS cor0
----
-4736
-5011
-5341

query I rowsort
SELECT col2 + + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ( col0 ) - + col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL col0 * - col2 * + col2 AS col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT - col0 * + col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT 81 * col2 + ( col0 ) * col2 AS col0 FROM tab2 AS cor0
----
2376
4134
6080

query I rowsort
SELECT - cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + ( col0 ) * + 61 * + 84 AS col0 FROM tab1
----
15372
327936
409920

query I rowsort
SELECT ALL - 42 * col1 FROM tab0
----
-3612
-3822
-4074

query I rowsort
SELECT ALL - - tab2.col2 FROM tab1, tab0, tab0 AS cor0, tab2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT DISTINCT + col1 * - col2 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + col2 + + col1 FROM tab0
----
119
173
98

query I rowsort
SELECT - col1 + col1 * col1 * col0 FROM tab0
----
177418
329218
736918

query I rowsort
SELECT ALL + col0 * + col2 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL - col0 + 85 FROM tab1 AS cor0
----
21
5
82

query I rowsort
SELECT - col1 * 99 + col0 FROM tab0 AS cor0
----
-8490
-8920
-9568

query I rowsort
SELECT ALL - + col1 + ( - 42 ) FROM tab2 AS cor0
----
-101
-59
-73

query I rowsort
SELECT DISTINCT + col2 * col1 - + col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + col0 * col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col0 - + col0 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9419
SELECT ALL col1 DIV col2 + - col1 * col0 * - 38 col2 FROM tab0 AS cor0
----
129107
307763
78434

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9419
SELECT ALL col1 / col2 + - col1 * col0 * - 38 col2 FROM tab0 AS cor0
----
129107
307763
78434

query I rowsort
SELECT + col1 + 78 * 23 * col1 AS col0 FROM tab2 AS cor0
----
105905
30515
55645

query I rowsort
SELECT + + col0 + + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col2 * + ( - col0 ) * + col2 AS col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT 7 FROM tab1
----
7
7
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9424
SELECT ALL - col2 + CAST( col0 AS SIGNED ) * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-1136
-132
-697

skipif mysql # not compatible
query I rowsort label-9424
SELECT ALL - col2 + CAST ( col0 AS INTEGER ) * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9425
SELECT cor0.col2 - + CAST( - 22 AS SIGNED ) AS col1 FROM tab0 cor0
----
104
23
55

skipif mysql # not compatible
query I rowsort label-9425
SELECT cor0.col2 - + CAST ( - 22 AS INTEGER ) AS col1 FROM tab0 cor0
----
104
23
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9426
SELECT DISTINCT + col1 * CAST( col1 AS SIGNED ) * - col1 + col2 * - col2 FROM tab2 cor0
----
-206055
-30520
-6357

skipif mysql # not compatible
query I rowsort label-9426
SELECT DISTINCT + col1 * CAST ( col1 AS INTEGER ) * - col1 + col2 * - col2 FROM tab2 cor0
----
-206055
-30520
-6357

query I rowsort
SELECT ALL - col0 * 80 AS col0 FROM tab0 AS cor0
----
-1920
-2800
-7120

query I rowsort
SELECT - + cor0.col0 - - col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL col0 + + 48 FROM tab0 AS cor0
----
137
72
83

query I rowsort
SELECT DISTINCT - col1 - - 15 * - col2 FROM tab0 AS cor0
----
-112
-1321
-581

query I rowsort
SELECT cor0.col2 + 72 FROM tab0 cor0
----
105
154
73

query I rowsort
SELECT + + col1 * - 95 + + col0 * - 67 FROM tab1 AS cor0
----
-2671
-5238
-6595

query I rowsort
SELECT - col0 * + col0 + col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT 75 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
110
164
99

query I rowsort
SELECT - col2 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT 59 FROM tab2, tab0 AS cor0
----
59

query I rowsort
SELECT DISTINCT + 52 * + tab1.col0 FROM tab1, tab1 AS cor0
----
156
3328
4160

query I rowsort
SELECT cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + 72 * col0 + - col2 FROM tab2 AS cor0
----
477
5590
5650

query I rowsort
SELECT ALL + - ( + 19 ) AS col2 FROM tab2 cor0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT - ( col0 ) * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 31 AS REAL ) FROM tab2 AS cor0
----
31
31
31

query I rowsort
SELECT ALL + ( col0 ) + + col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - - ( - cor0.col2 ) + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + ( 22 ) + + col1 FROM tab2 AS cor0
----
39
53
81

query I rowsort
SELECT 25 * + col1 * col1 AS col2 FROM tab1 AS cor0
----
16900
2500
4225

query I rowsort
SELECT DISTINCT - 83 FROM tab2 AS cor0
----
-83

query I rowsort
SELECT - - 87 AS col2 FROM tab2 AS cor0
----
87
87
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9449
SELECT DISTINCT - col2 * - col1 + CAST( NULL AS SIGNED ) * col1 AS col2 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9449
SELECT DISTINCT - col2 * - col1 + CAST ( NULL AS INTEGER ) * col1 AS col2 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL - + 13 - + col0 * col1 FROM tab2 AS cor0
----
-1356
-230
-4615

onlyif mysql # use DIV operator for integer division
query I rowsort label-9451
SELECT ALL - 92 + col1 DIV 62 - cor0.col1 AS col0 FROM tab0 AS cor0
----
-177
-182
-188

skipif mysql # not compatible
query I rowsort label-9451
SELECT ALL - 92 + col1 / 62 - cor0.col1 AS col0 FROM tab0 AS cor0
----
-177
-182
-188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9452
SELECT ALL + CAST( col0 AS SIGNED ) * - col0 FROM tab0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-9452
SELECT ALL + CAST ( col0 AS INTEGER ) * - col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT - ( ( col1 ) ) AS col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT + 98 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT col0 + + ( 34 ) FROM tab1 AS cor0
----
114
37
98

query I rowsort
SELECT DISTINCT + + cor0.col2 AS col1 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - cor0.col1 + 97 AS col2 FROM tab2 AS cor0
----
38
66
80

query I rowsort
SELECT ALL - + col1 * + col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - col1 + 7 AS col0 FROM tab2 AS cor0
----
-10
-24
-52

query I rowsort
SELECT DISTINCT - cor0.col0 * 25 AS col2 FROM tab1 AS cor0
----
-1600
-2000
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-9461
SELECT - col1 + - 11 DIV col1 AS col2 FROM tab1 AS cor0
----
-11
-13
-26

skipif mysql # not compatible
query I rowsort label-9461
SELECT - col1 + - 11 / col1 AS col2 FROM tab1 AS cor0
----
-11
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9462
SELECT ALL + col0 + + 8 DIV col1 AS col2 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-9462
SELECT ALL + col0 + + 8 / col1 AS col2 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + + col2 + - 6 FROM tab2 cor0
----
20
21
32

query I rowsort
SELECT DISTINCT + - col2 + 36 AS col0 FROM tab2 AS cor0
----
-2
10
9

query I rowsort
SELECT ALL - - col0 * - ( + col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT col1 - 35 AS col0 FROM tab2 AS cor0
----
-18
-4
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * 74 * 53 col1 FROM tab2 AS cor0
----
101972
105894
149036

query I rowsort
SELECT col1 + - 53 FROM tab2 AS cor0
----
-22
-36
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + col2 col1 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9470
SELECT - col2 DIV - cor0.col1 AS col2 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9470
SELECT - col2 / - cor0.col1 AS col2 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT ALL + + col0 * 65 AS col2 FROM tab2 AS cor0
----
455
5070
5135

onlyif mysql # use DIV operator for integer division
query I rowsort label-9472
SELECT - - col0 DIV + 94 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9472
SELECT - - col0 / + 94 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col2 * + ( - col0 ) FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9474
SELECT DISTINCT cor0.col1 DIV - col1 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9474
SELECT DISTINCT cor0.col1 / - col1 AS col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL + + cor0.col0 * - col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT col1 + + ( col2 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - col0 + col2 * + col1 FROM tab0 AS cor0
----
2814
62
7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 44 + - col0 col1 FROM tab2 AS cor0
----
-122
-123
-51

query I rowsort
SELECT + 22 * col0 * - col1 FROM tab2 AS cor0
----
-101244
-29546
-4774

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 ALL cor0.col0 + - 37 AS col2 FROM tab0 AS cor0
----
-13
-2
52

query I rowsort
SELECT - col1 + + col1 * col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT ALL + cor0.col1 + col1 * col0 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-9484
SELECT DISTINCT + cor0.col2 * cor1.col2 DIV cor1.col0 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
0
1
112
2
30
45
75

skipif mysql # not compatible
query I rowsort label-9484
SELECT DISTINCT + cor0.col2 * cor1.col2 / cor1.col0 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
0
1
112
2
30
45
75

query I rowsort
SELECT DISTINCT - ( 97 ) * - col1 FROM tab0 AS cor0
----
8342
8827
9409

query I rowsort
SELECT ALL + ( - 74 ) AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT ALL - col2 * + 93 + + col1 FROM tab2
----
-2359
-2480
-3517

query I rowsort
SELECT 57 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT cor0.col2 FROM tab2, tab0 cor0, tab2 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL - + 79 AS col0 FROM tab2 AS cor0
----
-79
-79
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9491
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9491
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9492
SELECT DISTINCT - col2 + - col0 DIV 72 AS col2 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-9492
SELECT DISTINCT - col2 + - col0 / 72 AS col2 FROM tab0 AS cor0
----
-1
-33
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col2 * + col1 + cor0.col0 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
1054
1989
6136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + tab2.col0 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 363494b33b4d1826f58e179e26d91c4a

query I rowsort
SELECT + tab1.col0 + - col2 * + col0 + col1 * - col0 AS col1 FROM tab1
----
-237
-4224
-8640

query I rowsort
SELECT ALL - 30 * - col0 + + col0 + col0 FROM tab1
----
2048
2560
96

query I rowsort
SELECT DISTINCT + - ( cor0.col0 ) AS col0 FROM tab0, tab2, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL ( - col0 ) - 62 AS col0 FROM tab1
----
-126
-142
-65

query I rowsort
SELECT 2 AS col0 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

query I rowsort
SELECT 94 + col0 * tab1.col1 - + col0 FROM tab1
----
1054
169
670

query I rowsort
SELECT - tab1.col0 * col0 + + col2 * tab1.col0 + - col0 FROM tab1
----
-512
1200
150

query I rowsort
SELECT DISTINCT ( col1 ) * + col2 * + col0 + col2 * 20 FROM tab2
----
120172
51794
6399

query I rowsort
SELECT + 14 FROM tab0 AS cor0
----
14
14
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-9505
SELECT ALL - col2 + - col0 DIV + tab2.col0 + + col0 AS col2 FROM tab2
----
-21
40
51

skipif mysql # not compatible
query I rowsort label-9505
SELECT ALL - col2 + - col0 / + tab2.col0 + + col0 AS col2 FROM tab2
----
-21
40
51

query I rowsort
SELECT DISTINCT + col0 + - col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT - ( cor0.col2 ) * ( + 49 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 58213281e9e2d82ed8ca01c77cbcb0f0

query I rowsort
SELECT - col1 + - col0 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL + + 50 - cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 10b8c66a959493b884f1c4bf02556347

query I rowsort
SELECT + 23 AS col0 FROM tab1
----
23
23
23

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-9512
SELECT - col1 DIV 39 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9512
SELECT - col1 / 39 FROM tab1
----
0
0
0

query I rowsort
SELECT col0 * 20 AS col2 FROM tab0
----
1780
480
700

query I rowsort
SELECT + col1 * ( + col1 + col0 ) AS col2 FROM tab1
----
1209
740
754

query I rowsort
SELECT DISTINCT col0 * 61 FROM tab0
----
1464
2135
5429

onlyif mysql # use DIV operator for integer division
query I rowsort label-9516
SELECT ALL - cor0.col2 DIV - cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9516
SELECT ALL - cor0.col2 / - cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT 26 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

onlyif mysql # use DIV operator for integer division
query I rowsort label-9518
SELECT DISTINCT - col2 * + ( col2 ) + + col1 DIV 4 FROM tab1 AS cor0
----
-2910
-3247
-9213

skipif mysql # not compatible
query I rowsort label-9518
SELECT DISTINCT - col2 * + ( col2 ) + + col1 / 4 FROM tab1 AS cor0
----
-2910
-3247
-9213

query I rowsort
SELECT ALL - cor0.col0 * 74 AS col2 FROM tab1 AS cor0
----
-222
-4736
-5920

query I rowsort
SELECT ALL - col0 * + col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL 24 AS col0 FROM tab1
----
24
24
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9522
SELECT ALL + CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9522
SELECT ALL + CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + + col1 * col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT - 51 * col2 + col0 AS col0 FROM tab2
----
-1248
-1370
-1859

query I rowsort
SELECT + ( 49 ) * + col1 * col0 FROM tab0 cor0
----
101136
166355
396851

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 8e88b3a69c24fc01553b0c32bf7748d0

query I rowsort
SELECT DISTINCT + 20 * col1 AS col2 FROM tab2 AS cor0
----
1180
340
620

query I rowsort
SELECT DISTINCT col1 * + col0 + col0 - - col2 AS col2 FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT - 71 + col0 AS col0 FROM tab2 cor0
----
-64
7
8

query I rowsort
SELECT DISTINCT + cor0.col1 * col1 - - 62 FROM tab1 AS cor0
----
162
231
738

query I rowsort
SELECT - - col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + - 73 * + col1 FROM tab0 cor0
----
-6278
-6643
-7081

query I rowsort
SELECT DISTINCT + cor0.col2 + - col2 * ( col0 ) + - col0 AS col1 FROM tab1 AS cor0
----
-111
-3655
-7664

query I rowsort
SELECT DISTINCT col2 + + col1 AS col2 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-9535
SELECT ALL + col2 + + col0 + ( - 83 ) * col0 DIV - 77 AS col2 FROM tab0 AS cor0
----
266
73
82

skipif mysql # not compatible
query I rowsort label-9535
SELECT ALL + col2 + + col0 + ( - 83 ) * col0 / - 77 AS col2 FROM tab0 AS cor0
----
266
73
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT col2 * cor0.col0 - cor0.col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL + - col0 * col0 + 85 * - col0 AS col1 FROM tab1 AS cor0
----
-13200
-264
-9536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 84 col1 FROM tab0 cor0
----
-84
-84
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-9540
SELECT DISTINCT + col0 DIV cor0.col1 + + ( + col2 ) AS col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9540
SELECT DISTINCT + col0 / cor0.col1 + + ( + col2 ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + - 17 FROM tab2 AS cor0
----
-17
-17
-17

query I rowsort
SELECT ALL - - 95 + col1 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
124
169
188

query I rowsort
SELECT col2 * - col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col2 * cor0.col0 * col1 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL + tab1.col2 + col0 - + col1 FROM tab1
----
111
163
31

query I rowsort
SELECT col0 + 83 AS col2 FROM tab2 AS cor0
----
161
162
90

query I rowsort
SELECT - 17 + + col0 FROM tab0 AS cor0
----
18
7
72

query I rowsort
SELECT 63 * - 4 AS col2 FROM tab0
----
-252
-252
-252

onlyif mysql # use DIV operator for integer division
query I rowsort label-9549
SELECT DISTINCT + col2 DIV col0 col2 FROM tab2 cor0
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9549
SELECT DISTINCT + col2 / col0 col2 FROM tab2 cor0
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col1 * + col0 col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT - col2 - col0 FROM tab2 cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - col2 * + 71 + + col1 col1 FROM tab0 AS cor0
----
168
477495
77405

query I rowsort
SELECT - 62 AS col1 FROM tab1 cor0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - 87 * - col1 + col2 - col1 AS col2 FROM tab2 AS cor0
----
1500
2693
5100

query I rowsort
SELECT - 6 AS col0 FROM tab0
----
-6
-6
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9557
SELECT ALL 6 DIV col0 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9557
SELECT ALL 6 / col0 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + + col2 * - col2 * - 92 AS col1 FROM tab1 AS cor0
----
268272
298908
847872

query I rowsort
SELECT + - col0 * 9 FROM tab1 cor0
----
-27
-576
-720

query I rowsort
SELECT DISTINCT - ( col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL - 10 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
7
78
79

query I rowsort
SELECT ALL col2 + ( - cor0.col2 + - col2 ) * + 23 AS col1 FROM tab1 AS cor0
----
-2430
-2565
-4320

query I rowsort
SELECT DISTINCT + col1 + - ( - cor0.col1 ) FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - tab2.col0 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-7
-78
-79

query I rowsort
SELECT + 30 + + 31 AS col1 FROM tab0 AS cor0
----
61
61
61

query I rowsort
SELECT DISTINCT + - col0 * col1 + + col2 * - 50 AS col2 FROM tab1 AS cor0
----
-2778
-3490
-5840

onlyif mysql # use DIV operator for integer division
query I rowsort label-9568
SELECT DISTINCT + col2 + + col0 DIV + col1 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9568
SELECT DISTINCT + col2 + + col0 / + col1 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + ( - 44 ) col2 FROM tab0
----
-130
-135
-141

query I rowsort
SELECT DISTINCT - tab2.col0 * + 64 + + col0 FROM tab2
----
-441
-4914
-4977

query I rowsort
SELECT - ( col2 ) * col1 + col0 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT 44 FROM tab0, tab0 AS cor0
----
44

query I rowsort
SELECT DISTINCT col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - cor0.col0 + cor0.col0 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + 78 - col0 * col2 * - col1 AS col0 FROM tab2 AS cor0
----
119574
50956
5781

query I rowsort
SELECT ALL - 9 * - col2 + - col1 FROM tab0 AS cor0
----
-88
211
647

query I rowsort
SELECT DISTINCT + 62 FROM tab0 AS cor0
----
62

query I rowsort
SELECT + 68 AS col2 FROM tab0 cor0
----
68
68
68

query I rowsort
SELECT + 62 AS col0 FROM tab1 cor0
----
62
62
62

query I rowsort
SELECT ALL - - ( cor0.col0 ) - + col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( col2 ) + - col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - col2 + + 81 AS col2 FROM tab1 AS cor0
----
-15
24
27

query I rowsort
SELECT - ( col2 * - col1 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT + + 16 * - col0 + + 60 + col1 FROM tab2 AS cor0
----
-1129
-1187
-21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9585
SELECT - col2 + col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9585
SELECT - col2 + col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 63 AS col1 FROM tab2 AS cor0
----
63
63
63

query I rowsort
SELECT - col1 * - ( cor0.col2 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col0 + + 16 FROM tab0 AS cor0
----
105
40
51

query I rowsort
SELECT DISTINCT - + col0 + 44 AS col0 FROM tab0 AS cor0
----
-45
20
9

query I rowsort
SELECT ALL col1 + col0 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + cor0.col0 + + ( col0 ) * col2 * col2 AS col0 FROM tab0 AS cor0
----
26160
598525
70

query I rowsort
SELECT ALL ( - col2 ) * + col2 + + col0 FROM tab2
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-9593
SELECT ALL - col1 DIV + col0 + + col2 * + col2 FROM tab2
----
1444
676
725

skipif mysql # not compatible
query I rowsort label-9593
SELECT ALL - col1 / + col0 + + col2 * + col2 FROM tab2
----
1444
676
725

query I rowsort
SELECT ( 31 ) + - col1 + col1 AS col1 FROM tab1
----
31
31
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-9595
SELECT tab1.col0 * ( tab1.col2 ) DIV col2 + - tab1.col2 + + col0 * col1 col2 FROM tab1
----
1024
27
647

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9595
SELECT tab1.col0 * ( tab1.col2 ) / col2 + - tab1.col2 + + col0 * col1 col2 FROM tab1
----
1024
27
647

query I rowsort
SELECT 74 * + col1 AS col2 FROM tab1
----
1924
740
962

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9597
SELECT CAST( + ( col0 ) AS SIGNED ) FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9597
SELECT CAST ( + ( col0 ) AS INTEGER ) FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9598
SELECT tab1.col0 DIV + col1 + col0 FROM tab1
----
3
70
86

skipif mysql # not compatible
query I rowsort label-9598
SELECT tab1.col0 / + col1 + col0 FROM tab1
----
3
70
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-9599
SELECT - col1 DIV - col0 col2 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9599
SELECT - col1 / - col0 col2 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * + 91 col0 FROM tab1 AS cor0
----
-4914
-5187
-8736

query I rowsort
SELECT DISTINCT - col2 * - 76 AS col0 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT 84 * 68 FROM tab0
----
5712
5712
5712

onlyif mysql # use DIV operator for integer division
query I rowsort label-9603
SELECT - 17 DIV col1 AS col1 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-9603
SELECT - 17 / col1 AS col1 FROM tab1
----
-1
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9604
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - col2 * col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-9604
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - col2 * col1 FROM tab2
----
NULL

query I rowsort
SELECT ALL - col1 * tab2.col0 + col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT + 11 + + col2 * - col0 AS col2 FROM tab1 AS cor0
----
-151
-3637
-7669

query I rowsort
SELECT ALL + 39 AS col2 FROM tab2 cor0
----
39
39
39

query I rowsort
SELECT col0 * col1 - cor0.col1 * cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL cor0.col2 * col0 + col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT + col0 + - col1 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9611
SELECT DISTINCT - 26 DIV col0 AS col1 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-9611
SELECT DISTINCT - 26 / col0 AS col1 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT ALL + 27 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
1116
28
6751

query I rowsort
SELECT + - col0 * - col2 + col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - - col0 * + col2 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT col2 + cor0.col0 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - - 99 FROM tab2 AS cor0
----
99
99
99

query I rowsort
SELECT + 25 * col1 + - col0 FROM tab1 AS cor0
----
186
245
647

onlyif mysql # use DIV operator for integer division
query I rowsort label-9618
SELECT + col0 DIV - col0 + col0 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-9618
SELECT + col0 / - col0 + col0 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT DISTINCT - col2 + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT col0 + ( - tab1.col0 ) AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - + col0 + col0 * - col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - - col1 + + 69 FROM tab0 AS cor0
----
155
160
166

query I rowsort
SELECT - col1 + + cor0.col2 * - 99 AS col2 FROM tab0 cor0
----
-196
-3353
-8209

query I rowsort
SELECT + cor0.col2 + - col2 * + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT + col1 * 30 FROM tab1 cor0
----
300
390
780

onlyif mysql # use DIV operator for integer division
query I rowsort label-9628
SELECT ALL - col2 + 48 DIV + col0 FROM tab1 AS cor0
----
-38
-57
-96

skipif mysql # not compatible
query I rowsort label-9628
SELECT ALL - col2 + 48 / + col0 FROM tab1 AS cor0
----
-38
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * 28 col1 FROM tab0 AS cor0
----
2492
672
980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9630
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9630
SELECT DISTINCT + + CAST ( NULL AS REAL ) AS col1 FROM tab1 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9631
SELECT + CAST( NULL AS SIGNED ) + - 69 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9631
SELECT + CAST ( NULL AS INTEGER ) + - 69 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( + col0 ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + 45 + col1 * + col2 AS col0 FROM tab0 AS cor0
----
142
2883
7507

query I rowsort
SELECT DISTINCT + col0 * 89 AS col2 FROM tab1 AS cor0
----
267
5696
7120

query I rowsort
SELECT - + 82 * + col0 * + col2 FROM tab1 AS cor0
----
-13284
-299136
-629760

query I rowsort
SELECT + col2 * + ( - col1 ) AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9637
SELECT ALL + col1 DIV col2 - col1 AS col2 FROM tab0 AS cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-9637
SELECT ALL + col1 / col2 - col1 AS col2 FROM tab0 AS cor0
----
-84
-90
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9638
SELECT DISTINCT col0 * CAST( NULL AS SIGNED ) col0 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9638
SELECT DISTINCT col0 * CAST ( NULL AS INTEGER ) col0 FROM tab2
----
NULL

query I rowsort
SELECT ALL 96 * + col1 FROM tab2 AS cor0
----
1632
2976
5664

query I rowsort
SELECT ALL col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + col0 * - col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT cor0.col2 * + col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

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 + col0 * + col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col2 * + col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-9646
SELECT col1 + + col0 DIV col1 AS col2 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-9646
SELECT col1 + + col0 / col1 AS col2 FROM tab1
----
16
19
26

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NULL >= + col2
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL + col0 * - tab0.col1 * - col1 AS col2 FROM tab0 WHERE col2 + - col0 * - col1 <= col1 * + col2 + col0 * col2
----
177504
737009

query I rowsort
SELECT ALL col0 + col1 / + tab0.col0 + + col2 AS col1 FROM tab0 WHERE NULL = col2 + + col0 * col2
----

query I rowsort
SELECT - + col0 + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9652
SELECT - col0 DIV - cor0.col0 + - col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-9652
SELECT - col0 / - cor0.col0 + - col0 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT ALL col1 + + col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT + + col2 * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col2 + + col1 * col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT ALL 80 * col2 + col0 FROM tab2
----
2158
2167
3119

query I rowsort
SELECT ALL + 29 + col2 FROM tab2
----
55
56
67

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL + col0 * tab0.col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL + col0 * + tab0.col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - col1 * col2 * + col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT cor0.col1 * col0 + - col0 AS col0 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT + col2 + col1 * col2 AS col1 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + col2 * tab2.col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT + col0 * tab1.col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - - 79 * cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0351101cf0b00edc13cdaa144db558f9

query I rowsort
SELECT 37 + col2 FROM tab0 AS cor0
----
119
38
70

query I rowsort
SELECT - col2 + + col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - - col1 + - col2 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9672
SELECT CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9672
SELECT CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - ( - col2 ) + + col1 * 51 FROM tab2 AS cor0
----
1608
3035
905

onlyif mysql # use DIV operator for integer division
query I rowsort label-9674
SELECT ALL - 84 DIV 2 AS col0 FROM tab0
----
-42
-42
-42

skipif mysql # not compatible
query I rowsort label-9674
SELECT ALL - 84 / 2 AS col0 FROM tab0
----
-42
-42
-42

query I rowsort
SELECT col0 + - 23 FROM tab0 AS cor0
----
1
12
66

query I rowsort
SELECT + col1 * ( + col1 ) + col0 + ( - col2 ) FROM tab1 AS cor0
----
107
153
625

query I rowsort
SELECT DISTINCT + col0 * col1 * col0 - 53 * col1 AS col0 FROM tab0 AS cor0
----
113684
44978
715988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9678
SELECT DISTINCT - + ( col2 ) * CAST( NULL AS SIGNED ) - col2 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9678
SELECT DISTINCT - + ( col2 ) * CAST ( NULL AS INTEGER ) - col2 AS col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 2 AS col0 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT ALL col0 + col2 * col1 + col1 * + col1 AS col2 FROM tab1 cor0
----
1497
2083
734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + - col0 * + 32 col0 FROM tab2 AS cor0
----
-217
-2418
-2449

query I rowsort
SELECT DISTINCT col0 * cor0.col0 + - ( col1 ) FROM tab0 AS cor0
----
1128
490
7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col0 + - col0 ) col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 * col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT - col1 + + col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( - col2 ) FROM tab0
----
1
33
82

query I rowsort
SELECT ALL 74 FROM tab1
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) * ( - col1 ) + + col1 col2 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL + 43 * - col2 AS col1 FROM tab0 AS cor0
----
-1419
-3526
-43

query I rowsort
SELECT - + ( col1 ) + col0 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL + ( - col0 ) + col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - 43 + col1 * - ( 22 ) FROM tab0 AS cor0
----
-1935
-2045
-2177

onlyif mysql # use DIV operator for integer division
query I rowsort label-9695
SELECT ALL - + col1 DIV col1 + + col0 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-9695
SELECT ALL - + col1 / col1 + + col0 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT + 77 * - tab1.col0 AS col2 FROM tab1
----
-231
-4928
-6160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 * - tab0.col1 col2 FROM tab0
----
7912
8372
8924

onlyif mysql # use DIV operator for integer division
query I rowsort label-9698
SELECT 75 DIV col2 AS col1 FROM tab0 AS cor0
----
0
2
75

skipif mysql # not compatible
query I rowsort label-9698
SELECT 75 / col2 AS col1 FROM tab0 AS cor0
----
0
2
75

query I rowsort
SELECT col2 + - col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9700
SELECT DISTINCT - + col0 DIV + col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9700
SELECT DISTINCT - + col0 / + col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT DISTINCT - 79 FROM tab0 AS cor0
----
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( col2 ) col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + 44 + + col1 FROM tab0
----
130
135
141

query I rowsort
SELECT col0 - - tab1.col1 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT col0 + col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT - 8 - col0 FROM tab1
----
-11
-72
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + + col1 col0 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - + cor0.col2 AS col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + cor0.col1 * 86 AS col2 FROM tab1 AS cor0
----
1118
2236
860

query I rowsort
SELECT ALL col1 * + col1 * + col0 + + col0 FROM tab1 AS cor0
----
13600
2031
6464

query I rowsort
SELECT DISTINCT + col1 + - 32 FROM tab0 AS cor0
----
54
59
65

query I rowsort
SELECT DISTINCT 41 * - col2 FROM tab1
----
-2214
-2337
-3936

query I rowsort
SELECT ALL + col1 - 19 AS col2 FROM tab1 cor0
----
-6
-9
7

query I rowsort
SELECT - + col1 + cor0.col2 * 15 AS col1 FROM tab0 AS cor0
----
-82
1139
409

query I rowsort
SELECT DISTINCT tab1.col2 + + col2 FROM tab1
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9716
SELECT ALL + col2 + tab2.col2 + - CAST( NULL AS SIGNED ) * + ( col2 + + col2 ) col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9716
SELECT ALL + col2 + tab2.col2 + - CAST ( NULL AS INTEGER ) * + ( col2 + + col2 ) col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 9 * col2 FROM tab2
----
234
243
342

query I rowsort
SELECT 14 FROM tab0
----
14
14
14

query I rowsort
SELECT - tab1.col1 + + col0 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT + 85 - col1 AS col1 FROM tab2
----
26
54
68

query I rowsort
SELECT col0 + - col0 * 1 * tab0.col1 AS col2 FROM tab0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # use DIV operator for integer division
query I rowsort label-9723
SELECT ALL col1 + col1 DIV + col1 + - tab2.col2 AS col1 FROM tab2
----
-20
34
5

skipif mysql # not compatible
query I rowsort label-9723
SELECT ALL col1 + col1 / + col1 + - tab2.col2 AS col1 FROM tab2
----
-20
34
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-9724
SELECT - col0 + col1 * col2 * col1 - - 27 DIV col1 FROM tab0 AS cor0
----
244044
678953
9374

skipif mysql # not compatible
query I rowsort label-9724
SELECT - col0 + col1 * col2 * col1 - - 27 / col1 FROM tab0 AS cor0
----
244044
678953
9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-9725
SELECT col1 * 55 DIV - col2 FROM tab1 AS cor0
----
-26
-7
-9

skipif mysql # not compatible
query I rowsort label-9725
SELECT col1 * 55 / - col2 FROM tab1 AS cor0
----
-26
-7
-9

query I rowsort
SELECT - ( 17 ) + cor0.col2 - - col2 FROM tab2 AS cor0
----
35
37
59

query I rowsort
SELECT DISTINCT - 10 + col2 AS col1 FROM tab0 AS cor0
----
-9
23
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-9728
SELECT ALL - col2 + + 73 DIV col1 FROM tab2 AS cor0
----
-25
-25
-34

skipif mysql # not compatible
query I rowsort label-9728
SELECT ALL - col2 + + 73 / col1 FROM tab2 AS cor0
----
-25
-25
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 13 * col1 - - col0 col1 FROM tab1 AS cor0
----
-335
-66
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 3 col1 FROM tab1 cor0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - 48 * 14 + - col1 FROM tab0 AS cor0
----
-758
-763
-769

query I rowsort
SELECT DISTINCT - + 6 - 1 FROM tab0 AS cor0
----
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9733
SELECT + col1 DIV + col1 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-9733
SELECT + col1 / + col1 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
27
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-9734
SELECT + + ( + col0 ) * col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-9734
SELECT + + ( + col0 ) * col1 / + col0 AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - col2 + col1 * col0 FROM tab2 cor0
----
1305
190
4576

query I rowsort
SELECT ALL col1 * 84 * + 97 FROM tab1
----
105924
211848
81480

query I rowsort
SELECT - col1 * + tab2.col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL + ( - 60 ) + - col2 AS col1 FROM tab2
----
-86
-87
-98

query I rowsort
SELECT DISTINCT 60 FROM tab2, tab2 AS cor0
----
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-9740
SELECT col2 DIV - col1 + col1 DIV - 62 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9740
SELECT col2 / - col1 + col1 / - 62 AS col2 FROM tab0
----
-1
-1
-1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0 CROSS JOIN tab1, tab0 cor1
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT DISTINCT + 14 - col1 AS col0 FROM tab1
----
-12
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-9743
SELECT col2 DIV col2 + col0 - ( + col2 ) AS col1 FROM tab0
----
-8
35
8

skipif mysql # not compatible
query I rowsort label-9743
SELECT col2 / col2 + col0 - ( + col2 ) AS col1 FROM tab0
----
-8
35
8

query I rowsort
SELECT ALL - 99 + 21 + - col2 AS col2 FROM tab2
----
-104
-105
-116

query I rowsort
SELECT - ( - 24 ) FROM tab0 AS cor0
----
24
24
24

query I rowsort
SELECT + ( col2 ) * col1 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col2 + col1 * - col1 col0 FROM tab2 AS cor0
----
-234
-3396
-903

query I rowsort
SELECT - - 89 + col0 FROM tab2 AS cor0
----
167
168
96

query I rowsort
SELECT 11 AS col2 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT 92 FROM tab0 cor0
----
92
92
92

query I rowsort
SELECT + 94 AS col1 FROM tab1 AS cor0
----
94
94
94

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab2 AS cor0, tab0 AS cor1
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT col2 * - col1 + - 46 * + tab2.col0 AS col2 FROM tab2
----
-1159
-4280
-5122

query I rowsort
SELECT ALL - - ( + col2 ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + 63 + col0 FROM tab2 AS cor0
----
141
142
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-9756
SELECT DISTINCT + - cor0.col0 DIV cor0.col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9756
SELECT DISTINCT + - cor0.col0 / cor0.col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT DISTINCT + ( col2 ) AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT col1 + + 87 * + col1 FROM tab1 AS cor0
----
1144
2288
880

query I rowsort
SELECT ALL + + col0 + - 14 AS col1 FROM tab0 AS cor0
----
10
21
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-9760
SELECT DISTINCT - col1 + - cor0.col2 DIV + col0 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-9760
SELECT DISTINCT - col1 + - cor0.col2 / + col0 FROM tab1 AS cor0
----
-10
-14
-44

query I rowsort
SELECT col0 + 54 AS col2 FROM tab2
----
132
133
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-9762
SELECT - 85 DIV tab1.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 96308c1047e27c000d229f71df430662

skipif mysql # not compatible
query I rowsort label-9762
SELECT - 85 / tab1.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 96308c1047e27c000d229f71df430662

query I rowsort
SELECT ALL - tab2.col2 * col2 + tab2.col0 + - tab2.col1 AS col1 FROM tab2
----
-1382
-657
-753

query I rowsort
SELECT 45 FROM tab1, tab1 cor0 CROSS JOIN tab0
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab0, tab0 cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT ALL + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9767
SELECT DISTINCT + + 37 + col2 DIV - col0 FROM tab2 AS cor0
----
34
37

skipif mysql # not compatible
query I rowsort label-9767
SELECT DISTINCT + + 37 + col2 / - col0 FROM tab2 AS cor0
----
34
37

query I rowsort
SELECT DISTINCT + col2 * 62 - - col2 FROM tab1 AS cor0
----
3402
3591
6048

query I rowsort
SELECT ALL - 49 AS col2 FROM tab0 AS cor0
----
-49
-49
-49

query I rowsort
SELECT 71 AS col0 FROM tab2 AS cor0
----
71
71
71

query I rowsort
SELECT DISTINCT + 92 * + col0 * + col2 + col1 + + 79 * + col1 FROM tab1 cor0
----
16984
336416
707600

query I rowsort
SELECT + 28 AS col0 FROM tab2 AS cor0
----
28
28
28

query I rowsort
SELECT 35 + - 62 FROM tab0 AS cor0
----
-27
-27
-27

query I rowsort
SELECT ALL + cor0.col0 + col0 + col2 AS col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT ALL + col1 + + col1 FROM tab0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9776
SELECT ALL + CAST( NULL AS SIGNED ) + + cor1.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9776
SELECT ALL + CAST ( NULL AS INTEGER ) + + cor1.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 39 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT + + col2 + col2 * ( col2 ) AS col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT - - 35 * - cor0.col0 + + ( + cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1224
-3033
-807

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col2 + - col1 * col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * + col1 + - col1 col0 FROM tab0 AS cor0
----
7310
8190
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-9783
SELECT - 91 DIV + col0 + + col0 AS col0 FROM tab1 AS cor0
----
-27
63
79

skipif mysql # not compatible
query I rowsort label-9783
SELECT - 91 / + col0 + + col0 AS col0 FROM tab1 AS cor0
----
-27
63
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9784
SELECT ALL + col1 * col1 + + CAST( + col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
7429
8363
9410

skipif mysql # not compatible
query I rowsort label-9784
SELECT ALL + col1 * col1 + + CAST ( + col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - col0 + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 - col0 * + col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + 98 col1 FROM tab1 AS cor0
----
2
41
44

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 1c1b1a313871216b88e662d7d3078b12

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 - + col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT + - col1 + - 36 FROM tab1 AS cor0
----
-46
-49
-62

query I rowsort
SELECT ALL + col1 * 46 AS col0 FROM tab1 AS cor0
----
1196
460
598

query I rowsort
SELECT ALL - col1 * + ( + col0 ) + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL - - col1 * col0 + 48 FROM tab2 AS cor0
----
1391
265
4650

query I rowsort
SELECT DISTINCT + col2 * + ( col1 ) - + col1 * + col0 * - col1 AS col2 FROM tab1 AS cor0
----
14768
3432
6970

query I rowsort
SELECT + col2 + 16 AS col0 FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT + col0 + + ( - col0 ) * - col2 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT + + cor0.col2 * 25 * col0 FROM tab0 AS cor0
----
182450
19800
875

query I rowsort
SELECT ALL + col2 + - col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col2 * + 98 FROM tab0 AS cor0
----
3234
8036
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9800
SELECT ALL - col0 * - CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-9800
SELECT ALL - col0 * - CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT cor0.col0 * - ( - col2 ) FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9802
SELECT DISTINCT + cor0.col2 DIV 71 AS col2 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort label-9802
SELECT DISTINCT + cor0.col2 / 71 AS col2 FROM tab2 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - + col1 * 54 AS col2 FROM tab2 AS cor0
----
-1674
-3186
-918

query I rowsort
SELECT 98 FROM tab0 AS cor0
----
98
98
98

query I rowsort
SELECT DISTINCT + 56 FROM tab0, tab0 AS cor0, tab1 cor1
----
56

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col2 AS REAL ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT col1 * - col2 + - col1 FROM tab1 cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL col2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - + 7 + - col1 FROM tab2 AS cor0
----
-24
-38
-66

query I rowsort
SELECT ALL 56 * - col1 + col2 AS col2 FROM tab0 AS cor0
----
-4783
-5014
-5431

query I rowsort
SELECT - cor0.col0 * cor0.col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT col1 * + col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT 46 + col2 * tab0.col0 * - ( - 40 ) + - col0 AS col0 FROM tab0
----
1411
291877
31702

query I rowsort
SELECT - cor0.col1 * + col0 + - 7 * - col0 * - col0 FROM tab2 AS cor0
----
-45030
-47190
-560

query I rowsort
SELECT DISTINCT + 48 AS col2 FROM tab0, tab1 AS cor0
----
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-9818
SELECT + col1 + + col1 + ( col2 ) DIV col1 AS col2 FROM tab0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-9818
SELECT + col1 + + col1 + ( col2 ) / col1 AS col2 FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-9819
SELECT DISTINCT + col0 DIV + col2 + ( col2 ) * - col2 col0 FROM tab1
----
-2916
-3248
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9819
SELECT DISTINCT + col0 / + col2 + ( col2 ) * - col2 col0 FROM tab1
----
-2916
-3248
-9216

query I rowsort
SELECT col1 + - col2 * 75 FROM tab0 AS cor0
----
-2389
-6059
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - cor0.col2 col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9822
SELECT DISTINCT col0 DIV col0 col0 FROM tab1
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9822
SELECT DISTINCT col0 / col0 col0 FROM tab1
----
1

query I rowsort
SELECT ALL + col2 + col1 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT col1 + - col0 + + col2 FROM tab0
----
63
84
95

query I rowsort
SELECT DISTINCT + col0 FROM tab0 WHERE NULL = col2
----

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0 WHERE NOT col1 NOT BETWEEN + col2 * - col1 AND NULL
----

query I rowsort
SELECT col2 * col1 + + col1 AS col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT col1 * - col1 * + col1 - - col1 AS col2 FROM tab0
----
-635970
-753480
-912576

query I rowsort
SELECT ALL - - col0 + col1 + col1 AS col0 FROM tab1 AS cor0
----
106
55
84

query I rowsort
SELECT - tab0.col0 - - col0 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * col2 + col1 + col2 AS col1 FROM tab2
----
-1449
-591
-779

query I rowsort
SELECT ALL - col1 * col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col2 + col2 + - col0 AS col1 FROM tab2
----
-7
-78
-79

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 ALL - col1 * col1 + + col2 * + col2 * col0 FROM tab2
----
113787
4142
49247

query I rowsort
SELECT cor0.col1 * - cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 75a608bf2ba236d24f146ac4aff9ec52

query I rowsort
SELECT DISTINCT 77 * - col0 AS col2 FROM tab0
----
-1848
-2695
-6853

onlyif mysql # use DIV operator for integer division
query I rowsort label-9838
SELECT DISTINCT - 87 DIV + col2 AS col0 FROM tab0
----
-1
-2
-87

skipif mysql # not compatible
query I rowsort label-9838
SELECT DISTINCT - 87 / + col2 AS col0 FROM tab0
----
-1
-2
-87

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT - + cor0.col0 + - col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL col1 * tab1.col0 FROM tab1 WHERE NOT + col2 <> col1 * + col1 * + tab1.col1
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL <= + col1
----

query I rowsort
SELECT ALL - col2 + col1 AS col0 FROM tab1
----
-28
-47
-83

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL <> col1 * + col2
----

query I rowsort
SELECT tab2.col1 * tab2.col0 + + col0 * tab2.col0 AS col2 FROM tab2
----
10686
266
7584

query I rowsort
SELECT + col1 * - col1 AS col1 FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9847
SELECT col1 + col1 * col2 DIV + col0 FROM tab1
----
18
28
494

skipif mysql # not compatible
query I rowsort label-9847
SELECT col1 + col1 * col2 / + col0 FROM tab1
----
18
28
494

query I rowsort
SELECT col2 * col0 * + col1 - col0 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT ALL col2 * + col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL + col1 * col2 * col1 AS col2 FROM tab0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-9851
SELECT col1 DIV + col2 AS col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9851
SELECT col1 / + col2 AS col2 FROM tab0
----
1
2
97

query I rowsort
SELECT - col1 * + col1 AS col2 FROM tab1
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + tab0.col2 col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - col1 * - tab0.col0 * + col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col0 + tab2.col1 * + col2 + col0 * col0 FROM tab2
----
13128
13702
935

query I rowsort
SELECT - col0 + col1 * + col0 + tab2.col0 * - col1 FROM tab2
----
-7
-78
-79

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( + col2 )
----

query I rowsort
SELECT DISTINCT col0 * tab1.col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col0 * col0 AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT col1 * col1 FROM tab0 WHERE NOT NULL NOT IN ( + col1 + - col1 * - col0 + - col1 * tab0.col1 )
----

query I rowsort
SELECT ALL col0 + col0 + tab2.col1 * - col0 AS col1 FROM tab2
----
-1185
-203
-4446

query I rowsort
SELECT col2 * col1 + - col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT ALL - col0 * + col1 AS col2 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 - + col0 col0 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9865
SELECT ALL + col2 - col1 DIV col0 AS col2 FROM tab2
----
23
26
38

skipif mysql # not compatible
query I rowsort label-9865
SELECT ALL + col2 - col1 / col0 AS col2 FROM tab2
----
23
26
38

query I rowsort
SELECT col1 * + tab0.col1 - col2 AS col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT - col1 * - col2 * col2 AS col0 FROM tab0
----
611884
93654
97

query I rowsort
SELECT ALL - col1 * - col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - col1 FROM tab0 WHERE NOT - col2 + - col0 NOT IN ( col1 )
----

query I rowsort
SELECT DISTINCT + col1 * col2 AS col2 FROM tab0
----
2838
7462
97

query III rowsort
SELECT * FROM tab1 WHERE ( col2 / - col1 + + col0 ) NOT BETWEEN NULL AND ( col1 )
----
64
10
57
80
13
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 col0 FROM tab1, tab2, tab1 AS cor0, tab0
----
81 values hashing to 92c9dcf04a06d25c174ffa715aa22fcf

query I rowsort
SELECT DISTINCT + col2 + 63 * + col2 AS col1 FROM tab1
----
3456
3648
6144

query I rowsort
SELECT - tab2.col1 + col1 AS col2 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 5 col0 FROM tab2 AS cor0
----
-5

query I rowsort
SELECT ALL col1 * - 19 AS col0 FROM tab2 cor0
----
-1121
-323
-589

query I rowsort
SELECT col1 + - col2 + col0 AS col2 FROM tab2 AS cor0
----
11
111
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9878
SELECT - + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9878
SELECT - + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 74 AS col0 FROM tab2 AS cor0
----
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9880
SELECT + col2 * - col0 + + CAST( NULL AS SIGNED ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9880
SELECT + col2 * - col0 + + CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + cor0.col1 - - col0 AS col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL 38 * col1 + - cor0.col0 FROM tab0 AS cor0
----
3244
3369
3651

query I rowsort
SELECT DISTINCT + - 65 * - col1 AS col1 FROM tab2 AS cor0
----
1105
2015
3835

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 39 + col2 - + col2 * - col2 col0 FROM tab1 AS cor0
----
2931
3267
9273

query I rowsort
SELECT DISTINCT + col0 * + col2 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL 69 * cor0.col1 FROM tab1 AS cor0
----
1794
690
897

query I rowsort
SELECT DISTINCT + 72 + + col1 AS col0 FROM tab1 AS cor0
----
82
85
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9888
SELECT - col0 + cor0.col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9888
SELECT - col0 + cor0.col2 * 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-9889
SELECT ALL + + col0 * col2 + CAST( col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
165
3712
7760

skipif mysql # not compatible
query I rowsort label-9889
SELECT ALL + + col0 * col2 + CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - col0 * - col2 + + col0 - - 56 AS col2 FROM tab0 AS cor0
----
126
7443
872

query I rowsort
SELECT + col1 + col0 * col0 AS col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + - col0 + + col1 AS col2 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * col1 + - 10 col2 FROM tab0 AS cor0
----
7386
8271
9399

query I rowsort
SELECT ALL + col2 * 6 * col0 - 29 AS col1 FROM tab0
----
181
43759
4723

query I rowsort
SELECT DISTINCT - 91 FROM tab2, tab0, tab2 AS cor0
----
-91

query I rowsort
SELECT - col0 - + tab0.col2 AS col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT col0 + - col2 * col0 - + col1 AS col2 FROM tab0
----
-7300
-854
-97

query I rowsort
SELECT ALL col0 + col0 - col2 FROM tab2
----
-13
120
130

query I rowsort
SELECT ALL 20 - + 91 FROM tab1
----
-71
-71
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9900
SELECT + + cor0.col2 DIV - col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9900
SELECT + + cor0.col2 / - col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT ALL + col1 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT DISTINCT + ( + col1 + col2 ) AS col1 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9903
SELECT - col0 DIV + col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9903
SELECT - col0 / + col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 20 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
20

query I rowsort
SELECT 96 FROM tab1, tab0 cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT cor0.col1 * + 68 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 65dbc8b876546bffecf24880ae4b79f9

query I rowsort
SELECT - col2 * - col0 + col2 * - col1 + col0 AS col0 FROM tab2 AS cor0
----
-641
2435
572

query I rowsort
SELECT ALL + tab0.col2 * col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 + 4 * + 3 + - col1 FROM tab1 AS cor0
----
-2930
-3247
-9217

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 45 * col1 col1 FROM tab0 AS cor0
----
3870
4095
4365

query I rowsort
SELECT DISTINCT - 35 * - col0 - - ( col0 ) * - col0 AS col0 FROM tab2 AS cor0
----
-3354
-3476
196

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + 70 * + col1 AS col0 FROM tab0 AS cor0
----
6020
6370
6790

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0, tab0 AS cor0, tab1 cor1
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT + ( col1 ) * + ( - cor0.col1 ) FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col0 col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT - 48 + col1 FROM tab1 AS cor0
----
-22
-35
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col1 * + 60 col2 FROM tab0 AS cor0
----
-5074
-5369
-5723

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col2 col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9920
SELECT - col0 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9920
SELECT - col0 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab1, tab1 AS cor0, tab0 cor1
----
93

query I rowsort
SELECT DISTINCT + - col0 * + 21 AS col0 FROM tab0 AS cor0
----
-1869
-504
-735

query I rowsort
SELECT DISTINCT 31 * cor0.col2 AS col0 FROM tab2 AS cor0
----
1178
806
837

query I rowsort
SELECT ALL + + col1 * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 16 - + 8 * + col1 AS col2 FROM tab2 AS cor0
----
-152
-264
-488

query I rowsort
SELECT DISTINCT 81 + + col0 AS col0 FROM tab0 AS cor0
----
105
116
170

query I rowsort
SELECT ( ( + col2 ) ) * ( - col1 ) + cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - 2 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT - - ( - 83 ) + + col1 FROM tab0 AS cor0
----
14
3
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col1 col0 FROM tab0 cor0
----
-2064
-3395
-8099

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 ALL - - col1 * col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ( - 19 ) + col1 * + col0 FROM tab0 AS cor0
----
2045
3376
8080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9935
SELECT DISTINCT - ( + col1 ) * col0 + + CAST( + ( col1 ) AS SIGNED ) * + col2 AS col1 FROM tab2 AS cor0
----
-3068
-697
620

skipif mysql # not compatible
query I rowsort label-9935
SELECT DISTINCT - ( + col1 ) * col0 + + CAST ( + ( col1 ) AS INTEGER ) * + col2 AS col1 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT DISTINCT + + col1 * col0 + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - - col0 * + col1 * col2 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - 14 * - ( + col2 ) + + 55 AS col0 FROM tab0 AS cor0
----
1203
517
69

query I rowsort
SELECT ALL + tab2.col0 * ( col2 ) + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL + col1 + - col0 * + col2 * col1 FROM tab0
----
-3298
-664027
-68026

query I rowsort
SELECT DISTINCT col0 * ( + col0 ) + + col1 AS col1 FROM tab1
----
35
4106
6413

query I rowsort
SELECT + - 94 * col0 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-336
-6073
-7616

query I rowsort
SELECT ALL col0 * + col1 + col2 - tab1.col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT ( 63 ) * col0 * + 89 AS col1 FROM tab1 AS cor0
----
16821
358848
448560

query I rowsort
SELECT - + 97 * + col1 FROM tab1 cor0
----
-1261
-2522
-970

query I rowsort
SELECT - cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - 47 + col1 FROM tab0 AS cor0
----
39
44
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-9948
SELECT DISTINCT + - 30 + - col1 DIV col2 AS col0 FROM tab0 cor0
----
-127
-31
-32

skipif mysql # not compatible
query I rowsort label-9948
SELECT DISTINCT + - 30 + - col1 / col2 AS col0 FROM tab0 cor0
----
-127
-31
-32

query I rowsort
SELECT - 40 + col2 FROM tab2 AS cor0
----
-13
-14
-2

query I rowsort
SELECT DISTINCT 25 + cor0.col1 * col0 FROM tab1 AS cor0
----
103
1065
665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9951
SELECT - CAST( NULL AS SIGNED ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9951
SELECT - CAST ( NULL AS INTEGER ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 47 col1 FROM tab1, tab2 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 905cbd63e2561d7f32ce36091d5b526a

query I rowsort
SELECT DISTINCT - ( col0 * col0 ) + + col2 AS col0 FROM tab2
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-9954
SELECT - col1 DIV ( - col0 ) + + ( + col0 ) FROM tab1
----
11
64
80

skipif mysql # not compatible
query I rowsort label-9954
SELECT - col1 / ( - col0 ) + + ( + col0 ) FROM tab1
----
11
64
80

query I rowsort
SELECT ( + 13 ) AS col0 FROM tab2
----
13
13
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9956
SELECT CAST( ( - col1 ) AS SIGNED ) * + 36 AS col1 FROM tab0
----
-3096
-3276
-3492

skipif mysql # not compatible
query I rowsort label-9956
SELECT CAST ( ( - col1 ) AS INTEGER ) * + 36 AS col1 FROM tab0
----
-3096
-3276
-3492

onlyif mysql # use DIV operator for integer division
query I rowsort label-9957
SELECT + col1 DIV + col2 + 58 col0 FROM tab0 AS cor0
----
155
59
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9957
SELECT + col1 / + col2 + 58 col0 FROM tab0 AS cor0
----
155
59
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + cor0.col2 col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + col1 * col2 * + col2 AS col0 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT - col2 * col1 AS col0 FROM tab2
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-9961
SELECT + col2 DIV col1 AS col0 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9961
SELECT + col2 / col1 AS col0 FROM tab2
----
0
0
2

query I rowsort
SELECT ALL - 19 AS col0 FROM tab2
----
-19
-19
-19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9963
SELECT CAST( col0 AS SIGNED ) * - col0 FROM tab2
----
-49
-6084
-6241

skipif mysql # not compatible
query I rowsort label-9963
SELECT CAST ( col0 AS INTEGER ) * - col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL + 75 AS col2 FROM tab0
----
75
75
75

query I rowsort
SELECT ALL + col0 * tab0.col2 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 38 * col2 + col2 * 22 FROM tab1 cor0
----
3240
3420
5760

query I rowsort
SELECT - 88 + - col2 * - col2 * - 79 FROM tab0 AS cor0
----
-167
-531284
-86119

query I rowsort
SELECT + - col1 + + col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + + col1 * col0 + - cor0.col1 * col1 * - col2 + - col1 AS col1 FROM tab1 AS cor0
----
17251
36556
6330

query I rowsort
SELECT + 7 + col1 * col0 FROM tab2 AS cor0
----
1350
224
4609

query I rowsort
SELECT - col1 + - 24 * 4 FROM tab2
----
-113
-127
-155

query I rowsort
SELECT + 74 FROM tab1, tab0 cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT ALL + col1 * - 68 + - col2 + - cor0.col1 FROM tab2 AS cor0
----
-1211
-2166
-4097

query I rowsort
SELECT ALL cor0.col1 + col1 * col0 - + cor0.col0 * + col0 FROM tab1 cor0
----
-3446
-5347
95

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
64

query I rowsort
SELECT DISTINCT - + col2 * 81 AS col2 FROM tab0 AS cor0
----
-2673
-6642
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9977
SELECT CAST( - col0 AS SIGNED ) DIV - col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-9977
SELECT CAST ( - col0 AS INTEGER ) / - col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT col2 * ( col2 ) + + col0 * cor0.col2 FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT col1 + 57 FROM tab2 AS cor0
----
116
74
88

query I rowsort
SELECT - cor0.col0 + + 70 FROM tab0 AS cor0
----
-19
35
46

query I rowsort
SELECT + cor0.col2 + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + col2 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT 51 * + col2 FROM tab2
----
1326
1377
1938

query I rowsort
SELECT - + col0 * + 41 + col0 + col2 FROM tab0 AS cor0
----
-1399
-3478
-927

query I rowsort
SELECT - 35 AS col0 FROM tab1
----
-35
-35
-35

query I rowsort
SELECT ALL 79 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT tab0.col1 * + col1 * col1 AS col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT - + 78 AS col1 FROM tab2, tab0, tab2 cor0
----
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - cor0.col1 col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT - col0 * ( + 2 ) FROM tab0 AS cor0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * - col2 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + + col1 + + 80 AS col2 FROM tab0 AS cor0
----
166
171
177

onlyif mysql # use DIV operator for integer division
query I rowsort label-9993
SELECT DISTINCT col2 DIV - col0 FROM tab0 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9993
SELECT DISTINCT col2 / - col0 FROM tab0 cor0
----
-1
0

query I rowsort
SELECT - col1 + col1 * + col0 AS col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT - + 59 AS col2 FROM tab1 AS cor0
----
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col1 ) * + col1 col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + - cor0.col0 + + col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9999
SELECT - col0 DIV + cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9999
SELECT - col0 / + cor0.col1 FROM tab0 AS cor0
----
0
0
0