sqllogictest
Check-in [2663d48f3c]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initial set of test files with "random" selects. slt_bad_*.proto produced different results on the engines, or didn't run at all. slt_good_*.proto produced exactly the same results with both SQLite and MSSQL, with mostly the same results on MySQL. Will be updating these to skip more tests MySQL has problems with.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2663d48f3c2244e4312f741cd8f11bd13ce56124
User & Date: shaneh 2008-12-05 23:09:45
Context
2008-12-06
02:02
Add the "onlyif" condition prefix. Implement hash checking of skipped by labeled queries in verify mode. check-in: 4e38bbb44f user: drh tags: trunk
2008-12-05
23:09
Initial set of test files with "random" selects. slt_bad_*.proto produced different results on the engines, or didn't run at all. slt_good_*.proto produced exactly the same results with both SQLite and MSSQL, with mostly the same results on MySQL. Will be updating these to skip more tests MySQL has problems with. check-in: 2663d48f3c user: shaneh tags: trunk
20:33
Added "skipif" logic. Added xGetEngineName() method to each interface. This may be different then the registered named for ODBC connections, "ODBC3". Various tweaks to error messges. check-in: 0a1f217d6b user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added proto/random/select/slt_bad_0.proto.





































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2

query I rowsort
SELECT + cor0.col0 + cor0.col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT 55 * + 76 / + col2 - + tab0.col0 FROM tab0

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col0 / - ( + col2 ) + col1 AS col0 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 ), tab0 AS cor2

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 81 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 41 AS col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1

query I rowsort
SELECT - + cor1.col0 AS col2 FROM tab0 AS cor0 JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab1 cor2, tab1 cor3

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + 73 AS col1 FROM tab0, tab0, tab1 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab1 cor2

query I rowsort
SELECT ALL - col1 * col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab1 cor0 NATURAL INNER JOIN tab0 cor1

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab2, tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 NATURAL INNER JOIN tab0, tab1, tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 JOIN tab1

query I rowsort
SELECT ALL - 64 FROM tab2 AS cor0 JOIN tab0 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col2 )

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

query I rowsort
SELECT - col1 / col2 AS col1 FROM tab2 AS cor0

query IIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT 8 / col0 + col1 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - cor1.col0 + 77 / + cor0.col1 FROM tab2 AS cor0 INNER JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

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

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab2 AS cor1

query I rowsort
SELECT ALL - 65 AS col0 FROM tab2, tab0, tab2 cor0, tab2

query III rowsort
SELECT DISTINCT * FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab2 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT OUTER JOIN tab0 cor1

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col1 ), tab2 AS cor2, tab0, tab0 AS cor3

query I rowsort
SELECT 8 / col2 + + col1 AS col2 FROM tab2 cor0

query I rowsort
SELECT - tab2.col2 / col2 AS col1 FROM tab2

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col1, col1, col1, col2, col0, col2, col1 )

query I rowsort
SELECT ALL + col2 + + col1 * - tab2.col2 / - col0 AS col1 FROM tab2

query I rowsort
SELECT ALL - 21 / col2 + col0 * col1 FROM tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 NATURAL INNER JOIN tab0

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

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 * + col0 / - 4 FROM tab2 cor0

query I rowsort
SELECT + - 80 / - col2 col1 FROM tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col1, col1, col2, col0 )

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0, tab0 AS cor1

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col1, col1, col1, col0, col0, col1, col2, col1 )

query I rowsort
SELECT DISTINCT + - cor0.col0 * + cor1.col1 AS col0 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col0, col1, col1, col0, col2, col0 )

query I rowsort
SELECT DISTINCT - col2 * + col2 / cor0.col0 + - 36 + cor0.col1 AS col0 FROM tab0 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col2 + col2 + - col2 * - col0 / + col1 FROM tab1

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col0 * + 11 / - tab0.col0 + + ( - col0 + col0 * - ( + col0 ) ) FROM tab0

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 AS cor1

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

query I rowsort
SELECT DISTINCT cor1.col2 AS col2 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + - ( cor0.col2 ) / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT - + 12 * 7 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col0 - col2 / ( col2 ) AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT DISTINCT cor3.col0 + + cor0.col0 AS col2 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab0 AS cor2, tab0, tab2 AS cor3

query I rowsort
SELECT ALL + col2 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1

query I rowsort
SELECT col2 + + col1 FROM tab0 AS cor0 NATURAL JOIN tab0 WHERE NOT ( NULL ) <= ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0 USING ( col2 )

query I rowsort
SELECT + 56 AS col1 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT ALL - tab2.col0 + col1 / + col2 FROM tab2

query I rowsort
SELECT + tab0.col2 * - col1 / + col0 AS col1 FROM tab0

query I rowsort
SELECT DISTINCT tab2.col2 / tab2.col2 FROM tab2

query I rowsort
SELECT - tab0.col2 FROM tab0, tab2, tab2 cor0, tab2

query I rowsort
SELECT - 91 / + col2 + + ( col2 ) AS col0 FROM tab2 cor0

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 JOIN tab2, tab1 cor1, tab2 AS cor2

query I rowsort
SELECT - col0 + - cor1.col1 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT cor0.col0 * - cor0.col2 AS col0 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT - col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT + col1 - + col2 * - cor1.col2 FROM tab2 cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + col0 + col1 / - tab2.col2 FROM tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab0 cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 cor1

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

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

query III rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL - 59 + col1 / col2 + col1 * - col0 FROM tab2

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

Added proto/random/select/slt_bad_1.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT + - col2 * + col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + cor1.col0 * cor1.col0 col1 FROM tab2 AS cor0 JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT ALL col2 / + col2 AS col0 FROM tab2

query III rowsort
SELECT ALL * FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 / + col2 + + 34 AS col1 FROM tab2 cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1

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

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 cor0 JOIN tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab1 AS cor1 USING ( col2 )

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT OUTER JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL - col1 / CAST ( - col2 AS INTEGER ) AS col1 FROM tab2

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2 AS cor1

query III rowsort
SELECT * FROM tab1 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + col0 * cor1.col2 + col2 * - 93 * cor1.col0 AS col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT + 60 AS col0 FROM tab1 AS cor0 LEFT JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( col2 AS INTEGER ) / - col2 + + col0 + + tab2.col1 * - col0 FROM tab2

query III rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1, tab2 AS cor0 JOIN tab0

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

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1, tab2 cor1 USING ( col2, col0, col1, col0, col2 )

query IIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 LEFT OUTER JOIN tab0, tab1 AS cor1 USING ( col0, col0, col1, col0, col1 )

query I rowsort
SELECT DISTINCT 48 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab1, tab0 AS cor1

query I rowsort
SELECT + col1 / col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col1, col0, col2, col2, col2, col2, col0 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT - - cor0.col0 * col1 + col0 AS col1 FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

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

query I rowsort
SELECT - ( + col1 ) * - col1 AS col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

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

query IIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + 14 FROM tab2, tab2, tab2 AS cor0, tab1

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

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab1 cor0 JOIN tab1 AS cor1

query III rowsort
SELECT ALL * FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col1 / cor1.col1 - col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 58 + col2 * - col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + col2 / ( col1 + - col1 ) col0 FROM tab0

query I rowsort
SELECT DISTINCT 42 * - ( tab1.col2 + col1 ) / col1 FROM tab1

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 NATURAL JOIN tab1, tab2 cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL col2 - + 98 col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT + col0 / CAST ( col2 AS INTEGER ) FROM tab2 AS cor0

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

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 JOIN tab1, tab0 cor1 USING ( col1 ), tab0 AS cor2

query IIIII rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL + col0 * - col2 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL ( col2 ) * col0 - + col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 cor1

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT ALL + col1 * col1 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT - col1 * + col0 - + col2 * col2 / col2 AS col0 FROM tab2

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT OUTER JOIN tab2

query I rowsort
SELECT DISTINCT + col0 / + cor0.col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 )

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab0 AS cor1

query IIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col1, col0, col1, col0 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 JOIN tab0 USING ( col1, col1, col1, col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + + col0 + 94 + col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT + + col1 * col0 - cor0.col0 * - col1 / col2 AS col2 FROM tab2 AS cor0

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col1 ), tab1 AS cor2, tab0, tab0 AS cor3

query I rowsort
SELECT + + col2 AS col2 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + cor1.col1 * - col1 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 15 AS col2 FROM tab0, tab0, tab0 AS cor0

skipif mysql
query I rowsort
SELECT + col1 + col0 / CAST ( col0 * col0 AS REAL ) FROM tab1 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL + + col2 / - col2 + + col0 + col2 * col0 * col1 FROM tab2 AS cor0

query I rowsort
SELECT - 22 FROM tab2 AS cor0 NATURAL JOIN tab1, tab0 cor1, tab1 AS cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT - col2 * col2 * col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL cor1.col2 FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col0 ), tab1 AS cor2

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

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT col2 FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL + + col1 + 77 * col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 )

query IIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab0 cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col2, col2, col0, col1, col1, col2, col2, col0, col1, col0 )

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT tab0.col1 * + tab0.col2 / - tab0.col0 + tab0.col0 FROM tab0

query I rowsort
SELECT - tab2.col0 / - col2 FROM tab2

query I rowsort
SELECT - col2 / - col2 + col1 AS col0 FROM tab2

query I rowsort
SELECT - col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

Added proto/random/select/slt_bad_10.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT - + col1 * + col2 / col1 - + col0 FROM tab1 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT - - col2 * + 74 / + col2 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT + col0 / col2 + 38 FROM tab2

query IIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 JOIN tab2

query I rowsort
SELECT - - col0 * - col0 / ( - col2 + col0 ) FROM tab1 AS cor0

query I rowsort
SELECT ALL - - col0 * 65 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 JOIN tab0

query I rowsort
SELECT + cor1.col2 col1 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + ( 25 ) col0 FROM tab1, tab1, tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0 cor1

query I rowsort
SELECT - 70 + - 74 FROM tab1, tab2 cor0, tab0 AS cor1, tab1, tab1 AS cor2

query I rowsort
SELECT ALL + col1 / col2 FROM tab2 cor0

query I rowsort
SELECT DISTINCT 95 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 8 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT - 57 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab1 cor1 USING ( col2 ), tab1 AS cor2

query IIIII rowsort
SELECT ALL * FROM tab1 cor0 NATURAL INNER JOIN tab2, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT + col1 / col2 - + col1 * - ( tab2.col2 ) FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT col0 / ( cor0.col2 * col2 ) - + 69 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 JOIN tab0

query I rowsort
SELECT - 37 col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT col0 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + col0 / col2 col0 FROM tab2 AS cor0

query I rowsort
SELECT ( col0 ) * + col0 / + ( + col2 ) FROM tab0 AS cor0

query I rowsort
SELECT ALL - 77 * col2 + col1 - col1 * - col1 AS col2 FROM tab0 cor0 NATURAL INNER JOIN tab0 AS cor1

query IIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col0, col1 )

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab1 cor1

query IIII rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col0, col0, col2, col2 )

query IIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 INNER JOIN tab1, tab1 cor1 USING ( col2, col1, col2, col2 )

query I rowsort
SELECT ALL + - 28 FROM tab0, tab0, tab1 AS cor0

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

query I rowsort
SELECT col0 / - col2 - col2 AS col0 FROM tab2 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT DISTINCT cor0.col1 * + col0 / col2 FROM tab1 AS cor0

query I rowsort
SELECT - 96 / + ( - col2 ) FROM tab2 AS cor0

query I rowsort
SELECT ALL 42 col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT ALL col2 + - tab2.col1 * + col0 / - 12 AS col1 FROM tab2

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab2 AS cor1, tab1 AS cor2

query I rowsort
SELECT ALL + + 55 FROM tab2, tab0, tab0 AS cor0, tab2

query I rowsort
SELECT DISTINCT - tab2.col0 * - col2 / col1 FROM tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 JOIN tab0

query I rowsort
SELECT ALL 16 / col2 - 71 * col1 AS col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab0, tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT - col0 - - col2 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col1, col0, col2, col1 )

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

query I rowsort
SELECT DISTINCT - col2 * + col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ( + col2 ) + col1 AS col1 FROM tab0 cor0 NATURAL LEFT JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT - col0 / - CAST ( - col2 AS INTEGER ) AS col1 FROM tab2 AS cor0

query I rowsort
SELECT col1 * - col2 + - col0 / col2 col2 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab0, tab1 AS cor1 USING ( col2 )

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2

query IIIIII rowsort
SELECT * FROM tab0 cor0 NATURAL INNER JOIN tab2, tab0 AS cor1

query I rowsort
SELECT + cor0.col0 * cor0.col0 / 15 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT ALL - + col0 + col2 * - col0 / col2 AS col1 FROM tab0 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT 43 FROM tab1 AS cor0 JOIN tab0 cor1 USING ( col2 )

query I rowsort
SELECT + col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab1, tab1 AS cor1, tab0 cor2

query I rowsort
SELECT DISTINCT col0 - tab2.col2 * + col2 / col1 AS col0 FROM tab2

query I rowsort
SELECT - ( - 3 ) FROM tab0, tab0, tab0 AS cor0, tab1

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT ALL - 43 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 )

query IIIIII rowsort
SELECT * FROM tab2 cor0 INNER JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - + col0 * - CAST ( + col2 AS INTEGER ) / + cor0.col1 col2 FROM tab0 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 JOIN tab0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2, tab2 AS cor0, tab0

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT col1 + - 64 / col1 AS col0 FROM tab2 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1 )

query III rowsort
SELECT * FROM tab1 cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT ALL + 86 AS col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT ALL col2 * - col0 * col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT col2 * + col0 + - col1 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col2 / col2 + + col1 AS col1 FROM tab2

query I rowsort
SELECT - + col0 + col0 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT col2 / + col2 + + col0 FROM tab2 AS cor0

query III rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col1 + col2 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT + col1 - - col0 / col2 FROM tab2

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

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) / col2 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + + 62 * - ( cor0.col0 ) / + col2 - + col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT col2 / + CAST ( col2 AS REAL ) AS col1 FROM tab2 cor0

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2, tab2 AS cor1 USING ( col0, col2, col2, col1, col2, col0 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1, tab2 AS cor1 USING ( col0 )

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT - + 58 + - col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + 82 AS col1 FROM tab2, tab2, tab1 AS cor0

Added proto/random/select/slt_bad_100.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL + tab2.col1 / col2 + tab2.col2 FROM tab2

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

skipif mysql
query I rowsort
SELECT DISTINCT - CAST ( + 35 AS INTEGER ) / col2 col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col1 * + col1 / + 48 FROM tab0 AS cor0

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

query I rowsort
SELECT ALL 41 + col1 * - col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + 95 FROM tab0, tab0, tab1 cor0, tab0

query I rowsort
SELECT ALL - + col2 * + col1 / + ( 7 * col0 ) FROM tab1 AS cor0

query I rowsort
SELECT + cor1.col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 JOIN tab2

query I rowsort
SELECT DISTINCT - ( 26 ) AS col0 FROM tab2, tab0 cor0 NATURAL INNER JOIN tab1, tab1 AS cor1, tab0 cor2

query I rowsort
SELECT ALL + col2 + 26 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 88 * - 91 AS col0 FROM tab1, tab2 AS cor0, tab1, tab0 AS cor1

query I rowsort
SELECT + tab0.col2 * - 25 / col1 AS col2 FROM tab0

query I rowsort
SELECT col1 * - cor0.col1 AS col2 FROM tab0 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT 89 / 53 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT 61 + 57 AS col2 FROM tab0, tab0, tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab0, tab1 AS cor1, tab2 cor2

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

query I rowsort
SELECT - col2 * + ( 30 ) / - col0 FROM tab0 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab0, tab1 AS cor1

query I rowsort
SELECT 89 * + col0 / col1 AS col0 FROM tab2

query I rowsort
SELECT + - col0 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT col2 / col2 + + tab2.col1 AS col0 FROM tab2

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

query I rowsort
SELECT + col2 * - col0 / col1 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + col0 / col2 - col0 * + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT - tab2.col2 * + col1 / col2 FROM tab2

query I rowsort
SELECT col1 * + col0 / col1 AS col2 FROM tab1

query I rowsort
SELECT ALL - 75 AS col0 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT 88 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT cor0.col2 / - cor1.col2 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab1 AS cor2

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT cor0.col2 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT DISTINCT cor1.col0 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 cor1

query I rowsort
SELECT - 25 * + col2 / col0 AS col0 FROM tab1

query I rowsort
SELECT DISTINCT + col1 * - col1 / + col0 col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL ( col2 ) * - col0 - - 1 col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - - col0 / - col2 + + ( - cor0.col1 * - col2 ) + + ( 40 ) * + col0 / ( + col1 ) col1 FROM tab1 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab0, tab1 AS cor1 USING ( col0, col2, col2, col0, col0, col1 )

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

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT 93 / 86 - - cor1.col1 col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT tab1.col2 FROM tab0, tab0 cor0 JOIN tab1

query I rowsort
SELECT - col0 + - col1 * - tab2.col1 / + tab2.col2 AS col2 FROM tab2

query I rowsort
SELECT 23 * + col1 / - col0 FROM tab2

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 ), tab0 AS cor2, tab1, tab0 cor3

query I rowsort
SELECT - col2 / ( + col2 ) FROM tab2 cor0

query I rowsort
SELECT + 69 AS col1 FROM tab0, tab0 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT - ( + 6 ) + col0 - col0 * + tab1.col0 / col2 AS col0 FROM tab1

query I rowsort
SELECT ALL - 52 FROM tab1, tab1, tab1 AS cor0

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

query I rowsort
SELECT DISTINCT - col0 * col0 / col2 FROM tab2 cor0

query I rowsort
SELECT ALL + + ( cor0.col2 ) AS col0 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT - 97 FROM tab0 cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT 29 * col1 - col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col0 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT OUTER JOIN tab1 cor1 USING ( col1 ), tab1 AS cor2

query III rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col1, col2, col2, col0 )

query IIIIIIIII rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab1, tab1 AS cor1, tab0 AS cor2

query I rowsort
SELECT ALL col0 * ( col1 ) + + col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col0 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT - ( 16 ) + col0 * + col1 FROM tab1 cor0 NATURAL JOIN tab2 cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1

query I rowsort
SELECT ALL - 1 * col2 + col2 + + 66 / - col2 AS col0 FROM tab2

query I rowsort
SELECT + + cor0.col0 FROM tab1, tab1, tab2 cor0

query I rowsort
SELECT ALL - - col1 * - col2 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 25 * + col0 / - 16 AS col2 FROM tab0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0 JOIN tab2, tab1 AS cor1

query I rowsort
SELECT col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2, tab1 cor1 USING ( col1 )

query I rowsort
SELECT 28 FROM tab0, tab2, tab0 AS cor0, tab0

query I rowsort
SELECT + cor0.col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT ALL col2 + cor0.col0 + cor0.col0 * col2 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col1 + + 52 * - ( - cor0.col1 ) AS col1 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 90 * col0 + 19 / cor0.col2 AS col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0, tab2, tab1 AS cor0, tab0

skipif mysql
query I rowsort
SELECT col0 * + col1 / col2 - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - + ( + col2 ) + col2 * - 38 / 33 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + - col0 / col2 + - 62 FROM tab2 AS cor0

query I rowsort
SELECT - ( - col2 ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + - col1 / + col1 - - 45 AS col1 FROM tab0 cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + 98 + + col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab1, tab2 AS cor1, tab0, tab1 AS cor2

query I rowsort
SELECT DISTINCT - tab2.col1 * tab2.col2 - col1 / col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col1 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - - col1 - col2 * - col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT + cor1.col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT col0 - - 84 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col2 + + col1 / + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT col0 / - cor0.col2 FROM tab2 AS cor0

Added proto/random/select/slt_bad_101.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT - ( - 77 ) + + col0 / ( + col1 ) + - cor0.col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + + ( - col2 ) + + col2 + ( + ( + col1 ) + - col2 ) FROM tab2 cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT - - 56 AS col1 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - cor0.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab2, tab1 AS cor1 USING ( col0, col1, col2, col0 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1, tab0 AS cor1

query I rowsort
SELECT col2 + cor0.col1 * + col1 / col0 + + col2 AS col2 FROM tab0 cor0

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

query I rowsort
SELECT - - 50 col2 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL - 61 - col1 * cor0.col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT ALL + col0 col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col2 * 81 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + col1 col0 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

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

query I rowsort
SELECT ALL 20 AS col1 FROM tab0, tab0, tab0 AS cor0, tab1

query I rowsort
SELECT - 57 + - 18 AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - + col0 * + col0 / + 35 FROM tab1 cor0

query I rowsort
SELECT col2 * - col0 / col1 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab2 USING ( col1, col2, col1, col2, col0, col2, col0 )

query IIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT 48 FROM tab2, tab0 AS cor0 NATURAL INNER JOIN tab0, tab0 AS cor1

query I rowsort
SELECT + - col2 / + ( + cor0.col2 ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL 54 * + 16 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab2, tab1, tab0 AS cor1

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

query I rowsort
SELECT + col2 * - col2 / - 97 AS col0 FROM tab0 AS cor0

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

query I rowsort
SELECT ALL col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT JOIN tab0, tab2 AS cor1 USING ( col2, col1, col0, col0, col1 )

query IIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col2, col2, col2, col1 )

query I rowsort
SELECT - col1 / col2 + - 29 AS col0 FROM tab2 AS cor0

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab0, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT - col0 + col0 * - col0 / + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1, tab0, tab0 AS cor2

skipif mysql
query I rowsort
SELECT + col0 + + CAST ( col2 AS REAL ) / - col0 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + col1 * cor0.col2 col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + cor0.col1 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + ( col2 ) / - col2 + - 23 AS col2 FROM tab2

query I rowsort
SELECT col0 / - col2 + 15 * col1 * tab2.col2 AS col2 FROM tab2

query I rowsort
SELECT ALL + col1 + col0 * col1 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT + cor0.col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT ALL col2 + + col0 / + col2 AS col1 FROM tab2

query I rowsort
SELECT tab0.col2 * col2 + col0 * - col0 / - tab0.col1 + col0 / tab0.col0 FROM tab0

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

query IIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT ALL + col1 AS col0 FROM tab2 AS cor0 LEFT OUTER JOIN tab0 USING ( col1 )

query I rowsort
SELECT ALL - 16 AS col0 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT - - 9 + 58 FROM tab0 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col2, col1, col1, col1 )

query I rowsort
SELECT - + col0 * + 77 * - ( - col0 * 64 ) - - 67 / - cor1.col2 AS col2 FROM tab2 cor0 NATURAL INNER JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab1 cor0 NATURAL INNER JOIN tab1 cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab2 cor2

query I rowsort
SELECT - ( - col1 ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + - 16 * col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col1 * + cor1.col0 AS col0 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT + + 61 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT - col1 FROM tab1 cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT ALL - col1 * - 96 / col2 AS col0 FROM tab2 AS cor0

query III rowsort
SELECT * FROM tab0 cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT 84 FROM tab2, tab0 AS cor0 INNER JOIN tab1, tab1 AS cor1

query I rowsort
SELECT ALL col1 * + col0 / tab1.col2 FROM tab1

skipif mysql
query I rowsort
SELECT - + CAST ( NULL AS REAL ) FROM tab2, tab1 AS cor0 CROSS JOIN tab2, tab1, tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 cor0 INNER JOIN tab0

query I rowsort
SELECT ALL + + col2 * + col1 / col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL tab2.col2 / + col2 FROM tab2

query I rowsort
SELECT + col2 * + col0 / col1 - col2 AS col1 FROM tab2

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

query I rowsort
SELECT col2 / col1 + - col0 * - ( col1 + - col2 ) FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT - - col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab0 cor1 USING ( col2 ), tab2 AS cor2

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT ALL - col2 * + cor0.col0 / 6 + col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 / + ( - col2 ) FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab0 cor0 JOIN tab1 cor1 USING ( col0 )

query I rowsort
SELECT ALL cor0.col0 col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab0 AS cor2

query I rowsort
SELECT ALL col2 / + ( - col0 ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT col0 * 59 AS col2 FROM tab0 cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT DISTINCT - col2 * - 80 / ( + col2 * 70 ) AS col0 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) * + col0 / + 42 + + col0 * col0 FROM tab1 cor0

query I rowsort
SELECT ALL - 80 FROM tab2, tab1 cor0 JOIN tab1, tab2 cor1

query I rowsort
SELECT ( + col1 ) / col2 FROM tab2

query IIIIII rowsort
SELECT * FROM tab1 cor0 NATURAL INNER JOIN tab2, tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0, tab1 AS cor1 USING ( col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2 cor1 USING ( col1 )

query I rowsort
SELECT ALL 23 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT col1 + tab2.col2 * - tab2.col2 / col0 FROM tab2

query I rowsort
SELECT + 70 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2

query I rowsort
SELECT + 12 AS col2 FROM tab2, tab2, tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT + - col2 * + col0 + - col0 AS col0 FROM tab1 cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT col2 + - col1 / 89 + col1 * - col2 / - 7 FROM tab0 AS cor0

query I rowsort
SELECT - - col2 + + ( col0 ) / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 78 / - col2 FROM tab2

query I rowsort
SELECT DISTINCT - col2 / + 43 + ( - col0 ) + - ( + cor0.col0 ) * col0 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT col1 / cor0.col2 FROM tab2 AS cor0

Added proto/random/select/slt_bad_102.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL 58 AS col0 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT ALL + + col2 + + 51 AS col1 FROM tab2 cor0 NATURAL INNER JOIN tab1 cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT tab2.col1 / + ( - ( col2 ) ) + ( tab2.col1 ) col1 FROM tab2

query I rowsort
SELECT ALL + 79 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL col1 + col0 * + 47 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT - col0 * 49 / col2 AS col2 FROM tab2

query I rowsort
SELECT cor1.col0 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab0, tab1 AS cor2

query I rowsort
SELECT + + col0 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL - 52 AS col1 FROM tab2, tab1, tab1 cor0, tab2

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT - col1 + col1 / col2 AS col2 FROM tab2

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 LEFT JOIN tab1

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT JOIN tab0

query I rowsort
SELECT col2 FROM tab0 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT ( + tab2.col2 ) / + col2 FROM tab2

query I rowsort
SELECT DISTINCT ( 72 ) AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + col2 * - col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL INNER JOIN tab1, tab2 AS cor1

query I rowsort
SELECT col1 + cor0.col0 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT 40 AS col1 FROM tab1, tab1 AS cor0 NATURAL JOIN tab0

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab1 cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + ( + ( - col1 ) ) * + ( 75 ) / - tab2.col1 col0 FROM tab2

query I rowsort
SELECT - 30 / + col2 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT JOIN tab0, tab2 AS cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT + + CAST ( NULL AS INTEGER ) * - 62 / - col2 + cor0.col1 + col1 / col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col2 * - col2 / col0 AS col0 FROM tab1

query I rowsort
SELECT col1 * + col0 / + col2 AS col1 FROM tab0

query I rowsort
SELECT ALL col1 * - col1 / - col2 FROM tab0

query I rowsort
SELECT ALL + col2 AS col2 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 35 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT ALL - col2 + col0 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col0 + col1 FROM tab2 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT DISTINCT 96 col1 FROM tab2, tab0 AS cor0 JOIN tab0 USING ( col2, col1, col0, col2 )

query I rowsort
SELECT - col0 * - col1 / + col2 AS col1 FROM tab0

query I rowsort
SELECT ALL - col2 * cor0.col1 - 49 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT DISTINCT + 52 FROM tab1, tab2 AS cor0 JOIN tab2

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 INNER JOIN tab0, tab1, tab1 AS cor1

query I rowsort
SELECT - + col1 * + 40 + + col0 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + - ( - col2 ) * 46 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( + col0 AS REAL ) / - col1 + - col2 * col2 FROM tab1

query I rowsort
SELECT - col2 * col2 + + col1 / col2 + - 45 FROM tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0 NATURAL INNER JOIN tab1, tab1 cor1

query I rowsort
SELECT DISTINCT 60 FROM tab0, tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT DISTINCT 22 FROM tab2 cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL ( 11 ) FROM tab2 AS cor0 JOIN tab0 AS cor1

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

query I rowsort
SELECT ( 43 ) AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL - + 39 / - 13 + cor0.col0 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT - 82 + + ( + col1 ) * - ( - col2 ) / + col0 + + col1 * ( col0 + - cor0.col2 ) FROM tab0 AS cor0

query I rowsort
SELECT ALL - + col2 / ( + cor0.col2 ) - - cor0.col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL - col0 * - col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL 77 / cor0.col0 AS col0 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT - col1 * + col0 / 86 col0 FROM tab0 AS cor0

query I rowsort
SELECT 92 + + col1 / - ( - 89 * cor0.col2 ) FROM tab2 AS cor0

query I rowsort
SELECT - 51 * col0 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT - col2 + col0 * col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 + 23 * - col0 / col1 AS col2 FROM tab1

query I rowsort
SELECT ALL col1 + + 16 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - CAST ( col1 AS INTEGER ) * - col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - 47 / - cor0.col2 AS col0 FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT - + col2 * col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL ( + col2 ) * col1 + col2 * col1 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + cor1.col0 + ( col1 ) + + col2 AS col0 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1, tab1 cor2

query IIIIII rowsort
SELECT ALL * FROM tab1 cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL + 98 * 5 AS col1 FROM tab2 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0, tab0 AS cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1

query I rowsort
SELECT + + col0 + + col1 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab0 cor1

query I rowsort
SELECT ALL ( 93 ) FROM tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT 65 * + col0 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1, tab0, tab0 AS cor2, tab2

query I rowsort
SELECT - - col0 + 29 / col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 cor1

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

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

skipif mysql
query I rowsort
SELECT ALL - CAST ( col1 AS REAL ) / + col0 col2 FROM tab0

query I rowsort
SELECT - col2 * tab1.col2 + ( col2 ) * - col2 / + col1 FROM tab1

query I rowsort
SELECT ALL 82 FROM tab2, tab2, tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1, tab1 AS cor1, tab0 cor2

query I rowsort
SELECT DISTINCT col2 / col1 - col2 / - col2 AS col1 FROM tab2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1, tab0 cor1, tab2, tab2 AS cor2

query I rowsort
SELECT ALL 98 AS col0 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT ALL - + cor0.col2 * + col2 / + 76 FROM tab1 AS cor0

query I rowsort
SELECT ALL col0 / col2 + + col1 + + col0 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + tab1.col0 FROM tab2 AS cor0 JOIN tab1

query I rowsort
SELECT ALL 35 * - col2 / col1 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT - col0 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 8 FROM tab0 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 LEFT OUTER JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query IIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2 )

skipif mysql
query I rowsort
SELECT + - cor0.col2 / - col2 - CAST ( col2 AS INTEGER ) * col2 * - 92 FROM tab2 AS cor0

query I rowsort
SELECT + ( 19 ) col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab2 AS cor1 USING ( col2, col1, col0, col2 )

query I rowsort
SELECT + 95 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1, tab2 AS cor1 USING ( col1 )

Added proto/random/select/slt_bad_103.proto.

















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

skipif mysql
query I rowsort
SELECT - cor0.col0 * - CAST ( + col2 AS INTEGER ) / col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL + - 5 + cor1.col2 AS col1 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + + 51 FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT + + col0 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

query I rowsort
SELECT - col1 * - col1 / - col0 AS col0 FROM tab0

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

query I rowsort
SELECT ALL 13 + col1 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0 cor0 NATURAL JOIN tab0

query I rowsort
SELECT ALL - col1 * col1 + + tab2.col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 WHERE NULL <> ( NULL )

skipif mysql
query I rowsort
SELECT DISTINCT cor0.col2 / CAST ( - col0 + + col0 AS REAL ) AS col1 FROM tab0 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab0 cor1

query I rowsort
SELECT ALL - - 58 * cor0.col1 - + col1 * 82 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col2 * - tab1.col2 / - col1 FROM tab1

query I rowsort
SELECT ALL - col2 * + col2 / col0 AS col1 FROM tab1 AS cor0

query IIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 JOIN tab0 USING ( col0, col0 )

query I rowsort
SELECT - + col2 + + col2 * - col0 + + cor0.col0 * - col1 / - col2 col0 FROM tab0 cor0

query I rowsort
SELECT DISTINCT + col2 FROM tab1 cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT col0 / + col2 - cor0.col1 * col1 FROM tab2 cor0

query I rowsort
SELECT DISTINCT - 19 AS col2 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col0 + 95 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col2 * - 80 / col1 + 48 + col1 FROM tab0

query I rowsort
SELECT ALL - col1 * col1 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT - 37 * - col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2, col2, col2, col2, col1 )

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

skipif mysql
query I rowsort
SELECT - + CAST ( NULL AS INTEGER ) - - col0 * - col1 / ( cor0.col2 ) AS col2 FROM tab2 cor0

query IIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab0 AS cor2, tab0 AS cor3

query IIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 INNER JOIN tab0 USING ( col1, col0, col1 )

query I rowsort
SELECT ALL col0 + + ( - cor0.col1 ) AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

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

query I rowsort
SELECT cor1.col2 col2 FROM tab2, tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - - col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT 34 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT 15 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query IIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab1 AS cor1 USING ( col1 ), tab1 AS cor2

skipif mysql
query I rowsort
SELECT col2 * - CAST ( 56 AS INTEGER ) / col0 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT - - 46 AS col0 FROM tab1, tab1, tab1 AS cor0

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab2 cor1 USING ( col0 )

query IIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 NATURAL JOIN tab1, tab0 AS cor1

query I rowsort
SELECT - + col0 * + col0 / col2 AS col0 FROM tab0 cor0

query I rowsort
SELECT + + ( ( col1 ) ) AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 cor1

query IIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 JOIN tab2 USING ( col0, col1 )

query I rowsort
SELECT ALL - col1 * - col2 / cor0.col1 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL + - cor0.col0 AS col2 FROM tab2, tab2, tab1 AS cor0, tab1

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0, tab0, tab0 AS cor0

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

query I rowsort
SELECT + col0 + + 93 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col0 / col2 + col0 AS col2 FROM tab2

query I rowsort
SELECT ALL - 20 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col0 * ( + col1 ) FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + - cor0.col2 col1 FROM tab2, tab2 AS cor0 JOIN tab1 USING ( col0, col1, col1, col0, col0, col1 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT + col0 * - col0 / ( + 47 ) + + col0 + col0 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + 32 + col1 * col2 AS col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

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

query IIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1, col0, col0 )

query I rowsort
SELECT ALL cor0.col1 col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2, tab1 AS cor2

query IIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0 JOIN tab0 USING ( col1, col1, col2, col2, col2 )

query I rowsort
SELECT ALL 72 AS col0 FROM tab2, tab2 cor0 JOIN tab0

query I rowsort
SELECT ALL - ( + col2 ) * ( 12 ) + col2 + - col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query IIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab1 cor1 USING ( col2 )

query I rowsort
SELECT + + col2 * - ( + 69 + + col0 ) / col1 FROM tab1 AS cor0

query I rowsort
SELECT - cor0.col1 * cor1.col1 + + col1 AS col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + ( col0 ) + col1 * col1 / 34 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0 AS cor0 JOIN tab0 AS cor1

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

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

query I rowsort
SELECT col1 / - col2 col1 FROM tab2

query I rowsort
SELECT ALL 46 FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT ALL + - cor0.col0 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT + - 14 * - 85 AS col1 FROM tab1, tab1, tab0 AS cor0, tab1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 LEFT JOIN tab2, tab1 cor1

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

query I rowsort
SELECT + 66 * - col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT DISTINCT + col2 / tab2.col2 FROM tab2

query I rowsort
SELECT + col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col0, col2, col1 )

query IIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1, tab2 cor1 USING ( col0, col1, col1, col0 )

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col2, col0 )

query I rowsort
SELECT - col0 * + col1 * - col1 + - col0 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab2, tab1 AS cor1

skipif mysql
query I rowsort
SELECT - CAST ( 33 AS REAL ) / col0 + col1 * + col1 + + cor0.col0 FROM tab1 AS cor0

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

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

query I rowsort
SELECT ALL + - cor1.col2 + col2 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT + + 26 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT - - cor0.col0 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 NATURAL INNER JOIN tab1, tab1 cor1

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 JOIN tab1 AS cor1

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

query I rowsort
SELECT col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

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

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab1, tab1 AS cor0, tab0

query IIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0 NATURAL JOIN tab0

Added proto/random/select/slt_bad_104.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT ALL - + cor0.col1 + - col0 / col2 + col2 AS col1 FROM tab2 cor0

query I rowsort
SELECT + tab1.col2 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT ALL + - col2 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - 45 col0 FROM tab0 AS cor0 JOIN tab0 cor1

query I rowsort
SELECT 68 * - 33 / + col1 AS col2 FROM tab1 AS cor0

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

query I rowsort
SELECT ALL - 3 + col1 / tab2.col2 FROM tab2

query I rowsort
SELECT ALL 54 AS col1 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT ALL 22 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2 cor0 NATURAL JOIN tab2 cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col0, col2, col2, col1 )

query I rowsort
SELECT DISTINCT - col1 * cor1.col0 - col2 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab2 cor1 USING ( col2 ), tab2 cor2

query I rowsort
SELECT + col0 * - col0 / - col2 col1 FROM tab0 cor0

skipif mysql
query I rowsort
SELECT ALL + CAST ( NULL AS INTEGER ) * col2 col1 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT col2 + col0 * + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL JOIN tab1, tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 LEFT JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0, tab0 cor1

query I rowsort
SELECT + col0 * - 89 AS col2 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 NATURAL JOIN tab2, tab0 cor1

query I rowsort
SELECT - cor1.col1 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT ALL 0 * + 45 + - col2 * 33 AS col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 90 * cor0.col0 - ( - 61 ) col0 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT col2 * ( cor0.col1 + - 9 ) / - cor0.col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT 56 / col2 + + ( + col2 ) AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 25 col1 FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT + col1 + + col0 AS col0 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + - col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + + 55 / col2 + cor0.col2 + 57 FROM tab2 AS cor0

query I rowsort
SELECT ALL - 23 * + cor1.col0 AS col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + - ( + cor1.col1 ) FROM tab2 AS cor0 INNER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT - 99 * - 32 col1 FROM tab2, tab1, tab2 AS cor0, tab2

query I rowsort
SELECT + cor1.col2 FROM tab1 AS cor0 JOIN tab0, tab0 AS cor1

query I rowsort
SELECT + 97 / - cor0.col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT DISTINCT col0 - col0 * + 7 / col0 FROM tab0

query I rowsort
SELECT DISTINCT + + col0 + ( col0 ) / col2 FROM tab2 AS cor0

query I rowsort
SELECT - + col0 + - cor0.col2 * - col1 / cor0.col2 FROM tab1 AS cor0

query I rowsort
SELECT 40 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab0, tab1 AS cor1 USING ( col1, col0, col0, col0, col0, col2 )

query I rowsort
SELECT DISTINCT + - col2 * cor0.col0 + + col2 / - col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col1 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 JOIN tab0, tab1 AS cor1

query I rowsort
SELECT 95 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT - col0 * - 98 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - 2 + - col0 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

query IIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2, tab1 AS cor1 USING ( col0, col2, col0, col0 )

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT - - col0 * col0 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT 15 * - col2 * col2 - col0 / + col0 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL + 46 FROM tab2 cor0 NATURAL JOIN tab2 cor1

skipif mysql
query I rowsort
SELECT + col2 * col0 + + CAST ( + col2 AS INTEGER ) + col2 / col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT - CAST ( col1 AS REAL ) / + cor0.col2 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + + 73 AS col1 FROM tab0, tab1, tab2 AS cor0, tab0

query I rowsort
SELECT - col0 * + col0 * col1 + cor1.col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL 93 * + 33 / col1 AS col1 FROM tab1

query I rowsort
SELECT ALL col2 + - col2 col1 FROM tab0 AS cor0 LEFT JOIN tab0 USING ( col2 )

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT - col0 / + col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 / - cor0.col2 col1 FROM tab2 cor0

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2, tab2, tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL + col2 * - 42 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0, tab0, tab1 cor0

query I rowsort
SELECT - 82 * 59 AS col2 FROM tab1, tab1, tab0 cor0

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab1 AS cor2, tab0, tab1 AS cor3

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - 85 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIII rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col1, col2, col2, col1, col1, col2, col1 )

query IIIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT JOIN tab0, tab2 AS cor1 USING ( col2, col0, col2 )

query I rowsort
SELECT DISTINCT - + col0 + - 11 / cor0.col2 col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col1 + col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + + tab0.col1 + 89 AS col0 FROM tab0, tab2, tab0 AS cor0, tab2

query I rowsort
SELECT DISTINCT + ( + col0 ) + - col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT ALL col0 * - col1 / - col2 col2 FROM tab2 AS cor0

query I rowsort
SELECT - 84 + 32 AS col1 FROM tab2, tab0 AS cor0, tab2, tab0 cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab0, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT DISTINCT - - col1 * - col1 + cor1.col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 NATURAL JOIN tab1, tab2 cor1

query I rowsort
SELECT ALL - + 68 / + 40 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL ( col0 ) * col1 + col1 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT + col2 * + col0 / - col2 + - col0 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT ( col2 ) / col2 + + col0 + + 58 FROM tab2 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab0 cor1 USING ( col2 )

query I rowsort
SELECT - col2 / - cor1.col2 AS col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

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

query I rowsort
SELECT - 72 / + col2 AS col0 FROM tab2

query I rowsort
SELECT ALL col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT + col1 * - ( col0 ) + + cor1.col1 AS col1 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT ( 88 ) FROM tab0, tab0, tab0 AS cor0, tab0

query I rowsort
SELECT - col1 * + 2 / + col1 AS col2 FROM tab1 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col1 )

query I rowsort
SELECT - ( cor0.col2 ) AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT DISTINCT - 72 / + col2 col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL - tab2.col2 / - col2 col2 FROM tab2

Added proto/random/select/slt_bad_105.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT + 29 / - col0 + - col2 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT - cor0.col2 + + col1 * - 95 / + col1 FROM tab2 cor0

query I rowsort
SELECT col0 * - col1 + + col2 * - col2 / + col1 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT - col1 / ( ( tab2.col2 ) ) FROM tab2

query I rowsort
SELECT ALL cor0.col1 + 25 / col2 + 7 col1 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL - cor0.col0 / + cor0.col2 + col2 FROM tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab0, tab1 AS cor1, tab1 AS cor2

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT + col2 + - cor1.col0 + - col1 * col0 col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + col0 + col0 / col1 + - 29 / + col0 AS col2 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab0 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT ALL 80 / + 45 FROM tab0, tab0, tab1 cor0

query I rowsort
SELECT - col0 * - ( + 89 ) / + col0 + col0 FROM tab2 AS cor0

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

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT cor0.col2 * col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col2 * - col0 / + col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + - 93 + 1 FROM tab2 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 / col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * cor0.col2 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col1 * - col1 / 49 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 WHERE NOT ( col2 / col2 ) > ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0 NATURAL JOIN tab2

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1 USING ( col2, col0, col0, col0, col1, col0, col1, col0, col1 )

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab2 cor1 USING ( col1, col0, col2, col0, col1, col2, col0, col1, col2 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT + col0 FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 10 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 59 - + col1 * cor0.col2 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 * col2 + - col1 * + 8 / col0 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT + cor0.col1 + col0 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + col1 + + col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT JOIN tab1 AS cor1 USING ( col2 ), tab1 AS cor2, tab0 AS cor3

query I rowsort
SELECT DISTINCT + col1 * - col1 / - col0 AS col0 FROM tab0

skipif mysql
query I rowsort
SELECT DISTINCT + ( col1 ) + + col2 * + CAST ( col0 AS REAL ) FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 75 + 40 / col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col1 / col2 + + col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL + cor0.col0 + cor0.col1 AS col1 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2, tab1 AS cor1, tab1 AS cor2

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + + col1 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col0 / + col2 AS col0 FROM tab2

query I rowsort
SELECT 49 * col2 / + cor0.col2 col0 FROM tab2 AS cor0

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab0 cor1 USING ( col0 ), tab0 AS cor2, tab0 AS cor3

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT JOIN tab0 cor1

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

query I rowsort
SELECT 41 * - cor0.col1 / - col2 FROM tab0 cor0

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

query I rowsort
SELECT 19 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT + cor1.col1 col1 FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - - col1 + col1 * + CAST ( NULL AS INTEGER ) * + col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab2 AS cor2

query IIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 INNER JOIN tab1 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT 66 / + tab2.col2 FROM tab2

query I rowsort
SELECT col0 * - col2 + 16 * + col0 / + 85 col1 FROM tab2 cor0

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT - 33 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT DISTINCT - col2 / - col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - 87 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT + 92 * + 57 / + col0 AS col0 FROM tab0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT + 0 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col1 AS col1 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 cor1

query I rowsort
SELECT ALL - 81 AS col1 FROM tab0 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL col1 * - 52 / col2 AS col2 FROM tab0

query I rowsort
SELECT DISTINCT + cor0.col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL - + col1 * - 4 + col0 / + cor0.col2 AS col0 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT ALL - - col0 * + col1 / + 32 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - 55 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

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

query I rowsort
SELECT ALL - - col0 + + col2 + col2 * + col0 / + 34 AS col0 FROM tab0 cor0

query I rowsort
SELECT + 56 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - ( - col2 ) col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + - col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col2 * col0 + + ( - cor1.col1 ) + - col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - tab2.col2 + col1 FROM tab1 AS cor0 JOIN tab2 USING ( col1 )

query IIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab0 USING ( col0 )

query I rowsort
SELECT ALL col2 * + tab1.col1 / col0 FROM tab1

query I rowsort
SELECT ALL + 14 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT - tab2.col2 * + col2 * col1 + + tab2.col1 / + col2 FROM tab2

query I rowsort
SELECT ALL + 23 + - col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab0 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 71 * col2 / tab2.col2 + - 48 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT 79 / + col2 AS col1 FROM tab2 cor0

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2

skipif mysql
query I rowsort
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) col0 FROM tab1, tab1, tab1 AS cor0, tab1

query III rowsort
SELECT ALL * FROM tab2 cor0 NATURAL JOIN tab0 cor1

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

query I rowsort
SELECT - col2 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT 72 * + col0 / + 17 AS col2 FROM tab1

query I rowsort
SELECT + cor0.col1 FROM tab0, tab0, tab0 cor0, tab0

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

query I rowsort
SELECT DISTINCT + col2 + + col0 * - ( + col2 ) / 22 col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL + 66 col1 FROM tab1, tab1, tab2 AS cor0

query IIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL INNER JOIN tab2, tab0 cor1 USING ( col0, col0, col2, col2, col0, col0 )

Added proto/random/select/slt_bad_106.proto.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT + col0 + + col1 * col2 + - col1 * + 81 / - ( - col1 ) FROM tab2 AS cor0

query I rowsort
SELECT cor0.col2 + + col0 * - col0 / 83 col2 FROM tab0 AS cor0

query I rowsort
SELECT + cor0.col1 / col1 + - col2 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab0, tab0, tab2 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab1, tab0, tab1 AS cor1

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 * + col2 / col0 + col1 * col1 * 40 FROM tab1

query I rowsort
SELECT col2 + - col2 * - 14 / + 31 AS col2 FROM tab2

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

query I rowsort
SELECT + 97 FROM tab2, tab2, tab0 AS cor0, tab0

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab2, tab2 cor1

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT - - col2 + + 77 / - col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + 33 * - col1 / - col2 col0 FROM tab0 AS cor0

query I rowsort
SELECT tab2.col1 / + col2 FROM tab2

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

query IIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2 USING ( col1 )

query I rowsort
SELECT DISTINCT - col2 / col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - 34 / col2 AS col0 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL + cor0.col1 * + 84 / + col2 - + col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT + 20 - cor0.col0 AS col2 FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT + 45 * + col2 / - col1 + ( cor0.col2 ) AS col2 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT 52 AS col1 FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col0 )

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT ALL + col1 / col2 AS col0 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab0 cor1

query I rowsort
SELECT ALL - 95 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( - col2 AS INTEGER ) / + cor0.col2 - col2 col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL - tab2.col1 * 21 / col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 / col2 + col1 * tab2.col1 AS col0 FROM tab2

query I rowsort
SELECT ALL + cor1.col0 AS col2 FROM tab1, tab2 AS cor0 NATURAL JOIN tab2 cor1

skipif mysql
query I rowsort
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab2, tab2, tab2 cor0

query III rowsort
SELECT * FROM tab1 cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT - cor1.col0 * col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 LEFT JOIN tab0 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT col2 * col1 + col1 * + cor0.col2 / col0 AS col0 FROM tab1 cor0

query I rowsort
SELECT + 20 FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1

query I rowsort
SELECT + col0 * + col2 + + 35 * cor1.col2 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - - col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col1 / + cor0.col2 AS col1 FROM tab2 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab1 cor0 LEFT JOIN tab1 AS cor1

query I rowsort
SELECT 87 AS col1 FROM tab2, tab1, tab0 cor0, tab1

query I rowsort
SELECT ALL 9 FROM tab1, tab1, tab0 cor0

query I rowsort
SELECT - ( 33 ) FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT DISTINCT + - 57 / 73 + col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + 83 * - col2 / + col0 + + cor0.col0 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT + 43 - col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL ( 41 ) FROM tab1, tab1, tab0 AS cor0, tab0

query I rowsort
SELECT ALL - col2 + col0 * col2 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL - ( col0 ) / col2 + col0 FROM tab2 cor0

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0, tab1, tab1 cor0, tab0

query I rowsort
SELECT + - col2 * + 18 / col0 + 14 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT + col1 * - ( - col2 ) / col0 FROM tab1

query I rowsort
SELECT DISTINCT - - col0 + col2 * - col1 / col0 FROM tab2 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab0 cor0 INNER JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT - 72 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 + - col1 * - col2 / + cor0.col2 + col0 * - col0 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 68 AS col0 FROM tab0, tab0, tab0 cor0

query I rowsort
SELECT DISTINCT - - cor1.col2 AS col0 FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT ALL col1 * col1 * col1 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT ALL - - col1 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT ALL col2 / + col2 FROM tab2

query I rowsort
SELECT - col1 * col1 / col2 AS col1 FROM tab2

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

query I rowsort
SELECT - 6 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT 58 + - col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - 9 / cor1.col2 FROM tab1 AS cor0 JOIN tab2 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab0, tab1 cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1, tab1 AS cor0 JOIN tab2 USING ( col2 )

query IIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab0 USING ( col1 )

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT ALL - - 52 * + col1 / col0 col2 FROM tab0 AS cor0

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

query I rowsort
SELECT + + col0 / + col2 + ( col2 ) FROM tab2 AS cor0

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT - 14 AS col1 FROM tab1 cor0 JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + 0 FROM tab0 cor0 JOIN tab0 AS cor1 USING ( col2 ), tab0 cor2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2, tab1 AS cor1, tab0, tab0 AS cor2

query I rowsort
SELECT DISTINCT + col1 * - col1 / col0 + 75 * cor0.col1 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT + col2 + - 18 * + col2 / tab0.col1 AS col0 FROM tab0

query I rowsort
SELECT - 96 / - cor1.col2 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 JOIN tab2

query I rowsort
SELECT ALL + 73 FROM tab0, tab1, tab1 AS cor0, tab0

skipif mysql
query I rowsort
SELECT ALL - + CAST ( + 81 AS INTEGER ) / - col2 FROM tab2 cor0

query I rowsort
SELECT cor0.col1 + + col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT - 34 / col2 + + col2 * col2 FROM tab2

query I rowsort
SELECT 21 FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT DISTINCT col0 / + col2 AS col1 FROM tab2

query I rowsort
SELECT 30 / - col2 + col2 FROM tab2 cor0

query III rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col0, col2, col2, col1, col0, col0, col0, col2, col0 )

query I rowsort
SELECT ALL col2 / col2 AS col0 FROM tab2

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

query I rowsort
SELECT ALL 99 AS col2 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT DISTINCT - + col2 + + col0 * + col1 / - col0 FROM tab0 AS cor0

Added proto/random/select/slt_bad_107.proto.







































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT col1 * col1 * - col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + - 25 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - 15 FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - cor0.col1 + col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col1 / col2 AS col1 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0 JOIN tab2 USING ( col0 )

query I rowsort
SELECT ALL - col0 + col2 / + ( col2 ) AS col0 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 ), tab0 AS cor2

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL col2 * col1 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1 cor1 USING ( col2 )

query I rowsort
SELECT + - 89 * + 91 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab0, tab2 AS cor1, tab2 AS cor2

query I rowsort
SELECT + 21 + + col2 / 0 + - col0 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + col2 * 19 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col2 + - col1 * - col0 / + col1 FROM tab1 AS cor0

query I rowsort
SELECT ( + 97 ) AS col1 FROM tab1, tab1, tab0 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab2, tab1 cor1

query I rowsort
SELECT - 64 AS col1 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT ALL ( 77 ) AS col1 FROM tab1, tab0 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT col2 + + col2 * - col1 + - col0 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab0, tab0, tab1 cor0

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT DISTINCT + - col2 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col1 * + tab0.col2 / col0 + col1 / ( - tab0.col2 ) AS col1 FROM tab0

query I rowsort
SELECT ALL + 73 AS col2 FROM tab2, tab0, tab0 AS cor0, tab2

query I rowsort
SELECT col2 * cor0.col1 / col2 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL + col1 AS col2 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT - - col1 + + cor1.col1 col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + tab1.col2 AS col1 FROM tab1, tab2, tab1 AS cor0, tab2

query I rowsort
SELECT - + 12 AS col2 FROM tab0, tab0, tab1 cor0

query I rowsort
SELECT - 13 * col1 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT JOIN tab0 cor1

query I rowsort
SELECT - - 93 * + cor0.col0 FROM tab0, tab0, tab0 AS cor0, tab1

query I rowsort
SELECT DISTINCT - - cor1.col0 AS col1 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col2 * col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 NATURAL INNER JOIN tab0

skipif mysql
query I rowsort
SELECT DISTINCT col0 + 58 + - ( col2 ) * + CAST ( 89 + col1 AS INTEGER ) / + 90 AS col1 FROM tab1

query IIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 ), tab0 AS cor2, tab0 AS cor3

query I rowsort
SELECT ALL col2 * + col2 / - ( - col0 ) + + col1 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT - cor0.col1 FROM tab0, tab2, tab1 AS cor0, tab0

query I rowsort
SELECT DISTINCT + 99 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0, tab1 AS cor2

query I rowsort
SELECT DISTINCT - 7 * + 13 FROM tab0, tab1 AS cor0 JOIN tab2

query I rowsort
SELECT DISTINCT col0 * tab1.col0 + - tab1.col0 * - 25 / col0 AS col1 FROM tab1

query I rowsort
SELECT - col2 + col2 * - col2 / - col0 AS col0 FROM tab1

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

query I rowsort
SELECT col0 / tab2.col2 + col2 * - tab2.col0 + - col1 AS col1 FROM tab2

query I rowsort
SELECT cor0.col2 FROM tab2, tab2, tab1 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab0, tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1, tab2 AS cor2

query I rowsort
SELECT + 9 + cor1.col0 AS col2 FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT ALL - col1 / col2 col1 FROM tab2

query I rowsort
SELECT + col1 * + col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab0 AS cor3

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0 cor0 NATURAL LEFT JOIN tab1 cor1

query I rowsort
SELECT - - cor0.col0 * + 61 + col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT - ( 26 ) FROM tab0, tab0, tab0 AS cor0, tab0 cor1

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0, tab0 AS cor2

query IIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col0, col0, col2, col2, col2 )

query I rowsort
SELECT col0 + col2 / tab2.col2 FROM tab2

query I rowsort
SELECT - - ( - col1 ) AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1, tab1, tab0 cor0

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab2, tab2 AS cor1, tab2 AS cor2

query I rowsort
SELECT DISTINCT + col2 * + tab1.col1 / + col2 FROM tab1

query I rowsort
SELECT DISTINCT + 93 AS col0 FROM tab1, tab0, tab1 AS cor0, tab1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 cor1, tab2 AS cor2

query I rowsort
SELECT + col0 * - col2 / + col1 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT - 6 * cor0.col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0, tab0 AS cor2

query I rowsort
SELECT - ( col2 ) / col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col0 * + cor1.col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - 85 FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT ALL - - 99 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + - col1 * + cor1.col0 + 62 AS col1 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 95 * + col0 AS col0 FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 )

query IIIII rowsort
SELECT * FROM tab0 cor0 LEFT JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT col0 * col1 / ( col2 ) + cor0.col1 AS col0 FROM tab2 AS cor0

query IIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 INNER JOIN tab1 USING ( col2, col0, col0, col0, col0, col0 )

query I rowsort
SELECT + + 65 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT - + 45 * cor1.col1 + col1 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + col0 * - col2 + + col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab1 cor0 NATURAL LEFT OUTER JOIN tab2

query IIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT ALL tab0.col0 FROM tab2, tab2 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT ALL - col0 + - col2 / ( - col2 ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col0 * - col2 / ( cor0.col0 ) - - cor0.col0 * - col0 AS col1 FROM tab2 cor0

query I rowsort
SELECT col2 * + tab1.col1 / - col0 AS col1 FROM tab1

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab1, tab1, tab1 AS cor0, tab2

query I rowsort
SELECT ALL - col1 + col0 / - col2 AS col2 FROM tab2

query I rowsort
SELECT col0 * - col2 / + 73 AS col1 FROM tab0

query I rowsort
SELECT col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - + col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 / - col0 + col2 AS col2 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT - cor0.col0 / - cor0.col2 + + col2 FROM tab2 AS cor0

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0, tab0, tab1 AS cor0, tab0 AS cor1

query I rowsort
SELECT DISTINCT + ( 81 ) FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 / col2 AS col0 FROM tab2 cor0

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab0, tab1 cor1

Added proto/random/select/slt_bad_108.proto.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL - col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 * - col2 / - col0 AS col0 FROM tab2 AS cor0

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

query IIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col2, col0, col2 )

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 NATURAL INNER JOIN tab1

query IIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2, tab2 cor3

query I rowsort
SELECT + cor0.col1 + - cor0.col2 / + 54 FROM tab0, tab0, tab1 AS cor0

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

query I rowsort
SELECT DISTINCT - col1 * + 89 * col1 + - col1 / col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT JOIN tab2, tab0 AS cor1 USING ( col2, col0, col1 )

query I rowsort
SELECT + 48 * - ( + col2 ) / - col1 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT ALL col1 * + tab0.col1 * col2 + 39 * - col0 / col2 AS col0 FROM tab0

query I rowsort
SELECT ALL - ( + 74 ) / cor1.col2 col1 FROM tab2, tab1 AS cor0, tab2 AS cor1

query I rowsort
SELECT + cor0.col0 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT + col1 * - 99 / 21 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT - 75 / + col1 + col0 / - col2 + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - col2 * ( - col2 ) - - col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL LEFT JOIN tab1, tab1 AS cor1 USING ( col1, col1 )

query I rowsort
SELECT - col0 * col1 * col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query IIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col0, col1 )

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

query IIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col1, col1, col1, col1, col1, col1, col1, col0, col0 )

query I rowsort
SELECT - + ( col2 ) / - cor0.col2 + - 73 + col1 * + col1 * 92 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col1 * - col1 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - + 43 * col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col1 * 28 + + col2 * + col2 / + col1 AS col2 FROM tab2

query I rowsort
SELECT ALL + ( 19 ) / - col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT - - 76 - - cor1.col2 col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col1 AS col0 FROM tab1 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT - col0 * + ( - col0 ) / col1 + col0 * 45 FROM tab2 cor0

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

query I rowsort
SELECT + cor2.col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0, tab2 AS cor2

query I rowsort
SELECT + 84 FROM tab1 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col0, col2, col0 )

query IIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col1, col0 )

query I rowsort
SELECT + col0 * - 57 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT ALL - col0 + 9 AS col1 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col1 ), tab0 AS cor2, tab1 AS cor3

query I rowsort
SELECT DISTINCT + 18 + 27 * - col2 / col2 + 41 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - - col1 + col1 * + 66 / col0 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT 96 * + cor0.col0 AS col0 FROM tab2 cor0 JOIN tab2 cor1 USING ( col2 )

query I rowsort
SELECT 63 + col2 * + col1 * col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab1 AS cor1

query I rowsort
SELECT DISTINCT + 61 * + 95 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

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

query IIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2 USING ( col2 )

query I rowsort
SELECT ALL - col1 * - col2 / + col0 FROM tab2 AS cor0

query I rowsort
SELECT - col1 * - col0 / + col1 AS col1 FROM tab2 cor0

query I rowsort
SELECT - cor0.col0 col1 FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT - - 22 + - cor0.col2 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - cor0.col1 + + ( cor0.col2 ) * - col1 / - 80 - - col0 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT 62 FROM tab0, tab0 cor0 JOIN tab2, tab2 AS cor1

query I rowsort
SELECT - + col2 / col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col0 + col2 * col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT ALL - - 30 * + cor1.col2 col0 FROM tab1 cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col0, col0 )

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1, tab2 AS cor2

query IIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab0 cor1 USING ( col1, col2 )

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0, tab0, tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1

skipif mysql
query I rowsort
SELECT - CAST ( + col2 AS INTEGER ) / col2 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT DISTINCT + - col2 * - col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col0 * col0 - col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab0 AS cor2, tab2, tab2 AS cor3

query I rowsort
SELECT DISTINCT + + 15 * + col0 / col1 FROM tab0 AS cor0

query I rowsort
SELECT col2 + col2 * - col1 col1 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT DISTINCT 56 * col1 + - col2 * + col1 / - 55 col0 FROM tab1 AS cor0

query I rowsort
SELECT - col0 * col2 * - col1 + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 JOIN tab1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab1 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT DISTINCT - col1 / tab2.col2 AS col2 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT JOIN tab2, tab0 AS cor1 USING ( col2 )

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab2, tab1 cor1, tab1 AS cor2, tab1 AS cor3

query I rowsort
SELECT + col1 - 75 / col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 * col0 * - col2 + col0 * + col1 / col2 FROM tab1 cor0

query I rowsort
SELECT col2 + + col2 * col0 / col2 AS col2 FROM tab2

query IIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab0 cor1 USING ( col1, col0 )

query III rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL LEFT JOIN tab1, tab2 AS cor1 USING ( col0, col0, col0, col1, col2, col1 )

query I rowsort
SELECT DISTINCT col0 * col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

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

query I rowsort
SELECT col2 + col0 / cor0.col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT 69 FROM tab0, tab0, tab2 AS cor0, tab1 AS cor1

query I rowsort
SELECT col2 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col1 + + tab1.col2 * + col0 / - col1 AS col1 FROM tab1

query I rowsort
SELECT - col1 * + 59 / col0 + col1 - col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( 53 AS INTEGER ) col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT - col0 * - col1 / col0 FROM tab1 AS cor0

query I rowsort
SELECT + col0 + - ( ( - col0 ) ) col2 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT - 97 * cor1.col1 + - col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) AS col0 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col1 + ( - cor0.col2 + + col0 ) AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 * + col2 / + col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL - 10 FROM tab2, tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query III rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0 cor1

query I rowsort
SELECT ALL col1 * col0 + - col0 * - col2 / col1 AS col2 FROM tab2

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

query I rowsort
SELECT ALL col2 * col0 / col2 FROM tab2

query I rowsort
SELECT ALL - col1 * - col2 / col2 AS col1 FROM tab2

Added proto/random/select/slt_bad_109.proto.

























































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT col0 * col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT + - CAST ( 38 AS INTEGER ) * + col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT ALL + + 83 * + col2 / col0 - col2 * col1 FROM tab2 cor0

query I rowsort
SELECT + + col1 * + 45 / - col2 - + cor0.col2 FROM tab1 cor0

query I rowsort
SELECT DISTINCT - - col1 * - cor0.col0 / 7 + col0 + 65 * ( col2 ) AS col1 FROM tab1 AS cor0

skipif mysql
query I rowsort
SELECT CAST ( - col0 AS REAL ) + col2 / + col2 FROM tab2 cor0

query I rowsort
SELECT 13 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT + tab2.col2 / + ( col2 * col2 ) col0 FROM tab2

query I rowsort
SELECT ALL - - ( + 11 ) FROM tab1, tab0, tab2 AS cor0, tab0

query I rowsort
SELECT - 56 FROM tab1, tab1, tab1 AS cor0

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

query I rowsort
SELECT ALL col2 + + col1 * + col2 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + + col0 * + col1 / - 29 AS col2 FROM tab0 AS cor0

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab1, tab2, tab0 AS cor0, tab1

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab2, tab0 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 NATURAL JOIN tab1, tab0 AS cor1

query I rowsort
SELECT - + ( 41 ) - col1 AS col1 FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT ALL - - 23 * - cor0.col1 FROM tab2, tab0, tab2 cor0, tab0

query I rowsort
SELECT ALL 7 FROM tab2, tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL - cor1.col2 + + col0 * 85 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - cor0.col2 / col2 AS col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 )

query IIIII rowsort
SELECT ALL * FROM tab0 AS cor0 LEFT JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT col0 - + col2 FROM tab2 cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0 JOIN tab1

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

query I rowsort
SELECT - col1 * - col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT tab2.col1 * 13 / + tab2.col2 FROM tab2

query I rowsort
SELECT col0 * - 16 / + col1 FROM tab0

query I rowsort
SELECT 54 * col2 AS col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 / col2 FROM tab1 AS cor0

query I rowsort
SELECT ALL + col1 + col2 * + col2 / + col0 FROM tab1

query I rowsort
SELECT 77 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT DISTINCT - col1 / col2 FROM tab2

query I rowsort
SELECT - col1 + + cor0.col1 * - col1 / + 48 FROM tab2 AS cor0

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2

skipif mysql
query I rowsort
SELECT DISTINCT - cor0.col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1, tab2 cor2

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1, tab0 AS cor2

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col2, col1, col0, col1, col1 )

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

query I rowsort
SELECT + 27 + tab1.col2 * + 82 FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2, tab1 cor1, tab2

query I rowsort
SELECT ALL - - col2 * ( + col2 ) FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS REAL ) FROM tab2 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + 89 FROM tab0 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + cor2.col0 * - 31 + - 4 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 cor1, tab0, tab2 AS cor2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab2 cor1

query I rowsort
SELECT ALL + col1 * col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - 78 / col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT + ( col1 ) AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT DISTINCT - + 94 * - cor1.col0 AS col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + ( - col2 ) * col1 + + col1 * ( + col1 ) FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT 11 + + cor0.col0 * + 23 / col1 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + 15 - cor0.col2 FROM tab2, tab1, tab0 AS cor0, tab2

query I rowsort
SELECT - 14 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2

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

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab2 cor1 USING ( col0 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col1 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 JOIN tab2, tab1 AS cor1

query I rowsort
SELECT - - cor0.col1 + + 76 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS REAL ) * - cor0.col0 AS col2 FROM tab1 AS cor0 JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT ALL + col0 / col2 - - ( col0 + - col1 * - CAST ( col0 AS INTEGER ) ) FROM tab2

query I rowsort
SELECT DISTINCT - + col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT + - 79 - + cor0.col0 * - col2 / ( col0 ) FROM tab0 AS cor0

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

query I rowsort
SELECT + + 97 + - cor0.col0 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 / col2 + - col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab0 cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab2 cor2

query I rowsort
SELECT ALL + - cor0.col0 col0 FROM tab2, tab2 AS cor0, tab2, tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab1, tab2 AS cor1

query I rowsort
SELECT ALL col2 / + ( + col1 ) FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + + col1 - col0 * + col2 / + col0 col1 FROM tab0 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT - CAST ( + 7 AS INTEGER ) / - col2 FROM tab2

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

query I rowsort
SELECT ALL + 57 col2 FROM tab1, tab0 AS cor0, tab1, tab1 AS cor1

query I rowsort
SELECT ALL col1 + + col2 + col0 * - 37 / + col0 FROM tab2 cor0

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col1 )

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT OUTER JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT + tab1.col0 * col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT cor0.col1 FROM tab1 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT ALL col0 FROM tab2 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT DISTINCT tab1.col2 AS col0 FROM tab1, tab2, tab0 cor0, tab2

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 NATURAL JOIN tab1, tab2 AS cor1, tab1 AS cor2

query I rowsort
SELECT ALL - col1 / - col0 + + 2 / col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - - col1 + + col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1, tab1 AS cor2, tab1 AS cor3

query I rowsort
SELECT DISTINCT - col1 * + cor0.col0 / 11 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL - 72 * col2 + cor1.col0 col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ( col0 ) + + cor1.col1 * col0 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

skipif mysql
query I rowsort
SELECT + CAST ( + col2 AS INTEGER ) / col2 + + col2 FROM tab2

query I rowsort
SELECT + col0 + col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 56 * - cor0.col0 / 78 FROM tab1 cor0

query I rowsort
SELECT ALL col1 - col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab2, tab0 cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT ALL - 12 FROM tab1, tab1, tab0 AS cor0, tab1

query I rowsort
SELECT - 32 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab2, tab2 AS cor0

Added proto/random/select/slt_bad_11.proto.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1

query I rowsort
SELECT ALL - 9 * + col2 / cor0.col1 FROM tab2 AS cor0

query I rowsort
SELECT - col1 col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0, tab0 AS cor1, tab2, tab0 AS cor2

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1, tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 JOIN tab1

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

query I rowsort
SELECT + col2 FROM tab0 cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT - col2 / + col2 AS col1 FROM tab2

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2 cor1

query I rowsort
SELECT ALL + - ( col1 ) col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab1 AS cor2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab2 cor1 USING ( col1 )

query I rowsort
SELECT col0 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col2 / tab2.col2 + - col0 FROM tab2

query I rowsort
SELECT - tab2.col0 / + col2 col0 FROM tab2

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab1, tab1 AS cor1 USING ( col2, col0, col0, col1, col1 )

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

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

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT - col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - 79 FROM tab1, tab1, tab1 AS cor0, tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT col1 * + col0 / + col1 AS col0 FROM tab0 cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2 cor1 USING ( col0 ), tab0 AS cor2

query IIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab0, tab1 AS cor1

query I rowsort
SELECT + cor1.col0 * - cor1.col0 FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col2 * col1 / - col2 AS col0 FROM tab2

query I rowsort
SELECT col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL - + col0 + 43 + + 73 / col2 FROM tab2 AS cor0

query I rowsort
SELECT + 59 FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab2 AS cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT + ( - ( cor0.col2 ) * 76 ) FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT ALL - 23 / - cor0.col2 FROM tab1, tab0, tab2 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 JOIN tab0, tab1 AS cor1, tab0 AS cor2

query I rowsort
SELECT DISTINCT cor0.col2 col1 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab1 cor2, tab0, tab1 AS cor3

query I rowsort
SELECT ALL 31 AS col2 FROM tab2, tab1, tab1 AS cor0, tab1

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

query IIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab2 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL INNER JOIN tab0, tab2 AS cor1

query I rowsort
SELECT ALL - col0 + + cor1.col0 AS col1 FROM tab0 cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - ( cor0.col1 ) FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - + col1 * - ( - col1 ) FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab2 AS cor0 NATURAL LEFT JOIN tab0 AS cor1

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

query I rowsort
SELECT cor0.col0 * - col2 / col0 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 JOIN tab2

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1 USING ( col0 )

query I rowsort
SELECT DISTINCT + cor0.col1 + - col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT - col0 / - col2 + tab2.col2 * col1 AS col2 FROM tab2

query I rowsort
SELECT - col0 / col2 AS col0 FROM tab2

query I rowsort
SELECT ALL col1 / + cor0.col2 - + col0 AS col2 FROM tab2 cor0

query I rowsort
SELECT ALL - 2 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2, tab1 AS cor1 USING ( col2 )

query IIIIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab0, tab1 cor1 USING ( col0, col1 )

query I rowsort
SELECT - + col0 * col2 + ( col2 ) FROM tab1 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab0 cor1 USING ( col2, col2, col0, col1, col1, col1 )

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col1, col2, col2, col0 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col0, col1, col0, col2 )

query I rowsort
SELECT ALL - + 12 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + - col0 + - col0 * - col1 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT - col1 * - 79 / col2 FROM tab2

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab2 cor1

query IIIIII rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab0, tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab2 AS cor1, tab1, tab0 AS cor2

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab0, tab1 AS cor1

query I rowsort
SELECT col0 * - 52 / 23 FROM tab0 cor0

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - cor0.col1 * cor1.col1 FROM tab1, tab2 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

query I rowsort
SELECT DISTINCT 34 AS col1 FROM tab0, tab0, tab1 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab1, tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0 cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT col1 / + col2 + - col2 AS col1 FROM tab2

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 INNER JOIN tab2 cor1

query I rowsort
SELECT DISTINCT - col2 / - col2 AS col2 FROM tab2

query I rowsort
SELECT cor1.col1 + + cor0.col0 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT - 59 FROM tab2, tab2, tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 LEFT JOIN tab2

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

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab1 cor1

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col2, col2, col1, col1, col0 )

query I rowsort
SELECT ALL ( - cor1.col1 ) FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT 19 AS col2 FROM tab0, tab0, tab0 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 INNER JOIN tab2

query I rowsort
SELECT DISTINCT tab0.col2 col2 FROM tab2, tab0 AS cor0 NATURAL INNER JOIN tab0

query I rowsort
SELECT + - col0 * col0 + 96 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 18 * - tab2.col2 / col1 AS col1 FROM tab2

query I rowsort
SELECT - - col2 * + ( - col2 ) FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + - col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT col0 / + CAST ( ( col1 ) AS REAL ) + + 18 col0 FROM tab0 AS cor0

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1, tab1, tab2 AS cor0

Added proto/random/select/slt_bad_110.proto.

















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ( 89 ) * - col2 / col2 AS col0 FROM tab2

query I rowsort
SELECT - col2 + col2 * col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - - cor1.col1 * col0 col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0 cor1

query I rowsort
SELECT - 32 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL 26 AS col1 FROM tab2 cor0 JOIN tab0, tab0 AS cor1

query I rowsort
SELECT - - cor1.col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab2, tab0, tab1 cor1

query I rowsort
SELECT - 49 * 7 / col2 + - col0 col1 FROM tab2

query I rowsort
SELECT + cor0.col0 col1 FROM tab0, tab0, tab0 AS cor0, tab1

query I rowsort
SELECT - 59 AS col1 FROM tab0, tab2, tab2 AS cor0, tab2

query I rowsort
SELECT - col1 * + col1 + - col1 * - col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT 18 AS col2 FROM tab0, tab0, tab0 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + - ( col0 ) + col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - 21 * 81 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT - cor1.col0 FROM tab1 AS cor0 INNER JOIN tab2 cor1

query I rowsort
SELECT DISTINCT - + col1 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + cor0.col2 - - col0 / col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - + cor1.col0 + + ( - col2 ) + - col0 * + 63 * - cor1.col1 AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

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

query I rowsort
SELECT + col1 + col1 * - col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab0 cor1 USING ( col0, col1, col1, col1, col1, col2 )

query I rowsort
SELECT ALL - + col0 * - col2 / - col0 - + col0 * + 26 col0 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + 28 AS col0 FROM tab0, tab2 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab1 AS cor0 INNER JOIN tab0 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab0 cor2

skipif mysql
query I rowsort
SELECT - col2 + CAST ( col1 AS REAL ) / + col2 AS col2 FROM tab2

query I rowsort
SELECT ALL col2 * - tab2.col0 + col2 / col2 AS col2 FROM tab2

query I rowsort
SELECT col2 * col2 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 AS col2 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab1, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT 9 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT 81 AS col0 FROM tab0, tab0, tab0 AS cor0, tab1

query I rowsort
SELECT DISTINCT + col2 * - col1 / - col0 FROM tab1

query I rowsort
SELECT ALL col2 FROM tab1 AS cor0 JOIN tab2 USING ( col2 )

query I rowsort
SELECT DISTINCT col0 FROM tab0 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT DISTINCT + ( col1 ) AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL - 39 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col0 / + col2 AS col2 FROM tab2

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

query I rowsort
SELECT - col0 / col2 AS col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( + 15 AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0 LEFT OUTER JOIN tab1

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS REAL ) FROM tab0, tab1 AS cor0 CROSS JOIN tab0, tab1, tab0 cor1

query I rowsort
SELECT + col2 * col0 * + col1 + col1 * cor0.col2 / col2 + col2 * 95 col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL - col2 / ( - cor0.col2 ) - col1 * 71 FROM tab2 AS cor0

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1, col2 )

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col1 )

query IIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab0 AS cor1 USING ( col2 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2, tab0 cor1

query I rowsort
SELECT ALL - col0 * - col1 / 40 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT col0 / + col2 AS col0 FROM tab2

query I rowsort
SELECT ALL 8 + - cor0.col1 + - cor0.col1 AS col1 FROM tab0, tab1, tab1 AS cor0, tab0

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab1 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT ALL + 30 + + col1 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col2 ), tab2 cor2, tab0, tab0 AS cor3

query I rowsort
SELECT ALL col0 + col1 / tab2.col2 + + col1 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT + col1 * - col1 AS col2 FROM tab0 AS cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col2 / col2 + + col1 / + cor0.col0 col1 FROM tab2 AS cor0

query I rowsort
SELECT + - cor1.col0 * cor1.col0 - col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2

query I rowsort
SELECT col1 FROM tab0 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT DISTINCT col2 * + tab2.col1 / col0 - + col0 / col1 AS col2 FROM tab2

skipif mysql
query I rowsort
SELECT + + col1 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT cor1.col2 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab1, tab2 AS cor1

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab1, tab1, tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 NATURAL JOIN tab1, tab1 AS cor1, tab1 AS cor2

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

query I rowsort
SELECT DISTINCT + + col1 * col0 + cor1.col2 + col0 * col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL - cor0.col1 FROM tab0, tab2, tab2 AS cor0, tab2

query I rowsort
SELECT 83 * - col2 / tab0.col1 FROM tab0

query I rowsort
SELECT DISTINCT - col2 / tab2.col2 FROM tab2

query I rowsort
SELECT 24 FROM tab0, tab0, tab1 AS cor0

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab2, tab2 AS cor1 USING ( col2, col1, col1, col2, col1, col2, col1, col1, col2, col0, col2 )

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

query I rowsort
SELECT DISTINCT + 56 AS col1 FROM tab0, tab0, tab2 AS cor0

query III rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT + + col0 col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + ( - col0 ) / cor0.col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 31 * col0 + - cor0.col0 * - 13 / cor0.col1 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + ( col0 ) / col2 - col0 * - 24 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 + + col2 / - col2 col1 FROM tab2

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - + cor0.col0 * col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT - 26 * cor1.col2 AS col1 FROM tab1 AS cor0 JOIN tab0 cor1 USING ( col0 ), tab1 AS cor2, tab1 AS cor3

skipif mysql
query I rowsort
SELECT ALL - CAST ( col0 AS REAL ) / - col1 FROM tab2 AS cor0

query I rowsort
SELECT - - col2 + + col1 * col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col0 / - 62 + - col2 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT col1 / - ( col1 * + cor0.col0 ) + 98 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT 43 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

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

query I rowsort
SELECT ALL + 66 FROM tab1, tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL 87 + + cor0.col0 * - cor0.col0 / + col2 + + col0 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT - ( + 1 ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - - cor1.col2 FROM tab2, tab1 AS cor0, tab2, tab2 cor1

Added proto/random/select/slt_bad_111.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1 cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col1 ), tab1 AS cor2, tab0 AS cor3

query I rowsort
SELECT DISTINCT - cor0.col1 / col2 FROM tab2 cor0

query I rowsort
SELECT DISTINCT - 67 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

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

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

query I rowsort
SELECT col2 * - col2 AS col1 FROM tab1 cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT + cor2.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1, tab2 cor2

query I rowsort
SELECT DISTINCT - col0 + + col1 * ( - col1 + ( col1 ) ) FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + col0 - 33 * + col1 * col1 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab0 AS cor1

query I rowsort
SELECT - + col0 * - col2 * col1 col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + ( col2 ) * - tab0.col1 / + col0 + 33 FROM tab0

skipif mysql
query I rowsort
SELECT + + col0 * - CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + cor0.col0 / cor0.col2 FROM tab1, tab2 AS cor0

query I rowsort
SELECT ALL col0 / col2 + col0 AS col2 FROM tab2

query I rowsort
SELECT - col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT col1 / col2 + col2 FROM tab2

query I rowsort
SELECT ALL col0 / + col2 - - col0 * col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + + col1 * - 29 / + col2 FROM tab1 AS cor0

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

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

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2, tab0 cor1

query I rowsort
SELECT DISTINCT col1 + col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - + col0 * col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + + col0 AS col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab2 cor1

query I rowsort
SELECT ALL ( + cor1.col2 ) FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT - col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL 43 AS col1 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT col1 + + 64 / tab2.col2 FROM tab2

query I rowsort
SELECT + ( - col0 ) + - col0 col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

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

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

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

query I rowsort
SELECT 39 + 37 AS col2 FROM tab0, tab1 cor0 CROSS JOIN tab0

query I rowsort
SELECT ALL - col2 / - tab2.col2 + tab2.col2 FROM tab2

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

query I rowsort
SELECT - - col2 * + col0 / + 83 + - col0 + - col1 col0 FROM tab0 AS cor0

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

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2 AS cor0 LEFT JOIN tab1, tab0 AS cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab2, tab2, tab1 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1, tab2 AS cor1, tab0 cor2

query IIII rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col2, col2, col1, col2, col2, col2, col1 )

query I rowsort
SELECT ALL + col0 * - cor0.col0 + col1 + col1 / col2 FROM tab2 cor0

query I rowsort
SELECT - + 93 AS col1 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT - cor0.col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0, tab2 cor1

query I rowsort
SELECT col2 + - col2 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - tab2.col1 / - col2 FROM tab2

query I rowsort
SELECT cor0.col2 AS col1 FROM tab0 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT 19 + col2 * - ( col2 ) FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

skipif mysql
query I rowsort
SELECT + ( - 83 ) + - col2 / CAST ( cor0.col2 AS INTEGER ) FROM tab2 AS cor0

query I rowsort
SELECT ALL + + col2 + col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab0 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col0 )

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

query I rowsort
SELECT DISTINCT - cor1.col0 * col2 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT ALL - cor1.col2 AS col1 FROM tab1, tab0 AS cor0, tab1, tab2 AS cor1

query I rowsort
SELECT + col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col1 * 20 + col2 * - col2 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab1 cor1

query I rowsort
SELECT ALL cor0.col2 FROM tab0, tab2 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT DISTINCT col1 / + tab2.col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT 46 FROM tab2, tab2, tab0 AS cor0, tab1

skipif mysql
query I rowsort
SELECT + - CAST ( + 9 AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab2, tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0, tab2 AS cor1

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

query I rowsort
SELECT ALL + 64 + + 90 AS col2 FROM tab2, tab0 AS cor0, tab2, tab1 cor1

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

query I rowsort
SELECT - 48 * col2 col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT col2 / col2 FROM tab2 cor0

query IIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 cor2, tab1 AS cor3

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0, tab1 AS cor1

query I rowsort
SELECT - + cor0.col1 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 LEFT OUTER JOIN tab2, tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1, tab1, tab1 AS cor0, tab2

query I rowsort
SELECT ALL 46 * col2 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT col1 * - col1 / 67 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 + col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 JOIN tab2 USING ( col1, col2, col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col2 )

query IIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 INNER JOIN tab2 USING ( col2, col0, col0, col2 )

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

query IIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT ALL + cor0.col1 FROM tab2, tab2, tab0 cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 LEFT JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1, tab0 AS cor2

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

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab2 cor1 USING ( col0 )

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab0, tab0 AS cor0, tab1 AS cor1

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 ), tab0 AS cor2

query I rowsort
SELECT ALL - col0 + col1 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 cor0 LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col1 - 95 AS col1 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab2 AS cor0 JOIN tab2

query I rowsort
SELECT col2 AS col0 FROM tab2 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col2 col1 FROM tab2, tab0, tab2 AS cor0, tab0

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

query I rowsort
SELECT ALL 65 FROM tab1, tab2, tab0 AS cor0, tab2

query I rowsort
SELECT DISTINCT + col1 * + col1 / - 85 AS col0 FROM tab1 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab2, tab2 AS cor1, tab0, tab2 AS cor2

Added proto/random/select/slt_bad_112.proto.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col0, col1, col2, col1, col1, col0, col0, col1 )

query I rowsort
SELECT - - 62 * + col0 + cor0.col0 * cor1.col1 * - cor1.col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT ALL col1 * - col0 + col1 + col0 / col2 FROM tab2

query I rowsort
SELECT DISTINCT + col0 + + tab2.col0 * col0 / col2 AS col0 FROM tab2

query I rowsort
SELECT ALL col1 + + tab2.col2 / tab2.col2 + - col1 * - col2 * col2 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT col0 - + col1 / col2 AS col0 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 JOIN tab0 USING ( col2 )

query I rowsort
SELECT DISTINCT ( + col2 ) / + col2 FROM tab2 AS cor0

query I rowsort
SELECT col1 * + cor0.col2 * - cor0.col1 FROM tab2 cor0 JOIN tab2 cor1 USING ( col1 )

query I rowsort
SELECT - tab2.col2 / + col2 AS col0 FROM tab2

query I rowsort
SELECT 2 * - col2 * col0 + - ( - cor0.col0 + + col2 ) FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col2 * col2 * col1 + - cor0.col1 * - 73 / col1 FROM tab1 AS cor0

query I rowsort
SELECT ALL - ( - cor0.col0 ) AS col1 FROM tab1, tab2, tab1 cor0, tab2

query I rowsort
SELECT + col1 * col2 / - col2 AS col1 FROM tab2 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0, tab1 AS cor1, tab0 AS cor2, tab2 AS cor3

query I rowsort
SELECT ALL - + col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - - col1 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col0 * - ( col2 ) / + col0 AS col0 FROM tab2 cor0

query I rowsort
SELECT + 85 AS col1 FROM tab2, tab1, tab1 AS cor0, tab2

query I rowsort
SELECT DISTINCT - + cor1.col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - col2 * cor0.col1 * cor0.col2 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab1, tab1 cor2

query I rowsort
SELECT - 21 * + tab1.col1 / 99 FROM tab1, tab1 AS cor0

query I rowsort
SELECT ( - cor0.col0 ) FROM tab1 AS cor0 JOIN tab0 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 cor1 USING ( col0, col0, col2, col2, col0, col2, col0, col2, col2, col2, col0, col1, col0, col0, col0 )

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab1 cor1, tab0 AS cor2, tab1 AS cor3

query IIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab0 cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT 41 - 52 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ( 41 + - cor0.col2 ) FROM tab2, tab2, tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab1 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT + 56 * - col1 / col0 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT ALL cor0.col1 FROM tab1, tab1, tab2 cor0

query I rowsort
SELECT 45 * + 77 FROM tab0 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - ( 3 ) AS col2 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab0 AS cor2, tab1 AS cor3

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

query I rowsort
SELECT - - 97 * cor1.col2 AS col2 FROM tab1 AS cor0 JOIN tab0 cor1

query I rowsort
SELECT + - col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL CAST ( NULL AS INTEGER ) * 77 FROM tab1, tab1, tab1 AS cor0, tab2

query I rowsort
SELECT ALL - + cor0.col2 + col2 * + col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + - col2 + ( col2 ) + col1 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

skipif mysql
query I rowsort
SELECT ALL CAST ( NULL AS INTEGER ) col0 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT + col2 * + col1 / 15 FROM tab0 cor0

query I rowsort
SELECT col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + ( - col2 ) * col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1 cor1 USING ( col2 ), tab1 cor2

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 NATURAL JOIN tab0, tab0 cor1

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT DISTINCT + col1 / col2 - + cor0.col0 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 90 * - col2 / + 73 FROM tab0 cor0

query I rowsort
SELECT ALL + col0 * - 24 / + 69 AS col2 FROM tab1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab0, tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 * ( col1 ) + col0 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT - cor1.col2 / + CAST ( 9 AS INTEGER ) FROM tab2, tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab0, tab1 AS cor1, tab0 cor2

query I rowsort
SELECT DISTINCT - col1 * + 26 / 28 FROM tab2 AS cor0

query I rowsort
SELECT + col0 * col2 * 50 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 JOIN tab1 USING ( col1, col2, col0 )

query I rowsort
SELECT + cor0.col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT DISTINCT + col0 * ( + cor0.col2 ) + + col2 * - ( 56 ) / - col0 AS col1 FROM tab0 cor0

query I rowsort
SELECT - col2 * + col2 / - 37 + col2 FROM tab2

query I rowsort
SELECT ALL + cor0.col2 * col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT + 86 * + col1 / + col0 + + 63 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT 34 FROM tab2, tab2, tab0 cor0

query I rowsort
SELECT + col0 * col1 / - col2 AS col2 FROM tab2 AS cor0

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

query IIIII rowsort
SELECT * FROM tab0 cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + 52 + + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1 USING ( col2 )

query I rowsort
SELECT - - 74 * + cor0.col2 / 40 + 55 FROM tab0 AS cor0

query I rowsort
SELECT - ( cor0.col0 ) AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT 4 + 8 / - col0 AS col2 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col2 / + col2 col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL 60 * - col0 / - col2 FROM tab1

query I rowsort
SELECT col0 + 88 / + col2 col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + ( 58 ) FROM tab0, tab0 AS cor0 CROSS JOIN tab0, tab2, tab2 AS cor1

query I rowsort
SELECT - - col2 * + col1 / - 81 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col0 + col1 * col0 / + col0 + - 98 col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT - cor1.col2 * 38 FROM tab1, tab2 AS cor0, tab1, tab2 AS cor1

query I rowsort
SELECT DISTINCT + col0 + col2 * + col1 / col0 + + col2 AS col0 FROM tab1 cor0

query I rowsort
SELECT DISTINCT + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT 1 * col2 / - ( - col2 * - cor0.col1 ) AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col2 / col2 - col2 FROM tab2

query I rowsort
SELECT 80 + - col1 * - col0 / - col1 FROM tab1 AS cor0

query IIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab0 cor1 USING ( col1, col1, col1, col0, col1 )

query I rowsort
SELECT ALL - tab1.col2 AS col2 FROM tab1, tab2, tab0 AS cor0, tab2

query I rowsort
SELECT + col1 * - ( 15 + cor0.col1 ) / 63 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT 2 * - col2 col0 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

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

Added proto/random/select/slt_bad_113.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1, tab2 AS cor1, tab2, tab1 AS cor2

query I rowsort
SELECT ALL - cor0.col1 * col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL cor0.col0 * col1 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col2 * + col0 / col2 - col2 * tab0.col1 * + col2 FROM tab0

query I rowsort
SELECT DISTINCT - col1 - - col0 * + col0 FROM tab1 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT ALL - cor1.col0 * - col2 AS col1 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col2, col2 )

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

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 cor1

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

query I rowsort
SELECT 62 FROM tab2, tab2, tab0 AS cor0, tab0

query I rowsort
SELECT + 74 + - cor0.col2 FROM tab0 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT DISTINCT 56 + col0 FROM tab2 cor0 INNER JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL 10 AS col2 FROM tab0 AS cor0 JOIN tab0, tab2 AS cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT 10 FROM tab2, tab0 cor0 CROSS JOIN tab2

query IIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT + col2 * + tab1.col1 / col2 col1 FROM tab1

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT OUTER JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT + col2 * - ( col2 ) / + col1 - - 69 AS col1 FROM tab0 AS cor0

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

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 cor1

query I rowsort
SELECT - cor1.col1 + cor0.col0 FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT ALL 83 / col0 + - ( col2 ) * + col2 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL - ( cor2.col1 ) FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab0 AS cor2

query I rowsort
SELECT ALL + ( col0 ) FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - col2 * + 65 / col0 col1 FROM tab1

query I rowsort
SELECT - - cor0.col0 FROM tab2, tab2, tab2 cor0

query I rowsort
SELECT DISTINCT - + col1 + col1 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

skipif mysql
query I rowsort
SELECT - cor0.col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2, tab2 AS cor0, tab2

query I rowsort
SELECT + + cor0.col2 * 62 / + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 37 FROM tab0, tab0 AS cor0 CROSS JOIN tab0, tab2 cor1

query I rowsort
SELECT ALL - col0 * - col0 / - col1 FROM tab1 AS cor0

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

query I rowsort
SELECT col1 FROM tab0 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT + + 34 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 cor1

query IIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT ALL - 40 - + col0 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT - col0 / tab2.col2 + + col2 FROM tab2

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

query I rowsort
SELECT ALL + 74 * + col2 / + col0 + col0 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2 cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT 68 + col1 * + col2 + col2 / col2 FROM tab2

query I rowsort
SELECT ALL + 31 AS col2 FROM tab2, tab2, tab1 AS cor0, tab0

query I rowsort
SELECT - 71 - + 31 FROM tab1, tab1, tab1 AS cor0

query IIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 INNER JOIN tab0 USING ( col0, col0, col0, col1, col0, col2, col1, col0 )

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab1

query IIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2, tab1 AS cor3

query I rowsort
SELECT ALL - - 67 * + 80 + col1 * ( - 42 ) AS col2 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + + col2 + - col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col1 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT ALL 60 / + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 62 + col0 * + 35 / 58 FROM tab2 AS cor0

query I rowsort
SELECT + + col0 * col2 / col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + + cor1.col1 AS col0 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + - col1 * - col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

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

skipif mysql
query I rowsort
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab1, tab2 cor0

skipif mysql
query I rowsort
SELECT DISTINCT col1 * col2 / ( - 63 ) + + tab2.col2 / CAST ( - col0 AS REAL ) FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 NATURAL JOIN tab2, tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0, tab2 cor1

query I rowsort
SELECT ALL - 36 * 8 AS col0 FROM tab0, tab0, tab2 AS cor0, tab1

query I rowsort
SELECT + col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col1 * - col1 / 45 FROM tab1 AS cor0

query I rowsort
SELECT + tab1.col0 * cor0.col1 * + 54 AS col0 FROM tab0, tab0, tab2 cor0, tab1

query I rowsort
SELECT ALL 33 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab2 AS cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0 JOIN tab2, tab1 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

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

query I rowsort
SELECT - col2 FROM tab1 cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT - tab1.col0 col2 FROM tab2, tab2, tab1 AS cor0, tab1

query IIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2, col1 )

query IIIIIIII rowsort
SELECT * FROM tab1 cor0 INNER JOIN tab2 AS cor1 USING ( col2 ), tab0 AS cor2

query I rowsort
SELECT - - 76 FROM tab1, tab1, tab2 cor0, tab0

query I rowsort
SELECT ALL + col1 col1 FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL - 12 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL + col0 AS col2 FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col0 )

query I rowsort
SELECT + + col2 / + col2 + 79 * col0 col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT OUTER JOIN tab1 cor1

skipif mysql
query I rowsort
SELECT ALL - CAST ( 48 AS REAL ) AS col2 FROM tab1 AS cor0 JOIN tab0 cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT ALL col2 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col1 * + tab0.col1 / tab0.col2 + + col1 * - 48 FROM tab0

query I rowsort
SELECT - col0 / col2 AS col2 FROM tab2 cor0

query I rowsort
SELECT + col2 / + cor0.col2 + col2 FROM tab2 AS cor0

query I rowsort
SELECT + cor0.col2 + + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT + 76 * + col1 / - col0 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + 20 / + col2 + col0 * - col1 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1 USING ( col0, col0 )

query I rowsort
SELECT - col2 * - col0 - col0 / col2 AS col1 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab2, tab1 AS cor1 USING ( col2, col2 )

query I rowsort
SELECT cor0.col1 / - cor0.col1 AS col0 FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col0, col2 )

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1, tab2 AS cor2

query I rowsort
SELECT ALL - + col0 * col1 + + col2 / col2 FROM tab2 AS cor0

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

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

query I rowsort
SELECT + col0 * + col2 / - 12 + - col1 * ( col2 ) - col1 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL col2 * + tab2.col1 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT - 56 * - cor0.col2 / - 41 AS col1 FROM tab0, tab2 AS cor0

Added proto/random/select/slt_bad_114.proto.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIII rowsort
SELECT * FROM tab1 cor0 NATURAL JOIN tab2, tab0 cor1

query I rowsort
SELECT col0 / col2 + - col0 * col1 + 21 AS col2 FROM tab2

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL - col1 + + col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - col0 FROM tab2 cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab2 cor0 INNER JOIN tab0 AS cor1 USING ( col0 )

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

query I rowsort
SELECT + col1 + col2 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT ALL + 71 FROM tab2 AS cor0 LEFT JOIN tab1 AS cor1

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

query I rowsort
SELECT + 58 / - 35 FROM tab0, tab0, tab2 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 JOIN tab1 USING ( col1, col0, col2, col1, col0, col1 )

query I rowsort
SELECT ALL cor0.col0 FROM tab1 cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT + col0 + col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - + 83 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + col1 * - 21 / + cor0.col2 + col0 FROM tab2 cor0

query I rowsort
SELECT col2 + + col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + col1 + col2 col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + 57 / - col2 + col2 * 65 * + col1 FROM tab2 cor0

query I rowsort
SELECT - col0 * + col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 INNER JOIN tab1

query I rowsort
SELECT DISTINCT cor0.col1 + + 9 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT ALL + col0 * - col2 col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT 54 * - col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + 27 + + col0 / + cor0.col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 + - col0 / - 0 + 79 AS col1 FROM tab0

query I rowsort
SELECT - + col0 * + col0 / - 72 + + 43 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT - col1 * + col1 / col0 AS col0 FROM tab2

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT + col2 FROM tab1 AS cor0 NATURAL JOIN tab0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT 94 AS col0 FROM tab1, tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT DISTINCT + - col1 + + col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col0 / col0 + ( col0 + col0 ) / ( col2 ) AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col0 + col0 / - col2 + + col0 AS col2 FROM tab2

query I rowsort
SELECT tab0.col0 col1 FROM tab0, tab1, tab0 AS cor0, tab1

skipif mysql
query I rowsort
SELECT - col2 + CAST ( 52 AS REAL ) / - col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL - 72 FROM tab2, tab2, tab1 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + + 0 AS col1 FROM tab2 cor0 NATURAL INNER JOIN tab1, tab0 AS cor1 USING ( col2, col0, col0, col1, col2, col1, col2, col0 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1, tab1 AS cor1, tab0 AS cor2

query I rowsort
SELECT + col1 / - 12 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT 34 FROM tab0 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + + cor1.col0 FROM tab2 cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab1 AS cor0 JOIN tab0, tab1 AS cor1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col2, col0, col2, col2, col0, col1, col1 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2, tab2 AS cor1, tab2 AS cor2

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 ), tab1 AS cor2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT - - col0 + 4 * + col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col0 * - col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT 21 * tab2.col0 / + col2 + 14 FROM tab2

query III rowsort
SELECT ALL * FROM tab1 cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT ( - 59 ) * col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - - col0 FROM tab0 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + col0 * - col0 / + col2 AS col1 FROM tab1 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab1 cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col1 * - 66 / + 60 + col0 FROM tab1

query I rowsort
SELECT + 83 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab1, tab2 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT DISTINCT + 18 * 16 AS col2 FROM tab2 AS cor0 LEFT OUTER JOIN tab0 cor1

query III rowsort
SELECT ALL * FROM tab1 cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT ALL col2 + + cor0.col2 * - col2 / - col1 FROM tab1 AS cor0

query I rowsort
SELECT ALL cor1.col2 - - 56 FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1

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

query I rowsort
SELECT + col1 * col1 + cor0.col1 + col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 1 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col2 * - col2 / - col1 - - col0 AS col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab0 cor1

query I rowsort
SELECT DISTINCT + ( 67 ) FROM tab0, tab0, tab2 cor0

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col1, col0, col1, col2, col0 )

query I rowsort
SELECT DISTINCT - - 96 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT ALL + - col0 * 57 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT ALL - CAST ( col1 AS INTEGER ) + + cor0.col1 FROM tab1 AS cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + + cor0.col0 + cor0.col1 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT DISTINCT cor0.col1 / 95 FROM tab1, tab1 AS cor0 CROSS JOIN tab1

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

query I rowsort
SELECT 37 + + 16 FROM tab1, tab0 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT DISTINCT + col0 + - 18 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + col0 col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 39 / 35 FROM tab2, tab2, tab1 AS cor0, tab2

query I rowsort
SELECT ALL - cor0.col1 * + col0 / - cor0.col1 col0 FROM tab2 cor0

query I rowsort
SELECT tab0.col1 * + col2 / col1 AS col1 FROM tab0

query I rowsort
SELECT + 35 FROM tab2, tab2, tab1 cor0

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT - 82 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col0, col1, col2, col0, col2, col1, col1, col1, col1, col1, col2, col0, col2, col0 )

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab1, tab0 cor1, tab0, tab2 AS cor2

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT col0 + cor1.col2 * - col0 AS col1 FROM tab1 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT 80 + col1 * - col0 / 21 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + 65 * + col2 / 56 + + col1 col1 FROM tab1 AS cor0

query I rowsort
SELECT + + cor0.col0 + 15 / col2 FROM tab2 AS cor0

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

query I rowsort
SELECT DISTINCT 61 * 48 * cor0.col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

Added proto/random/select/slt_bad_115.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL 6 FROM tab1, tab0, tab2 AS cor0, tab1

query I rowsort
SELECT cor0.col1 * 88 - - cor0.col0 FROM tab0 AS cor0 LEFT JOIN tab1 AS cor1 USING ( col0 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab1 AS cor2

skipif mysql
query I rowsort
SELECT ( - 18 + col1 ) / - CAST ( - col2 AS REAL ) FROM tab0

query I rowsort
SELECT ALL - 44 * - cor0.col0 / cor0.col2 + col0 * - col2 FROM tab0 AS cor0

query I rowsort
SELECT - col2 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col2 + col1 / + col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL 7 + col0 * 0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + col1 / - CAST ( - 37 AS REAL ) - col0 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 77 AS col1 FROM tab1, tab0 AS cor0 JOIN tab2 USING ( col1, col2, col1 )

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

query I rowsort
SELECT DISTINCT col2 / + col2 + col0 * + 59 FROM tab2 AS cor0

query I rowsort
SELECT + 84 * + 22 FROM tab0 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT - + ( 85 ) FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT DISTINCT tab1.col1 + - col2 + col0 FROM tab1 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT DISTINCT col0 + col0 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT DISTINCT - col2 * - col2 + - col2 / - col0 + col2 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT ( 90 ) * + cor0.col2 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL + col2 + - col0 * + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - col2 * - col1 / col2 FROM tab1 AS cor0

query I rowsort
SELECT ALL + - col0 - col1 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col0 col1 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 cor0 NATURAL INNER JOIN tab0, tab2 AS cor1

query IIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0, tab2 AS cor1 USING ( col0, col1, col1, col1, col0, col1 )

query I rowsort
SELECT + col1 * - 77 FROM tab1 AS cor0 INNER JOIN tab2 cor1 USING ( col1 )

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 JOIN tab2, tab2 AS cor1

query I rowsort
SELECT ALL + col1 * + col0 / col2 FROM tab2

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

query I rowsort
SELECT DISTINCT + + cor0.col0 - 2 FROM tab1 cor0 JOIN tab0 AS cor1

query IIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col2, col1, col1, col1 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab1 cor1 USING ( col0, col0 )

query I rowsort
SELECT 96 * cor0.col0 AS col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT ALL - 91 AS col1 FROM tab1, tab2 AS cor0 NATURAL INNER JOIN tab0, tab0 AS cor1 USING ( col2, col2, col1, col1, col0, col2, col1 )

query I rowsort
SELECT ALL 60 / col1 + - col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT - col0 + col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 + col0 / col2 AS col2 FROM tab2

query I rowsort
SELECT col0 + col2 / 51 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 cor1

query I rowsort
SELECT 43 / + tab2.col2 FROM tab2

query I rowsort
SELECT cor0.col2 AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab2

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

query I rowsort
SELECT ALL - col2 * + col2 / col0 + col2 AS col2 FROM tab1

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2, tab1 cor1

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - col0 + + col2 / + ( col2 ) FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + col2 + col1 * col1 / col1 AS col0 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - col1 col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 NATURAL JOIN tab2

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

skipif mysql
query I rowsort
SELECT ALL + CAST ( + 90 AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT DISTINCT + ( - tab2.col1 ) / col2 FROM tab2

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2, tab1 AS cor0 INNER JOIN tab2

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL LEFT JOIN tab2 cor1

query I rowsort
SELECT 71 + 10 AS col1 FROM tab1 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT DISTINCT 17 / - col2 AS col1 FROM tab2

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col1, col1, col0, col2, col1, col2, col1, col0, col0 )

query I rowsort
SELECT col2 / col2 + + 68 / - 47 FROM tab2

query I rowsort
SELECT ALL cor0.col0 + + 19 * col2 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 86 AS col2 FROM tab2, tab2, tab2 AS cor0

query IIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab0 AS cor2, tab2 AS cor3

query I rowsort
SELECT col0 * + 93 + col0 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + - col0 * - ( + ( - col2 ) * col2 ) AS col2 FROM tab0 cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + - cor1.col2 * - col0 AS col1 FROM tab1 AS cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT - col0 * 92 / - col2 FROM tab2 cor0

query I rowsort
SELECT DISTINCT - col2 FROM tab2 cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + 31 + - col0 / col2 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT ALL cor1.col0 * - ( + col2 ) FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT DISTINCT col2 / col2 + col0 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT col2 FROM tab2 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT - col2 - cor0.col2 * - cor0.col0 / + cor0.col1 FROM tab2 AS cor0

query IIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab2 AS cor1 USING ( col2, col0, col2, col0 )

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

query I rowsort
SELECT ALL - - col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col1 + - 57 * col1 col2 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT 40 * + col2 / + col1 AS col1 FROM tab2

query I rowsort
SELECT + cor0.col2 / col2 col2 FROM tab2 AS cor0

query I rowsort
SELECT + col1 + - col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0, tab0 AS cor1, tab1, tab1 AS cor2

query I rowsort
SELECT ALL + 98 FROM tab0 AS cor0 JOIN tab0, tab1 AS cor1 USING ( col0, col1 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab1, tab1 AS cor1, tab1 AS cor2, tab2 cor3

query I rowsort
SELECT + - col1 * + col1 / - col0 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 LEFT JOIN tab0 AS cor1

query I rowsort
SELECT + + col0 * - 60 / col1 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT col1 + col2 * - col2 / + col2 col1 FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT DISTINCT + col1 / col0 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT ALL cor0.col0 FROM tab2 AS cor0 JOIN tab0 USING ( col2 )

skipif mysql
query I rowsort
SELECT ALL CAST ( - col2 AS REAL ) / + col1 - + col1 col0 FROM tab0

query IIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT - 89 / + col2 + + tab2.col0 col0 FROM tab2

query I rowsort
SELECT - 34 + + cor1.col0 + col1 / + 40 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT cor1.col2 + + cor1.col2 * + col2 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT ALL - - col2 / col2 + ( col1 ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - 26 / col2 + + ( - col0 ) + - col1 FROM tab2 AS cor0

Added proto/random/select/slt_bad_116.proto.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

skipif mysql
query I rowsort
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) / col1 col0 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab1 AS cor1, tab1 cor2

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT - ( cor0.col1 ) * + CAST ( NULL AS INTEGER ) - 27 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - ( - ( + col2 / - 12 / col0 / + col1 ) ) * - 15 * - col1 FROM tab0 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 LEFT JOIN tab2

query I rowsort
SELECT DISTINCT + col1 * - col1 / + col2 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT col1 * col0 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL - col2 + + ( 45 ) / + col2 FROM tab2

query I rowsort
SELECT 99 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab0 AS cor2, tab1, tab0 AS cor3

query I rowsort
SELECT DISTINCT - 83 / - col2 col2 FROM tab2

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 JOIN tab0 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 ), tab0 AS cor2, tab1 AS cor3

query I rowsort
SELECT - 55 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT DISTINCT - col0 * - col2 / col1 AS col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) * 81 FROM tab1 AS cor0 INNER JOIN tab2, tab2 AS cor1 USING ( col2, col1, col0 )

query I rowsort
SELECT ALL col0 AS col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT cor1.col1 FROM tab1 cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - col1 + col1 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

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

query I rowsort
SELECT - col2 * - col2 / - ( - 62 ) + col1 FROM tab0 AS cor0

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

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 ), tab2 cor2, tab1, tab2 AS cor3

query III rowsort
SELECT ALL * FROM tab0 cor0 NATURAL INNER JOIN tab1, tab0 AS cor1 USING ( col2, col1, col2, col2, col2, col1, col0, col0, col2, col0, col1, col0, col1 )

query I rowsort
SELECT + + ( 76 ) + - col0 / col2 AS col0 FROM tab2 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT col2 / ( + col0 * col2 ) AS col0 FROM tab2

query I rowsort
SELECT - col2 * ( col0 ) / col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 * - col0 / + ( + col1 ) FROM tab1

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

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab2 AS cor2, tab0 AS cor3

query I rowsort
SELECT DISTINCT - col1 + col2 * col2 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col0 * + 86 / - col0 AS col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1

query I rowsort
SELECT DISTINCT + - 97 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + - cor1.col0 AS col0 FROM tab0 AS cor0 LEFT JOIN tab1 cor1

skipif mysql
query I rowsort
SELECT - + col1 * + CAST ( NULL AS INTEGER ) + cor0.col1 * - col1 * col1 + + cor1.col0 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 32 / ( - col2 * + col1 ) FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 96 FROM tab0, tab0, tab0 AS cor0, tab2 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 NATURAL JOIN tab1, tab1 AS cor1, tab0 AS cor2

query I rowsort
SELECT DISTINCT - col2 + - col1 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL - + 36 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT DISTINCT col1 * + tab0.col0 / + col2 + - col1 AS col0 FROM tab0

query I rowsort
SELECT ALL col0 AS col0 FROM tab1 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT ALL + col2 + - col2 col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col1 AS col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - col2 + col1 * col0 - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col1 / - col2 FROM tab2

query I rowsort
SELECT ALL tab2.col2 / + col2 + tab2.col1 FROM tab2

query I rowsort
SELECT ( + col0 ) * + col2 / cor0.col0 + - 23 * - col1 * col2 FROM tab2 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + col1 * + col2 FROM tab2 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col2 * col2 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col1 + + col2 / col2 FROM tab2

query I rowsort
SELECT + col1 AS col1 FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT - + col2 * + col1 / cor0.col0 + + col2 FROM tab2 cor0

query I rowsort
SELECT - cor0.col0 + ( + 30 * col0 ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT 62 AS col0 FROM tab1, tab2 AS cor0, tab1, tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT - 2 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT 37 * - cor0.col1 * + 7 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT col1 / col2 + + 86 FROM tab2

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

query I rowsort
SELECT + + 25 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + - cor0.col1 + - 83 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT ALL + col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL cor2.col0 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2, tab1 AS cor2

query I rowsort
SELECT col2 FROM tab1 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT col0 * col2 + col2 + col1 FROM tab0 AS cor0 NATURAL JOIN tab1 WHERE ( NULL ) BETWEEN NULL AND NULL

query I rowsort
SELECT 48 FROM tab0 cor0 JOIN tab1 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT 8 + col0 * + col0 * + col0 - - col2 * - col2 / - col0 FROM tab1

query I rowsort
SELECT - 53 col0 FROM tab2, tab0 cor0 CROSS JOIN tab2

query I rowsort
SELECT ALL - - col1 + - 29 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col2 + - col1 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT ALL 45 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + 79 FROM tab1, tab1, tab2 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query IIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col2, col0, col0 )

query I rowsort
SELECT ALL - tab0.col1 * - col0 / - col1 col1 FROM tab0

query I rowsort
SELECT DISTINCT - col0 * - col0 / - col1 FROM tab1

query I rowsort
SELECT + col2 / - col2 + col0 FROM tab2

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

query I rowsort
SELECT ALL - col2 * + col0 / col1 FROM tab0 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab0 AS cor1, tab2 AS cor2, tab1 cor3

skipif mysql
query I rowsort
SELECT ALL + + CAST ( col2 AS INTEGER ) + col1 * + col0 / + col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL + col1 + col1 col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col2, col0, col0, col2, col1 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 INNER JOIN tab1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 LEFT OUTER JOIN tab2

query I rowsort
SELECT DISTINCT col1 * - col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT + + col2 / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 * + col1 / cor0.col0 FROM tab0 AS cor0

query I rowsort
SELECT + col2 * 47 + col1 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col2 * - 34 / + col1 FROM tab2 AS cor0

query I rowsort
SELECT - col0 / - col2 FROM tab2

query IIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT - - col0 * - col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

Added proto/random/select/slt_bad_117.proto.





































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col2, col2, col2 )

query I rowsort
SELECT ALL tab2.col2 * - col1 / - col2 + col1 AS col1 FROM tab2

query I rowsort
SELECT - col0 * + col0 / - col1 AS col0 FROM tab1

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

query I rowsort
SELECT DISTINCT - ( - cor0.col0 ) FROM tab2 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + - col1 + col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 38 AS col2 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT DISTINCT - - col2 - - col0 * - 34 / - col0 FROM tab0 cor0

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2 cor1

query I rowsort
SELECT DISTINCT col1 * + col2 / col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL col1 * + col2 + + col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT - col1 + - col2 + ( - 59 ) * + col0 / + col2 AS col0 FROM tab1 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 INNER JOIN tab2, tab1 AS cor1

query I rowsort
SELECT ALL + col0 * 51 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT - 75 + col2 / col0 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT + + col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT - 59 col2 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT ALL + 2 AS col1 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT + col2 * - col2 + 61 / tab2.col2 + tab2.col0 col2 FROM tab2

query I rowsort
SELECT ALL + col1 / col2 + 67 - cor0.col1 col2 FROM tab2 AS cor0

query I rowsort
SELECT - + col1 + col2 / + col2 FROM tab2 cor0

query I rowsort
SELECT col1 / + col2 + - col1 AS col1 FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab1 cor1

query I rowsort
SELECT DISTINCT col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + + 62 * + col0 / cor0.col2 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT - + ( + 71 ) - + col2 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + + ( 20 ) AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

query I rowsort
SELECT - col0 + col0 col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT + 94 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT + col0 + + col1 / - col2 FROM tab2

query I rowsort
SELECT + cor0.col2 / 57 FROM tab1, tab1 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT col0 / + col2 AS col0 FROM tab2 AS cor0

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col0 ) WHERE NULL <= NULL

query I rowsort
SELECT ALL 43 AS col2 FROM tab1, tab1, tab0 AS cor0

query IIIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT OUTER JOIN tab1, tab2 AS cor1 USING ( col0, col1, col0, col0 )

query I rowsort
SELECT ALL col1 + 57 + col2 FROM tab0 AS cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT 67 AS col0 FROM tab2 AS cor0 INNER JOIN tab0 cor1 USING ( col1 ), tab0 cor2

query I rowsort
SELECT - 13 * - col2 / col1 FROM tab2 cor0

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

query I rowsort
SELECT DISTINCT + 55 + - col2 / - col2 FROM tab2

query I rowsort
SELECT - col1 * col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col2 - cor0.col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col2 * col2 + + col0 * + 43 / + cor0.col1 AS col1 FROM tab2 cor0

query I rowsort
SELECT 20 + + col1 * - cor0.col0 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - - 77 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT col2 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1 cor1 USING ( col1 )

query I rowsort
SELECT ALL col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 13 / col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT + col1 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL + + cor0.col0 + + col0 * + col0 / col1 FROM tab1 AS cor0

query I rowsort
SELECT + 13 + - col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + cor0.col1 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query IIIIII rowsort
SELECT * FROM tab1, tab1 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 50 AS col1 FROM tab2, tab1 AS cor0 LEFT JOIN tab0 USING ( col0 )

query I rowsort
SELECT ( - 82 ) FROM tab2, tab2, tab0 AS cor0, tab2 AS cor1

query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT + col0 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT ALL + 43 AS col1 FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT - - col1 + col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL col1 * + col0 + col1 / + col2 + + col1 FROM tab2

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

query I rowsort
SELECT ALL - col0 + - tab2.col0 * - col1 / tab2.col2 AS col0 FROM tab2

query I rowsort
SELECT + 92 FROM tab1, tab2 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT col0 * + cor1.col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 JOIN tab1, tab0 AS cor1

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

query IIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2, col1, col2, col1, col2 )

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL col2 * - col1 / - 63 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT + - 54 / cor0.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1

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

query I rowsort
SELECT - cor0.col2 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT ALL + col1 / - col1 + col1 / ( ( col0 ) ) AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT 78 AS col1 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT DISTINCT - + col1 + - col0 / + col2 FROM tab2 cor0

query I rowsort
SELECT col0 * - 16 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT - + cor0.col2 + 68 col2 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT ALL col1 - 38 / + tab2.col2 AS col0 FROM tab2

query I rowsort
SELECT ALL + 74 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT DISTINCT + col2 * + col1 / - 81 col2 FROM tab2

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

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab0 cor1 USING ( col0 )

query I rowsort
SELECT DISTINCT col0 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT col1 / col2 AS col2 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL - 37 FROM tab0, tab0, tab2 cor0, tab0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0, tab1 AS cor1, tab2 AS cor2, tab0 AS cor3

query I rowsort
SELECT DISTINCT - col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - tab2.col1 * col1 / col2 - col1 AS col1 FROM tab2

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

query I rowsort
SELECT DISTINCT + + 94 + col1 AS col1 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 cor1

query I rowsort
SELECT ALL 71 * + col1 AS col2 FROM tab0 cor0 NATURAL INNER JOIN tab2 AS cor1

Added proto/random/select/slt_bad_118.proto.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab1 AS cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT col0 * - ( cor0.col0 ) - - ( - col0 ) FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - - col2 * + col1 col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL 63 AS col1 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col2 ), tab2 AS cor2

query IIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT + + col1 * ( cor0.col0 ) FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + col2 / col2 col2 FROM tab2 AS cor0

query I rowsort
SELECT + col2 + cor0.col0 + + col0 / + col2 AS col0 FROM tab2 cor0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1, tab1, tab1 cor2

query I rowsort
SELECT DISTINCT - - cor1.col1 FROM tab2 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL - 55 * + 9 AS col0 FROM tab1 cor0 JOIN tab2 AS cor1

query I rowsort
SELECT ALL + + col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col2 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL ( + tab1.col0 ) AS col1 FROM tab0, tab0, tab1 AS cor0, tab1

query I rowsort
SELECT cor0.col1 FROM tab2, tab2, tab0 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab0, tab1 AS cor1, tab0 AS cor2, tab2 cor3

query I rowsort
SELECT - col1 / - tab2.col2 FROM tab2

skipif mysql
query I rowsort
SELECT ALL - + cor0.col1 * cor0.col0 + CAST ( - 91 AS INTEGER ) AS col2 FROM tab0, tab1, tab0 AS cor0, tab0

skipif mysql
query I rowsort
SELECT - + CAST ( col1 AS INTEGER ) - col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 cor2

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col2 * - col1 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query IIIIIII rowsort
SELECT * FROM tab1, tab0 cor0 LEFT OUTER JOIN tab0 USING ( col1, col0 )

skipif mysql
query I rowsort
SELECT DISTINCT - - CAST ( col1 AS INTEGER ) + + col1 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT + + col0 / + col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab1 cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT + col1 * cor0.col0 + col2 * + ( - col0 ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT tab1.col0 * + col0 / + tab1.col1 FROM tab1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 LEFT JOIN tab1, tab0 AS cor1 USING ( col1, col1 )

query I rowsort
SELECT DISTINCT + + col1 - + 11 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT col2 - col1 * - col2 / col0 col0 FROM tab2 AS cor0

query I rowsort
SELECT col1 + col0 / - ( - col2 ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - 51 * - ( + col2 ) / col2 AS col1 FROM tab2 AS cor0

query IIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col1 )

query IIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col2, col0, col0 )

query I rowsort
SELECT - ( col2 ) / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT 89 AS col0 FROM tab1 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col2 * - col0 / col1 - - col1 AS col1 FROM tab0

query I rowsort
SELECT DISTINCT - col1 * + col0 / - col1 AS col2 FROM tab2 AS cor0

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

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col2 ), tab0 AS cor2

query I rowsort
SELECT ALL + 73 / - tab2.col2 FROM tab2

query I rowsort
SELECT tab2.col2 * - col1 / + col0 FROM tab2

query I rowsort
SELECT ALL + 86 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT col1 + 0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2, tab2, tab2 AS cor3

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1

query I rowsort
SELECT - col1 + cor1.col2 * + col2 col2 FROM tab1 cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT DISTINCT col2 * col2 + cor1.col0 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 NATURAL JOIN tab1, tab1 AS cor1

query I rowsort
SELECT DISTINCT col1 * - col2 / col1 FROM tab2

query I rowsort
SELECT col1 AS col0 FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT - - col1 / - ( cor0.col1 ) FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col0 * - 60 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + col2 / + col2 + col0 col2 FROM tab2 AS cor0

query I rowsort
SELECT col0 * - cor0.col1 / + 66 + cor0.col0 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT - 36 * 95 * col1 + col2 col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT - - 73 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ( col1 ) * + col1 / 68 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT 13 FROM tab1, tab1, tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0 cor1 USING ( col0 ), tab1 AS cor2

skipif mysql
query I rowsort
SELECT ALL - CAST ( NULL AS INTEGER ) + - cor0.col1 FROM tab2, tab1 AS cor0, tab2, tab2 AS cor1

query I rowsort
SELECT DISTINCT 71 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 cor1 USING ( col2, col1, col0, col2, col1, col2, col2 )

query I rowsort
SELECT DISTINCT col0 / + col2 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1, tab2 AS cor0, tab1

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 AS cor0 LEFT OUTER JOIN tab1, tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL col2 * - col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT col1 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT ( - col0 ) / + col1 - - ( - 13 ) * + col0 / 24 AS col1 FROM tab2

query I rowsort
SELECT ALL + tab0.col1 FROM tab1, tab1, tab0 AS cor0, tab0

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

query I rowsort
SELECT - 15 + 63 / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col2 + + col1 * + tab2.col1 / + ( col0 ) col0 FROM tab2

query I rowsort
SELECT DISTINCT + - 38 - + col2 * + col2 / col0 FROM tab0 AS cor0

query I rowsort
SELECT - 1 / + cor0.col2 + col2 * 14 AS col1 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT ALL - 5 FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1 USING ( col2, col2 )

query I rowsort
SELECT col1 / + col2 AS col2 FROM tab2

query I rowsort
SELECT - col1 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 INNER JOIN tab2 cor1

query I rowsort
SELECT + + 42 / - cor0.col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - col1 * - col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT tab2.col1 / tab2.col2 AS col2 FROM tab2

query I rowsort
SELECT - - col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT - - 62 col1 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT + 34 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT + 85 AS col0 FROM tab2, tab2 AS cor0, tab2, tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) + 57 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT - col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - cor0.col1 * - 24 AS col1 FROM tab2 AS cor0 JOIN tab0 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col1 )

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

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT ALL + 92 FROM tab2, tab2, tab1 cor0

query I rowsort
SELECT col1 * + 5 / - col1 AS col1 FROM tab1

query I rowsort
SELECT ALL 20 * 60 / col2 - + ( - col1 ) FROM tab2

Added proto/random/select/slt_bad_119.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT - col2 * col0 / col2 FROM tab2 AS cor0

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

skipif mysql
query I rowsort
SELECT - tab2.col1 / + col2 + col0 + + CAST ( NULL AS INTEGER ) col1 FROM tab2

query I rowsort
SELECT ALL - cor0.col1 FROM tab0, tab1 AS cor0, tab0, tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col2 * tab2.col1 + + col1 / tab2.col2 FROM tab2

query I rowsort
SELECT DISTINCT - col0 / - col2 FROM tab2

query I rowsort
SELECT + + 98 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT DISTINCT col2 / - tab2.col2 FROM tab2

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab2 cor1

query I rowsort
SELECT + - col1 * + 79 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2, tab2, tab2 AS cor0

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

query I rowsort
SELECT ALL 0 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab0 cor2

query I rowsort
SELECT ALL - - 74 AS col0 FROM tab1 AS cor0 LEFT OUTER JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT + - 31 FROM tab0, tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 / + col2 + ( + cor0.col2 ) FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 NATURAL INNER JOIN tab0

query I rowsort
SELECT cor0.col0 FROM tab1, tab1, tab1 AS cor0, tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1, tab2 AS cor2

query I rowsort
SELECT ALL + 44 / - cor0.col2 + col0 FROM tab2 cor0

query I rowsort
SELECT DISTINCT + - 78 * - col0 / + 50 FROM tab0 AS cor0

query I rowsort
SELECT ALL + 71 AS col2 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT DISTINCT col0 * + col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - - col1 + + col2 * - col1 + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1 USING ( col0, col0, col0, col1, col1, col1, col2, col2, col1, col0 )

query I rowsort
SELECT 95 AS col2 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 cor2

query I rowsort
SELECT ALL col2 / + col2 col1 FROM tab2

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 cor2, tab0, tab2 AS cor3

query I rowsort
SELECT ALL - - 82 * + col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT - - 21 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT col2 * + 91 / col0 AS col0 FROM tab2

query IIIIII rowsort
SELECT * FROM tab2, tab0 cor0 NATURAL JOIN tab1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab1 USING ( col2, col2, col1, col2, col0, col2 )

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

query I rowsort
SELECT 46 * - col1 / + 70 AS col2 FROM tab2

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

query IIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col1 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0, tab2 AS cor1 USING ( col0, col0 )

query I rowsort
SELECT - ( + ( col1 / cor0.col2 ) ) + + 75 * col2 * + 47 AS col2 FROM tab2 AS cor0

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col2, col0, col0, col1, col2, col2 )

query I rowsort
SELECT + 75 * + col2 + - col1 - ( + 92 ) * cor1.col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab2, tab0 AS cor0

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col2, col2 )

query IIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1 USING ( col1, col1, col1, col2 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 INNER JOIN tab1, tab2 AS cor1

query I rowsort
SELECT ALL - 45 AS col1 FROM tab0 AS cor0 LEFT JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT JOIN tab1 cor1 USING ( col0 ), tab0 AS cor2

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 ), tab1 AS cor2, tab1, tab1 cor3

query I rowsort
SELECT + 18 / + cor1.col2 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1

query I rowsort
SELECT ALL 63 FROM tab0, tab0, tab0 AS cor0, tab0 AS cor1

query I rowsort
SELECT col0 + - col1 / - ( + col2 ) FROM tab2 AS cor0

query I rowsort
SELECT - cor1.col1 * + 72 AS col1 FROM tab1 AS cor0 JOIN tab0, tab2 AS cor1 USING ( col2, col1 )

query I rowsort
SELECT DISTINCT + + col0 * col1 AS col2 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + - col1 * + col0 / + 35 AS col0 FROM tab1 AS cor0

query IIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col1, col1, col0, col0 )

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab0 USING ( col2 )

query I rowsort
SELECT - + cor0.col1 + col0 * + col2 / + 5 FROM tab2 AS cor0

query I rowsort
SELECT - ( col0 ) * - cor0.col2 / cor0.col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + - col2 + + 88 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col1 * - col0 / - col2 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT ALL + 72 AS col1 FROM tab0, tab0, tab0 cor0

query III rowsort
SELECT * FROM tab2 cor0 NATURAL LEFT OUTER JOIN tab0 cor1

query I rowsort
SELECT cor0.col1 * cor0.col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT ALL col1 * tab2.col1 / + col2 FROM tab2

query I rowsort
SELECT + 61 AS col0 FROM tab2, tab0, tab1 cor0, tab2

query I rowsort
SELECT - cor1.col2 col2 FROM tab2 cor0 INNER JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT + col1 / col2 col1 FROM tab2

query I rowsort
SELECT ALL - 8 + + col2 * + tab0.col1 / - tab0.col0 AS col0 FROM tab0

query I rowsort
SELECT ALL col1 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col0 * col2 AS col2 FROM tab1 cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT + cor1.col1 AS col1 FROM tab1, tab0 AS cor0, tab1, tab1 AS cor1

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

query I rowsort
SELECT DISTINCT + + 13 / + ( cor0.col2 ) FROM tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL INNER JOIN tab0, tab0 cor1, tab0 AS cor2, tab2 AS cor3

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2, tab1, tab0 AS cor0, tab2

query I rowsort
SELECT 53 * - 63 col0 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT 31 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL 52 * col1 + col2 col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT ALL col0 * - col0 / + col2 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + 15 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab1 cor2, tab1, tab2 AS cor3

query I rowsort
SELECT DISTINCT col2 + cor0.col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT 35 * col0 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

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

query I rowsort
SELECT DISTINCT - 58 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - - col1 * - col1 / col2 FROM tab0 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 JOIN tab0 USING ( col1, col1 )

query I rowsort
SELECT DISTINCT - 19 + cor0.col0 / - col0 - col1 * + 86 / col1 FROM tab1 AS cor0

query I rowsort
SELECT - - cor1.col2 * col0 col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 + col1 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 + col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL col1 * + cor0.col0 - - col2 * cor1.col0 * - col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab0 cor0 INNER JOIN tab1 AS cor1 USING ( col2 )

Added proto/random/select/slt_bad_12.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL - cor0.col1 FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 cor1

query I rowsort
SELECT + + 10 * 70 AS col1 FROM tab2 AS cor0 JOIN tab0 AS cor1

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

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL 38 AS col2 FROM tab2, tab2 AS cor0 JOIN tab0

query IIIII rowsort
SELECT ALL * FROM tab2 cor0 INNER JOIN tab0 AS cor1 USING ( col1 )

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab1, tab0 AS cor1

query I rowsort
SELECT ALL col0 * + col1 / + 57 col0 FROM tab0 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT JOIN tab0 AS cor1 USING ( col2 )

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

query I rowsort
SELECT 11 + 48 col2 FROM tab0, tab0, tab0 AS cor0, tab0

query III rowsort
SELECT * FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT - 1 / col2 AS col1 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab0 AS cor1

query I rowsort
SELECT DISTINCT + ( + 55 ) AS col0 FROM tab0, tab2 AS cor0, tab0, tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT OUTER JOIN tab1 AS cor1

query III rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL + + CAST ( 2 AS INTEGER ) FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT col1 * + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL - cor0.col0 / col2 FROM tab2 cor0

query I rowsort
SELECT DISTINCT ( + 5 ) * cor2.col0 FROM tab0 AS cor0 INNER JOIN tab2, tab2 cor1, tab2, tab0 cor2, tab2 AS cor3

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT ALL - 27 + - col1 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col1 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL 61 FROM tab0, tab0, tab0 cor0

query I rowsort
SELECT DISTINCT 84 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab2, tab0, tab1 AS cor1

query I rowsort
SELECT DISTINCT - col1 * + 58 / + col1 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT 80 * + ( col1 ) / col0 + - col2 FROM tab1 AS cor0

query I rowsort
SELECT ALL - cor1.col0 FROM tab0 AS cor0 JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 INNER JOIN tab0 USING ( col2 )

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1

query I rowsort
SELECT + + 28 + + col2 / - col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( + 11 AS INTEGER ) + cor0.col1 FROM tab1, tab1, tab1 AS cor0

query III rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col2, col1, col0 )

query I rowsort
SELECT - - col0 + + ( col1 ) FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + 64 - col0 * col2 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT - col0 / col2 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT DISTINCT + 56 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + 12 FROM tab2 AS cor0 LEFT JOIN tab2 AS cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT ALL + + ( - col0 ) + col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 INNER JOIN tab0, tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1

query I rowsort
SELECT ALL - col2 + col0 * col2 / - col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 INNER JOIN tab0

query I rowsort
SELECT ALL + col0 / col0 + + col2 / + tab2.col2 + col0 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT col0 / + col2 + cor0.col1 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 / - col2 FROM tab2

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

query I rowsort
SELECT DISTINCT - col0 / + col2 + + 50 + - ( col0 ) / + 15 AS col0 FROM tab2 AS cor0

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

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab1, tab0 AS cor1

skipif mysql
query I rowsort
SELECT - + CAST ( NULL AS INTEGER ) * cor0.col1 col1 FROM tab0 cor0 INNER JOIN tab1, tab2 AS cor1 USING ( col2, col1, col0, col1 )

query I rowsort
SELECT ALL + cor1.col0 + cor1.col0 * cor1.col1 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT - 93 AS col1 FROM tab2 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT col0 * col0 / + tab2.col2 FROM tab2

query I rowsort
SELECT DISTINCT + 15 FROM tab2, tab2, tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 JOIN tab2

query I rowsort
SELECT - 77 + + 19 FROM tab0, tab0, tab0 AS cor0

query IIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col0, col0, col1, col0, col0 )

query IIIIII rowsort
SELECT * FROM tab1 cor0 LEFT OUTER JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab1 AS cor1, tab0 AS cor2, tab2 AS cor3

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

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab1, tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL + col1 / + CAST ( + col1 * col0 AS REAL ) FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0, tab2 AS cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0 INNER JOIN tab1

query I rowsort
SELECT - 50 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 + col2 * + 68 / + col2 + col1 col1 FROM tab1

query I rowsort
SELECT 4 * - col2 / 14 FROM tab0 AS cor0

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT - 81 * + col1 + col2 / + col2 AS col0 FROM tab2 cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT + 20 AS col2 FROM tab0, tab0, tab2 cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab2 cor1, tab2, tab2 AS cor2

query I rowsort
SELECT ALL - col0 + col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab2 cor2

query IIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 NATURAL INNER JOIN tab1, tab2 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT - col0 + col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT cor2.col2 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2

query I rowsort
SELECT DISTINCT + 53 + cor0.col1 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col2 * + 87 / - cor0.col2 AS col1 FROM tab2 cor0

query I rowsort
SELECT DISTINCT - col1 + - col0 / col2 FROM tab2

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 INNER JOIN tab1 cor1

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

query I rowsort
SELECT col0 * + col1 / col2 col1 FROM tab0 AS cor0

query I rowsort
SELECT - ( 31 ) FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + col1 AS col2 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1

query I rowsort
SELECT 32 FROM tab0 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2, tab1 AS cor3

query I rowsort
SELECT - + 10 AS col1 FROM tab1, tab1 AS cor0, tab1, tab1 AS cor1

query I rowsort
SELECT tab0.col1 FROM tab1, tab1, tab0 AS cor0, tab0

Added proto/random/select/slt_bad_120.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT + col0 + col1 / + col2 FROM tab2

query I rowsort
SELECT + tab1.col1 * + col1 / col2 + - col1 / - col1 + + col1 col2 FROM tab1

query I rowsort
SELECT DISTINCT - 12 AS col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col2 ), tab1 AS cor2

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 cor1 USING ( col1 )

query I rowsort
SELECT - - col2 * - col2 / col1 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL + ( + col2 ) * + ( + col1 * col1 + 92 ) col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 AS cor1

skipif mysql
query I rowsort
SELECT - col0 * CAST ( col0 AS INTEGER ) - - col1 / + ( + cor0.col2 ) col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL - 11 AS col2 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT ALL - col2 * - ( - col2 ) + + 71 / - cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT + 18 + - cor0.col2 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT - 54 / tab2.col2 + col0 col0 FROM tab2

query I rowsort
SELECT DISTINCT + + 77 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab1, tab1 cor2

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab1 cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT ALL 2 FROM tab0 cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL col1 * - col1 / col2 + - col0 * col2 FROM tab1 AS cor0

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col0 * - col1 / - 33 FROM tab1 cor0

query I rowsort
SELECT ALL col0 + col0 * - col2 / col0 AS col1 FROM tab0 AS cor0

query IIII rowsort
SELECT ALL * FROM tab1 cor0 NATURAL INNER JOIN tab1, tab0 AS cor1 USING ( col1, col2 )

query I rowsort
SELECT - 14 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT - col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL col0 + col1 * cor0.col1 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 cor1

query I rowsort
SELECT - + col0 * - ( - col0 + col2 ) / - ( 68 ) FROM tab1 AS cor0

query I rowsort
SELECT - + 62 * col1 + + col2 / - col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - col1 * - ( col2 + cor0.col2 ) / 56 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + 70 * 24 AS col0 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT + col1 FROM tab1 cor0 NATURAL INNER JOIN tab2 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT ALL col1 / - col2 col2 FROM tab2

query I rowsort
SELECT col1 FROM tab1 cor0 INNER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT col1 + col1 * - col2 / col1 FROM tab1

query I rowsort
SELECT ALL 13 / + tab2.col2 + + col1 col2 FROM tab2

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1, tab2 AS cor1, tab1 AS cor2

query I rowsort
SELECT - tab2.col0 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT - tab0.col2 * + col0 / + col1 + + col1 AS col1 FROM tab0

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

query I rowsort
SELECT ALL - 88 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col0 * + col1 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT tab2.col2 / + col2 + - tab2.col2 AS col0 FROM tab2

query I rowsort
SELECT - 24 * 50 / col2 FROM tab2 AS cor0

query I rowsort
SELECT 11 * + col2 + - col2 - col0 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - ( tab2.col2 ) / - ( col2 ) + col1 FROM tab2

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

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0 INNER JOIN tab0, tab2 AS cor1

query I rowsort
SELECT + col1 - - col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL cor1.col1 * col2 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2, tab0 cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT - col2 / + col2 + + col2 AS col2 FROM tab2 AS cor0

query IIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col2 ), tab1 cor2

query I rowsort
SELECT DISTINCT + 88 + - col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT - 91 / col2 AS col0 FROM tab2

query I rowsort
SELECT ALL + - col0 * ( - col2 ) FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL col1 * + col2 / 38 AS col0 FROM tab1 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 INNER JOIN tab2, tab2 AS cor1

query III rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col0, col2, col1, col0, col1 )

query I rowsort
SELECT ALL - col2 + - col0 / cor0.col2 AS col1 FROM tab2 cor0

query I rowsort
SELECT - col0 * - col2 + - col2 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT - + col1 AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT col2 * + col0 / - col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT + + 5 * 26 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL cor1.col2 FROM tab0 AS cor0 JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 JOIN tab1, tab0 AS cor1

query I rowsort
SELECT col0 * - col1 / - col0 + - ( 89 * + col2 ) AS col2 FROM tab1

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

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 cor1 USING ( col2, col1, col0, col1, col2, col2 )

skipif mysql
query I rowsort
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) + col1 * + col0 / + ( ( - cor0.col2 ) ) col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col0 / - ( + col2 * col1 ) + - 5 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 JOIN tab1

query I rowsort
SELECT ALL - - 47 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT DISTINCT - ( col2 ) * 56 + + ( col0 ) * + 81 / col0 FROM tab2

query I rowsort
SELECT DISTINCT + ( col1 ) - tab2.col2 / + ( + col2 ) AS col2 FROM tab2

query I rowsort
SELECT DISTINCT 30 AS col1 FROM tab0, tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1

query I rowsort
SELECT - 71 FROM tab0, tab1 AS cor0 NATURAL JOIN tab2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 JOIN tab2, tab2 AS cor1, tab2 AS cor2

query I rowsort
SELECT DISTINCT - ( - 10 ) - cor0.col2 FROM tab0 cor0 JOIN tab0 AS cor1

query I rowsort
SELECT ALL - 87 AS col2 FROM tab1 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT - col2 * col1 / + tab2.col2 AS col1 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT ALL - 11 FROM tab0, tab0, tab2 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1, tab0 cor2

query IIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col2, col0 )

query I rowsort
SELECT + + ( + col1 ) * + col2 / + 20 + + col2 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT 1 * 78 * cor1.col1 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col0 + + col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + col2 / col2 col1 FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0 NATURAL JOIN tab1

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

query IIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT + col1 * col2 / + col2 AS col1 FROM tab2 cor0

query I rowsort
SELECT DISTINCT - col0 * - col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col0 col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - 21 * + col0 / - 80 + + col2 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT + col1 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

Added proto/random/select/slt_bad_121.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT tab2.col2 / col2 + col1 AS col0 FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 INNER JOIN tab2

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab1, tab0 AS cor1

query I rowsort
SELECT ALL + - col2 * + col0 / + col1 FROM tab2 cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 LEFT JOIN tab1, tab2 AS cor1, tab1 cor2

query I rowsort
SELECT ALL col0 / 43 + - col1 / + col2 AS col2 FROM tab2 AS cor0

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

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab2, tab0 AS cor1, tab0, tab2 AS cor2

query IIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab2, tab1 AS cor1 USING ( col2, col2, col0, col2 )

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab1, tab1 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 WHERE cor1.col0 NOT BETWEEN NULL AND ( NULL )

query I rowsort
SELECT col0 * + col0 / 2 + col0 AS col2 FROM tab0 AS cor0

query I rowsort
SELECT col1 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL tab2.col2 / - col2 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT + col1 * - col1 / - cor0.col0 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT ALL - col0 / col2 col0 FROM tab2

query I rowsort
SELECT DISTINCT - col0 + col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIII rowsort
SELECT * FROM tab0, tab1 cor0 JOIN tab1 USING ( col2, col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + col1 * col0 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col0 AS col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 LEFT OUTER JOIN tab2, tab2 AS cor1

skipif mysql
query I rowsort
SELECT ALL - col1 + - col1 * CAST ( col0 + col2 AS INTEGER ) AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL + + cor0.col0 / col2 + cor0.col0 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col0 + - 94 AS col1 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col0 - + col0 / tab2.col2 AS col2 FROM tab2

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab1 USING ( col0 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1

query I rowsort
SELECT col2 * - col1 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT 17 + + 92 FROM tab2 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col1, col2 )

query I rowsort
SELECT + - 76 FROM tab1, tab1, tab0 cor0, tab2

query I rowsort
SELECT + 32 AS col2 FROM tab1, tab2, tab1 AS cor0, tab2

query I rowsort
SELECT col0 * col0 - col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 8 + - col1 + ( - 30 ) AS col0 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + 30 col2 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col1 / + ( col2 ) + - cor0.col1 + col0 AS col1 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT JOIN tab2, tab0 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 JOIN tab1 USING ( col0, col0, col0 )

query I rowsort
SELECT DISTINCT col0 * 94 - + 12 * + col1 / col2 col1 FROM tab2

query I rowsort
SELECT + col1 * + col2 AS col0 FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab1, tab0 cor0 NATURAL JOIN tab0

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + 92 / tab2.col2 AS col2 FROM tab2

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

query I rowsort
SELECT + 88 FROM tab0, tab2, tab1 cor0, tab0

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

query I rowsort
SELECT + + 40 / col2 - - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL - col1 + - ( - col2 ) AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + col0 * + 76 / 48 AS col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0, tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab1, tab0 AS cor1 USING ( col0, col1, col0, col1, col0, col0, col0, col1, col2, col1 )

query I rowsort
SELECT ALL col2 / tab2.col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT + + cor0.col1 + col1 * - col2 / + col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT + + CAST ( - col1 AS INTEGER ) + + col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - + 50 / cor0.col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - 84 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1

query I rowsort
SELECT 55 AS col0 FROM tab2, tab1 AS cor0 LEFT JOIN tab0

query IIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 INNER JOIN tab2, tab2 AS cor1 USING ( col1, col2 )

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab1 AS cor1, tab2 cor2, tab1 AS cor3

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 NATURAL JOIN tab0, tab2 AS cor1, tab1 AS cor2

query I rowsort
SELECT DISTINCT 21 * + 68 FROM tab1, tab2 AS cor0 INNER JOIN tab2

query I rowsort
SELECT ALL + 47 + - col0 * + 75 * - col2 + col1 * - col1 / + col0 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT ( + 41 ) FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT - + cor0.col0 + + col0 * - col2 / col0 AS col0 FROM tab0 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 LEFT OUTER JOIN tab0

query I rowsort
SELECT ALL - col2 + col0 * + col0 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT col0 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL LEFT JOIN tab0, tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT col2 / - col1 + col0 * - col1 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col0 * + col1 / + cor0.col2 AS col1 FROM tab0 AS cor0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2, tab1 AS cor1, tab1 AS cor2

query I rowsort
SELECT ALL col0 / - col2 + 18 * col1 + col1 AS col2 FROM tab2 AS cor0

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

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab0 AS cor1, tab2 AS cor2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 INNER JOIN tab2

query I rowsort
SELECT - - col1 * col0 AS col0 FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT tab0.col0 AS col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0

query I rowsort
SELECT + col1 * 59 + col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT 20 * - col2 / 4 + 1 FROM tab1

query I rowsort
SELECT ALL col2 * col1 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - - 54 FROM tab1, tab2 AS cor0, tab1, tab2 AS cor1

query I rowsort
SELECT DISTINCT - tab2.col2 FROM tab1, tab0 AS cor0 LEFT OUTER JOIN tab2

query I rowsort
SELECT col2 AS col0 FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT - 48 + - col1 col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + col0 * 12 + + 46 * col2 + col0 * col1 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + + cor1.col0 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 INNER JOIN tab2, tab0 cor1

query I rowsort
SELECT 75 FROM tab0 AS cor0 JOIN tab0 cor1

query IIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col0, col2 )

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT + - col1 * + col1 + col0 * col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col1 * col1 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + col2 - - 28 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2

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

query I rowsort
SELECT DISTINCT + col2 / + cor0.col2 FROM tab2 cor0

query I rowsort
SELECT col1 * + col2 / + 11 FROM tab1 AS cor0

Added proto/random/select/slt_bad_122.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab2, tab2 AS cor1, tab1 AS cor2

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

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

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 LEFT OUTER JOIN tab1

query I rowsort
SELECT DISTINCT + col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col0 * + 73 + cor0.col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col0 / - tab2.col2 + - 78 + col0 AS col1 FROM tab2

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0, tab2 cor1 USING ( col0, col2, col1, col1, col1 )

query I rowsort
SELECT ALL col1 * col0 * + col0 col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0, tab2 AS cor1 USING ( col1, col2, col2, col0, col0, col2 )

query I rowsort
SELECT ALL + ( 9 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 cor1, tab0, tab2 AS cor2, tab2

query I rowsort
SELECT cor1.col2 + col2 * col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + tab2.col0 FROM tab2, tab0, tab2 AS cor0, tab0

query I rowsort
SELECT DISTINCT - cor0.col1 AS col2 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT col1 / - col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col1 + col2 * - col0 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col2 + - col1 / col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT col0 / col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT ALL - col0 * - 94 + col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0 JOIN tab2

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1 USING ( col1 )

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

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1

query I rowsort
SELECT DISTINCT + + col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 ), tab2 AS cor2, tab0 AS cor3

query I rowsort
SELECT 14 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT + + 25 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + + col2 + col0 * - col2 / + col0 - col1 col2 FROM tab0 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 NATURAL LEFT JOIN tab2, tab2 AS cor1

query I rowsort
SELECT - + 7 FROM tab0, tab0, tab2 cor0

query I rowsort
SELECT col1 * - col0 + 85 + col2 / - col2 col0 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab0, tab0 AS cor1 USING ( col0 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab2, tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab2 cor1

query I rowsort
SELECT ALL - col2 * - 94 / + col2 AS col1 FROM tab0 cor0

query I rowsort
SELECT + col1 / - col2 FROM tab2 cor0

query I rowsort
SELECT - + col1 + col1 / + col2 FROM tab2 cor0

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 cor1 USING ( col1 ), tab0 AS cor2, tab1, tab2 AS cor3

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL INNER JOIN tab1, tab1 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL INNER JOIN tab0, tab2 cor1

query IIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2, tab1 cor1 USING ( col1, col0 )

query I rowsort
SELECT - col1 / - col2 + 26 + col1 FROM tab2

query I rowsort
SELECT DISTINCT - col0 + - col0 + col0 / - col2 AS col0 FROM tab2

query IIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 INNER JOIN tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT cor0.col1 FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT + + col2 * + col2 / + col0 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT + 85 / - 48 FROM tab2, tab0 AS cor0, tab2, tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2, tab2 cor1 USING ( col1 )

query I rowsort
SELECT ALL + ( col0 ) / col2 + col1 AS col1 FROM tab2 AS cor0

query IIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col1, col1, col0, col1, col0 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 NATURAL JOIN tab1, tab1 AS cor1, tab2 cor2, tab0 cor3

query I rowsort
SELECT cor1.col0 FROM tab1 AS cor0 INNER JOIN tab2, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT - + 60 + - 26 FROM tab2 AS cor0 JOIN tab0, tab1 AS cor1 USING ( col0, col0, col0 )

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

query I rowsort
SELECT 9 * cor1.col2 FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab1 AS cor1, tab1 AS cor2

query I rowsort
SELECT 68 AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT ALL - col2 / + col2 + col0 * - tab2.col1 AS col0 FROM tab2

query I rowsort
SELECT ALL cor0.col0 AS col2 FROM tab2 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT 11 FROM tab1 cor0 JOIN tab1 AS cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT ALL + + cor0.col0 * + 96 / cor0.col2 + col1 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL + ( 48 ) + - col0 * + ( + 57 + col1 ) / col2 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT + 81 * + col2 / - 67 FROM tab1

query I rowsort
SELECT ALL 77 FROM tab0, tab0, tab1 AS cor0, tab2

query I rowsort
SELECT - + 63 / col2 + + ( - 84 ) AS col2 FROM tab2 AS cor0

query IIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab0 USING ( col1, col0 )

query I rowsort
SELECT DISTINCT + - 48 FROM tab2 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1

query I rowsort
SELECT col2 + col0 * - col1 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - cor0.col0 * cor0.col1 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL + cor0.col1 * + cor0.col0 / col2 - + ( - cor0.col0 ) * col2 AS col1 FROM tab1 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL INNER JOIN tab1, tab2 cor1 USING ( col1 )

query I rowsort
SELECT col2 - + col0 col0 FROM tab0 cor0 NATURAL LEFT JOIN tab2

query I rowsort
SELECT col2 / + col2 AS col1 FROM tab2

query I rowsort
SELECT + cor0.col0 * - col2 + col0 * - col1 + + col1 / col2 col0 FROM tab2 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL INNER JOIN tab0, tab2 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1, tab1 AS cor1, tab1 AS cor2, tab1 AS cor3

query I rowsort
SELECT + + 32 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 cor1, tab0, tab0 AS cor2, tab0

query I rowsort
SELECT ALL 31 FROM tab2, tab2, tab2 AS cor0, tab0

query I rowsort
SELECT 60 / + cor0.col2 FROM tab0, tab2 AS cor0

query I rowsort
SELECT ALL + ( + cor0.col2 ) FROM tab2, tab2, tab2 AS cor0, tab2 cor1

query I rowsort
SELECT ALL 25 / col2 + - col0 AS col0 FROM tab2

skipif mysql
query I rowsort
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2, tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 cor1

query IIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab0, tab1 cor1 USING ( col2, col0, col1, col1 )

query I rowsort
SELECT col1 + 15 * - col1 / + col2 + + col1 * col1 AS col1 FROM tab1

query I rowsort
SELECT - - 52 FROM tab0, tab0 cor0 CROSS JOIN tab0, tab0, tab0 cor1

query I rowsort
SELECT DISTINCT + col2 * - 6 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - + 33 AS col2 FROM tab1 AS cor0 JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT - ( + 14 ) FROM tab1, tab1, tab2 cor0

Added proto/random/select/slt_bad_123.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT + + ( cor0.col0 ) AS col2 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT cor0.col2 FROM tab1 AS cor0 LEFT OUTER JOIN tab1, tab0 AS cor1, tab0 AS cor2

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

query I rowsort
SELECT + + ( + col1 ) * col0 * col1 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 INNER JOIN tab2 AS cor1 USING ( col0 ), tab1 cor2

query I rowsort
SELECT ALL + col0 / - col2 col0 FROM tab2

query I rowsort
SELECT 22 AS col2 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT DISTINCT + col0 * + col0 / - col2 AS col1 FROM tab1

query III rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab2

query I rowsort
SELECT + tab2.col1 col0 FROM tab1, tab1 AS cor0 JOIN tab2 USING ( col2 )

query I rowsort
SELECT ALL 23 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT 84 FROM tab1, tab1, tab1 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL - 50 + - col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col2 / + col2 + col1 FROM tab2

query I rowsort
SELECT ALL col2 / col0 FROM tab0 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT - col0 / - col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - - col1 * - col2 / - col0 FROM tab0 AS cor0

query I rowsort
SELECT ALL + cor1.col1 * col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL 23 / col2 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT + col1 / tab2.col2 FROM tab2

query I rowsort
SELECT + col0 / + cor0.col2 + + col1 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 38 FROM tab0 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab2, tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1

query I rowsort
SELECT + col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + + col1 + cor0.col2 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 60 AS col2 FROM tab0 cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col0 ), tab1 AS cor2, tab2 cor3

query I rowsort
SELECT DISTINCT - - col2 + + col1 + ( col2 ) / + cor0.col2 col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT DISTINCT - col2 / col2 FROM tab2 cor0

query I rowsort
SELECT - + col2 * - 45 / + col2 AS col1 FROM tab1 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col1, col1, col2, col0 )

query I rowsort
SELECT - 55 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT 68 FROM tab1 AS cor0 INNER JOIN tab2 cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT + - col2 + col1 * + CAST ( col0 AS INTEGER ) / col1 col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col2 - + 71 * col0 * - 50 FROM tab1 cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT ALL + col1 - + cor0.col1 / - col0 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col2 * col2 + + col1 + col2 * col0 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + ( 2 ) * col0 + cor0.col0 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + col1 * col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + ( 87 * cor1.col1 + + cor0.col0 ) AS col2 FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT - 17 + col0 AS col1 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2, tab2, tab1 cor0

query I rowsort
SELECT ALL + 15 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT col2 / - col0 - + col2 / - col2 FROM tab2

query I rowsort
SELECT + cor0.col2 * col2 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT 65 + + 66 col2 FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT + col2 / + col2 + + 84 + + col0 FROM tab2 AS cor0

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

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab2, tab1 AS cor1

query I rowsort
SELECT DISTINCT 27 col1 FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col0, col2, col0, col2, col1, col2, col1, col2, col1, col0, col2 )

query I rowsort
SELECT + 85 FROM tab2, tab2, tab1 AS cor0

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

query I rowsort
SELECT - col0 * - col1 / col2 + - col0 * 25 FROM tab1 AS cor0

query I rowsort
SELECT - cor0.col1 * - col0 / col2 AS col2 FROM tab2 AS cor0

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

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

skipif mysql
query I rowsort
SELECT ALL + + CAST ( 72 AS INTEGER ) AS col1 FROM tab0 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col2 ), tab2 cor2

query I rowsort
SELECT DISTINCT - cor1.col2 AS col1 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - cor1.col1 + 19 FROM tab0 AS cor0 JOIN tab2, tab1 AS cor1

query I rowsort
SELECT + col1 + col1 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT 3 AS col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2

skipif mysql
query I rowsort
SELECT ALL - col1 + - cor0.col1 / CAST ( 19 AS REAL ) AS col0 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + col1 + col1 * + col2 / col1 col1 FROM tab2 AS cor0

query I rowsort
SELECT - - cor0.col2 / col2 AS col0 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 INNER JOIN tab2

query I rowsort
SELECT ALL tab2.col2 FROM tab1, tab2 AS cor0 INNER JOIN tab2

query I rowsort
SELECT + 15 FROM tab1 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL - + 16 + + col1 * col2 / + col2 FROM tab2 cor0

query I rowsort
SELECT 34 AS col0 FROM tab0, tab0 AS cor0 INNER JOIN tab0, tab0 AS cor1

query I rowsort
SELECT 68 FROM tab1 AS cor0 JOIN tab2 AS cor1

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

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

query I rowsort
SELECT ALL col2 * - col0 - col1 * - col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT ALL col0 * - col0 / + 75 AS col0 FROM tab2

query III rowsort
SELECT ALL * FROM tab2 cor0 NATURAL LEFT JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 JOIN tab2

query I rowsort
SELECT ALL - 25 AS col2 FROM tab2, tab2, tab1 AS cor0, tab0

query I rowsort
SELECT ALL cor0.col0 * + ( + col2 ) / + cor0.col1 col2 FROM tab1 AS cor0

query I rowsort
SELECT + col0 + - 40 / ( - col2 ) + + ( - col0 ) * col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT col2 * + ( - 62 ) / col1 + + ( 94 ) + col0 AS col1 FROM tab2 cor0

query I rowsort
SELECT DISTINCT + tab1.col0 AS col2 FROM tab0 cor0 INNER JOIN tab1

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + + cor0.col2 + 3 AS col1 FROM tab0, tab2, tab1 AS cor0, tab2

query I rowsort
SELECT + 14 FROM tab2, tab2, tab1 AS cor0

skipif mysql
query I rowsort
SELECT - col0 * + CAST ( + 75 AS INTEGER ) / col0 + + 60 AS col0 FROM tab1

skipif mysql
query I rowsort
SELECT + 28 + + 29 / - tab2.col2 + - CAST ( NULL AS REAL ) FROM tab2

query I rowsort
SELECT DISTINCT + 94 * + col0 / - col1 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2, tab1 cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT ALL + cor0.col2 * - 38 FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT - 38 AS col2 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT - 85 / col2 col1 FROM tab2 AS cor0

Added proto/random/select/slt_bad_124.proto.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT + cor0.col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 / ( col2 * - col2 ) + col2 AS col1 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 91 AS col1 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + cor2.col1 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT - + col1 / + col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + - 85 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT ALL + + col2 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT ALL - 65 AS col1 FROM tab1 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab2 cor2

query I rowsort
SELECT ALL - - col0 * - col2 / col0 col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col0 * 72 + ( col0 ) * - 54 / ( tab0.col0 ) + + col2 FROM tab0

query I rowsort
SELECT col2 * - 54 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - - CAST ( col1 AS INTEGER ) * + col2 / col2 + col1 * + col0 + 60 * col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT 67 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT DISTINCT col2 + - col2 AS col2 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT 59 * + 42 / col1 FROM tab0

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

query I rowsort
SELECT ALL - 75 * + tab0.col0 AS col0 FROM tab2, tab0 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT ALL 28 AS col2 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT ALL + col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 98 FROM tab0 AS cor0 INNER JOIN tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab2, tab1 AS cor1 USING ( col1 )

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

query I rowsort
SELECT - cor0.col0 * - cor0.col2 / - col0 + 8 FROM tab2 AS cor0

query IIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col0, col0, col0, col2 )

query I rowsort
SELECT 33 / - tab2.col2 + + ( tab2.col0 + + tab2.col1 ) FROM tab2

query I rowsort
SELECT + + 92 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT ALL + - col1 + + col2 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 LEFT JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + col1 / + col2 AS col1 FROM tab2

query IIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab0 USING ( col2, col1, col0, col2, col0 )

query I rowsort
SELECT col0 / - col2 col0 FROM tab2

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 INNER JOIN tab1

query I rowsort
SELECT + col1 * + col1 / col0 AS col2 FROM tab1 cor0

query I rowsort
SELECT - col2 + + col1 * - 77 / col2 FROM tab1 AS cor0

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT - 93 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - ( + col1 ) + - col0 + col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIII rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab2, tab2 cor1 USING ( col2, col1, col2 )

query IIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab0, tab2 AS cor1 USING ( col0, col1 )

query IIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 INNER JOIN tab0, tab1 cor1 USING ( col2 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab2 AS cor1, tab2 AS cor2

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2 )

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab2, tab0, tab2 AS cor1

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab0, tab0, tab2 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT col0 * - 4 / + col2 AS col2 FROM tab0 AS cor0

skipif mysql
query I rowsort
SELECT ALL - CAST ( + 84 AS INTEGER ) AS col2 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT - col1 * + col0 + col1 + col1 / - col2 FROM tab2

query I rowsort
SELECT + cor0.col1 col0 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT col0 * col1 + col1 * col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0 cor1 USING ( col2 )

query I rowsort
SELECT ALL col0 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col1 / col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT cor2.col2 FROM tab1 AS cor0 NATURAL JOIN tab0, tab1 cor1, tab2 AS cor2

skipif mysql
query I rowsort
SELECT + - col0 + + CAST ( col0 AS INTEGER ) * cor0.col1 / - col2 AS col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT ALL - + col2 * col0 + CAST ( col2 AS INTEGER ) * - col1 / 84 col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 / + col2 FROM tab2 cor0

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT - col1 * ( col2 ) - - col0 / - col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab1 cor0 INNER JOIN tab0, tab2 AS cor1 USING ( col2, col2 )

query I rowsort
SELECT ALL + + 92 * col2 AS col0 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

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

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT 36 / col2 + ( 29 ) * col1 + + 73 FROM tab2

query I rowsort
SELECT - + col0 + col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT 19 * col2 + - col2 AS col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL col0 * - CAST ( - col1 AS INTEGER ) / col2 - - col1 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT - - 80 AS col2 FROM tab0 cor0 NATURAL JOIN tab0, tab0 AS cor1

query I rowsort
SELECT - 11 AS col2 FROM tab1, tab2 AS cor0, tab1, tab0 AS cor1

query I rowsort
SELECT DISTINCT + + cor0.col0 AS col0 FROM tab0 AS cor0 JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab1 AS cor2

query IIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0 USING ( col0 )

query I rowsort
SELECT ALL ( col1 ) * cor1.col0 AS col1 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT - col2 * - col1 / - 31 col1 FROM tab2

query I rowsort
SELECT DISTINCT - - ( - col2 ) FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - col0 / col2 FROM tab2

query I rowsort
SELECT + - 68 / cor0.col0 FROM tab2, tab2, tab1 cor0

skipif mysql
query I rowsort
SELECT - CAST ( col2 AS INTEGER ) / col2 AS col2 FROM tab2

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col1 )

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab0 AS cor1, tab0, tab2 AS cor2

query I rowsort
SELECT ALL tab2.col2 + + col2 / - col2 + + col1 FROM tab2

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

query I rowsort
SELECT + tab1.col2 * + col0 / col1 + - col0 + col0 FROM tab1

query I rowsort
SELECT - - cor1.col2 * cor0.col1 FROM tab1 AS cor0 JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 ), tab2 AS cor2

skipif mysql
query I rowsort
SELECT col0 * - col0 / + CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0

query I rowsort
SELECT - col2 + + col1 / col2 AS col1 FROM tab2

query I rowsort
SELECT ALL + cor1.col1 FROM tab1 AS cor0 JOIN tab0, tab1 AS cor1, tab0, tab1 cor2

query I rowsort
SELECT ALL cor0.col0 / + cor1.col2 FROM tab1, tab0 cor0, tab2 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab1 AS cor2, tab1 AS cor3

query I rowsort
SELECT col1 * + 99 * + col0 + ( col0 ) * - col2 / + 21 + col1 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT - cor0.col0 * - 2 AS col1 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT col1 + + col0 * - ( - col2 ) / + col0 FROM tab1

query I rowsort
SELECT - ( + col2 ) + cor1.col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab1, tab0 AS cor1

query IIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col0, col2 )

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

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

Added proto/random/select/slt_bad_125.proto.





















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT 37 / + cor0.col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 + col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT + - CAST ( + col0 AS REAL ) / col1 FROM tab1 cor0

query I rowsort
SELECT ALL ( 30 ) + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + col0 - - CAST ( + cor0.col2 + - col1 AS REAL ) / + col1 FROM tab1 AS cor0

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

query I rowsort
SELECT DISTINCT + col0 / - col2 + col2 * col2 AS col2 FROM tab2

query I rowsort
SELECT col2 * + col0 / 89 FROM tab1

query I rowsort
SELECT DISTINCT + col2 / col2 AS col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2, tab2 cor1

query I rowsort
SELECT + - ( - col1 ) * + cor1.col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL 89 * + col0 + + col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT ALL + cor0.col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col0 / ( + cor0.col1 * - cor0.col2 ) + 14 FROM tab2 AS cor0

query I rowsort
SELECT + col2 * + col0 / col1 + + 96 FROM tab2 AS cor0

query I rowsort
SELECT + 21 AS col0 FROM tab1, tab0 AS cor0 JOIN tab0

query I rowsort
SELECT DISTINCT + + 82 AS col1 FROM tab2, tab2, tab0 AS cor0

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL LEFT JOIN tab2, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL + + col1 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + - col1 / - col0 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT - 26 / col2 + 24 * cor0.col0 AS col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT - col0 + + col0 * - col0 + ( + col2 ) * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL col1 col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0 INNER JOIN tab0, tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT DISTINCT + cor1.col1 + + 86 * 36 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0, tab1 cor1

query I rowsort
SELECT DISTINCT ( cor0.col1 ) / ( ( col2 ) ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT col0 * - col1 / - ( col2 + col1 ) AS col1 FROM tab1

query I rowsort
SELECT - - 21 / ( + col2 ) + 97 / - 79 FROM tab2 cor0

query I rowsort
SELECT 86 / tab2.col2 AS col0 FROM tab2, tab2 AS cor0

query I rowsort
SELECT ALL col1 * col0 / + col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col0 / + ( - col1 ) + cor1.col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT - + ( - 68 ) AS col1 FROM tab0 cor0 INNER JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) + + 53 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab1, tab2 cor1

query I rowsort
SELECT 11 AS col1 FROM tab0, tab1 AS cor0 NATURAL INNER JOIN tab2

query I rowsort
SELECT DISTINCT - + col0 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab2 cor1, tab1 AS cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab1, tab0 AS cor1, tab2 AS cor2

query I rowsort
SELECT + col2 * col1 + tab0.col2 * - col1 / col2 FROM tab0

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0 CROSS JOIN tab1, tab1, tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - + CAST ( NULL AS REAL ) FROM tab1, tab1, tab2 cor0

query I rowsort
SELECT DISTINCT - col1 * col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab1 AS cor1 USING ( col0, col2, col0, col2, col0, col0 )

query I rowsort
SELECT DISTINCT + + col2 * + ( col0 ) / + col2 + cor0.col1 * col1 * col2 AS col2 FROM tab1 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2, tab1 cor1

query I rowsort
SELECT ALL - col2 + col1 * + 21 / col1 AS col0 FROM tab2 cor0

query IIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col2 )

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

query I rowsort
SELECT + 55 AS col1 FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1

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

query I rowsort
SELECT DISTINCT col0 + + col0 * - col0 / 29 AS col0 FROM tab1

query I rowsort
SELECT - col0 * col1 - + col2 * + col0 / + col1 AS col2 FROM tab1 AS cor0

skipif mysql
query I rowsort
SELECT ALL cor0.col2 / - CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0

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

query I rowsort
SELECT - - col1 + - col2 / - ( - ( col2 ) ) AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 AS col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 61 + - ( + col1 ) + 86 * - col1 / col2 AS col0 FROM tab1

query I rowsort
SELECT - col2 * 5 * 62 AS col2 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT ALL + CAST ( ( - col2 ) AS INTEGER ) * + col1 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col1 + - col2 * - tab1.col0 / tab1.col2 FROM tab1

query I rowsort
SELECT DISTINCT + col1 + col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + cor0.col2 AS col2 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT - cor2.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0, tab2 AS cor2

query I rowsort
SELECT + 94 / col2 + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + - cor1.col1 * + 20 + + col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 37 * col0 / + ( col2 + - col2 ) FROM tab1 AS cor0

query I rowsort
SELECT - col1 - ( + col1 ) FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 cor0 NATURAL JOIN tab0, tab0 cor1

query I rowsort
SELECT - - cor0.col0 FROM tab0, tab2 AS cor0, tab0, tab1 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 INNER JOIN tab2

query I rowsort
SELECT ALL - 28 / cor0.col2 FROM tab2 cor0

query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab2, tab2, tab2 cor0

query I rowsort
SELECT ALL col2 * + col2 - - col1 / - col2 FROM tab2

query I rowsort
SELECT ( + 70 ) AS col0 FROM tab0 AS cor0 LEFT JOIN tab2, tab1 cor1 USING ( col2 )

query I rowsort
SELECT + col2 * + col1 + + 51 / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col0 / - col1 + 64 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col0 * col2 / col2 AS col2 FROM tab2

query I rowsort
SELECT - - cor0.col2 FROM tab2, tab1, tab0 AS cor0, tab2

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab2 AS cor1 USING ( col1, col0, col1, col2 )

query IIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col2, col2 )

query I rowsort
SELECT ALL - - col1 * + col2 / col1 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2, tab1 cor0 NATURAL INNER JOIN tab0

query I rowsort
SELECT + col0 * col2 col2 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - - col0 + col1 * + col0 / col2 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT col0 * + col2 / - col1 + col0 AS col1 FROM tab2

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

query I rowsort
SELECT DISTINCT - col2 + col0 * + 29 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 ), tab2 AS cor2

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 JOIN tab1, tab0 AS cor1

query I rowsort
SELECT - col1 * + col2 / + col0 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL + 20 * cor0.col1 FROM tab1, tab1, tab0 cor0

query I rowsort
SELECT ALL + 2 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab0, tab1 AS cor2

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - ( + col0 ) AS col1 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - + col0 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col0 * + ( + col2 ) / - cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT + - cor0.col2 / col2 FROM tab2 cor0

query I rowsort
SELECT - col2 * - 10 / tab1.col2 + - col2 AS col1 FROM tab1

Added proto/random/select/slt_bad_126.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT + - col2 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col1 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 INNER JOIN tab2, tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0, tab2 cor1 USING ( col2 )

query IIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT - col1 * - tab1.col0 / col2 + - 79 AS col1 FROM tab1

query I rowsort
SELECT DISTINCT - - 53 / col2 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT + cor1.col0 + + col1 col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + col1 + + ( - col0 ) / + col2 AS col1 FROM tab2

query I rowsort
SELECT + col2 * - 63 / + col2 + col2 FROM tab2 AS cor0

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

query I rowsort
SELECT DISTINCT + 3 FROM tab1, tab2 cor0 CROSS JOIN tab0, tab0, tab0 cor1

query I rowsort
SELECT col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + + col0 * - 44 / + col2 + col0 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT + + col1 / col2 + col0 * col0 FROM tab2 AS cor0

query I rowsort
SELECT col0 / - col2 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT + col1 / ( cor0.col2 ) FROM tab2 AS cor0

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

query I rowsort
SELECT + col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + col1 + + col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT cor0.col0 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT ALL 76 col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

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

query I rowsort
SELECT 63 * + col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + 6 + col1 FROM tab0 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT - cor1.col0 * col0 * 49 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT cor1.col1 AS col0 FROM tab2 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT ALL + col0 FROM tab1 cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 INNER JOIN tab0

query I rowsort
SELECT DISTINCT + + 92 * - col2 / col1 col1 FROM tab1 AS cor0

query I rowsort
SELECT 64 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col2 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT ALL + cor1.col2 + + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 cor1

query IIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col0, col1, col1, col1 )

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab1 cor2, tab1, tab2 AS cor3

query I rowsort
SELECT ( tab2.col1 ) / col0 + - col2 / + tab2.col2 + col2 AS col1 FROM tab2

query I rowsort
SELECT ALL + 81 * + tab2.col1 / col2 - tab2.col1 * tab2.col1 / - col2 FROM tab2

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

query I rowsort
SELECT col2 * - col1 / tab2.col0 FROM tab2

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 INNER JOIN tab0

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT OUTER JOIN tab2, tab2 cor1

query I rowsort
SELECT DISTINCT 40 * - col2 + col2 / col2 - cor0.col1 FROM tab2 AS cor0

query I rowsort
SELECT + col2 * ( col1 ) FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + col1 + - ( col2 ) + - col0 / + col2 FROM tab2

query I rowsort
SELECT ALL 67 + - col1 * + col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + ( + cor0.col0 ) FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab2, tab1 cor0

query I rowsort
SELECT ALL + col1 * - col0 / cor0.col1 + col1 + col1 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + col1 * + ( col2 ) / col2 FROM tab2

query I rowsort
SELECT tab2.col1 * - 3 / 91 FROM tab2

query I rowsort
SELECT 52 AS col1 FROM tab2, tab0, tab2 cor0, tab0

query I rowsort
SELECT + 73 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT cor0.col1 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT ALL - 80 AS col2 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT DISTINCT - col1 * col0 / + col2 FROM tab2

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

query I rowsort
SELECT - + cor1.col0 AS col2 FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab1 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT col1 AS col0 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT tab2.col0 AS col2 FROM tab0, tab0 AS cor0 JOIN tab2

query I rowsort
SELECT - col2 * col1 + col1 + col1 * col1 / - col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT - col2 / - CAST ( ( - col1 ) + col2 AS REAL ) AS col1 FROM tab2

query I rowsort
SELECT + 19 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT ALL - + 10 FROM tab1, tab2 cor0, tab1, tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 INNER JOIN tab1 USING ( col1, col1, col1, col2, col1, col0, col0 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1, tab1, tab1 AS cor2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 JOIN tab2

query I rowsort
SELECT DISTINCT + col1 * + col1 / col0 FROM tab1 cor0

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2, tab0, tab0 cor0, tab0

query I rowsort
SELECT col0 * - 71 + - col2 * - col0 / - 17 AS col1 FROM tab1 AS cor0

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

query I rowsort
SELECT - col1 / col0 + ( 14 ) * col1 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT + col0 * - col2 / - col1 + col2 FROM tab1 AS cor0

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 INNER JOIN tab0

skipif mysql
query I rowsort
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT col1 * + cor0.col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0, tab2, tab0 AS cor0, tab0

query I rowsort
SELECT + 26 / + col2 - - col0 * + tab2.col0 AS col1 FROM tab2

query I rowsort
SELECT ALL + 10 AS col1 FROM tab0 cor0 JOIN tab1 AS cor1

query I rowsort
SELECT col1 * + col0 + + col2 / - col2 FROM tab2 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 JOIN tab0, tab2, tab1 AS cor1

query I rowsort
SELECT cor0.col0 * - cor1.col0 * cor1.col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT ( - 25 ) - col1 * + 84 / + 77 AS col2 FROM tab2 AS cor0

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1 cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + 53 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT + col2 * + col1 * cor0.col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL col1 * cor1.col2 + col1 * col0 AS col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT ALL - col0 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT ALL + + ( + col1 ) / - col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT col1 * col0 - 42 * - cor0.col0 / col1 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT ALL + 71 + - cor1.col1 * 11 FROM tab1, tab1 AS cor0, tab1, tab1 AS cor1

query I rowsort
SELECT ALL - col1 / + col2 + + col1 FROM tab2

query I rowsort
SELECT ALL col1 * - col2 / col1 + col2 AS col1 FROM tab0

query I rowsort
SELECT - 11 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT col0 * col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

Added proto/random/select/slt_bad_127.proto.





















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ( col1 ) + + 14 * + col2 / col1 FROM tab1 AS cor0

query I rowsort
SELECT - cor0.col2 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT ALL - + cor1.col2 * + col2 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col1 * + col2 / 30 - col1 * + col1 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT - col1 * - 4 / 0 + - col0 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT col2 + - ( cor0.col1 ) * - col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 NATURAL LEFT JOIN tab1, tab2 AS cor1

query I rowsort
SELECT DISTINCT - cor1.col0 AS col0 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT + col0 * col1 FROM tab0 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT - col1 * + cor1.col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - - 64 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + 58 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL 98 FROM tab2, tab0 AS cor0 LEFT OUTER JOIN tab0

skipif mysql
query I rowsort
SELECT - CAST ( col0 AS INTEGER ) * + col0 / - col0 + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT 79 + - col2 FROM tab2 cor0 INNER JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT + ( col1 ) + - col1 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + col2 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - + col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 85 AS col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT - 82 FROM tab2, tab1 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT - col2 * - col0 / col2 + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT - - cor1.col0 + 58 * cor1.col2 AS col0 FROM tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( - col2 AS REAL ) / col1 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT cor2.col1 + + 39 AS col1 FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT + cor0.col0 + - col2 * + col2 / - ( + ( - cor0.col0 ) ) FROM tab0 cor0

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab2, tab0, tab1 AS cor0, tab0

query I rowsort
SELECT DISTINCT + cor1.col1 * - 61 + cor0.col2 * + col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT 46 FROM tab1, tab2, tab2 AS cor0, tab1

query I rowsort
SELECT col1 + col0 * - col0 / + tab2.col1 FROM tab2

skipif mysql
query I rowsort
SELECT DISTINCT + col1 + CAST ( - 5 AS INTEGER ) / - col2 - col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2, tab1 AS cor1 USING ( col1, col1, col2, col1, col1, col0, col1, col0 )

query I rowsort
SELECT - cor1.col1 * col0 + + col2 * 88 + - col1 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL col0 + - col1 * + col1 / + col2 + col2 FROM tab2

query I rowsort
SELECT col0 + col2 * - col1 / col0 col2 FROM tab1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT JOIN tab0 USING ( col2 )

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab0, tab2 AS cor1 USING ( col0, col2, col2, col1, col2, col2 )

query I rowsort
SELECT col0 / tab2.col2 - tab2.col1 * - col1 * - tab2.col1 FROM tab2

query I rowsort
SELECT ALL + - col2 * - 93 / + col2 col0 FROM tab0 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL LEFT OUTER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT cor0.col0 + - col0 * + col0 FROM tab2 cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT + col0 * + cor0.col1 col0 FROM tab0 cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL + col1 / + col2 + col2 / - tab2.col2 FROM tab2

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

query I rowsort
SELECT col0 * + 96 / col0 FROM tab0 AS cor0

query I rowsort
SELECT ALL 97 col1 FROM tab1, tab1, tab0 AS cor0, tab1

query I rowsort
SELECT - 50 * + 68 / cor0.col0 + - cor0.col1 FROM tab1 AS cor0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 JOIN tab2, tab1 cor1

skipif mysql
query I rowsort
SELECT - - CAST ( NULL AS INTEGER ) * col2 + + col2 / - col2 AS col1 FROM tab2 cor0

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT - cor1.col2 * + cor0.col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col1, col0, col1, col2, col0, col1, col2 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT ( + col1 ) * - col0 / col1 FROM tab1 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( + cor0.col1 AS REAL ) + col2 / + col1 FROM tab1 AS cor0

query I rowsort
SELECT - 68 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col2 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 NATURAL INNER JOIN tab2

query IIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1, tab0 AS cor1 USING ( col1, col0, col1, col0 )

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab1, tab2 cor1, tab0, tab0 AS cor2

query I rowsort
SELECT 94 AS col0 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT 23 FROM tab1 cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT - 64 col1 FROM tab0 AS cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT + col2 * col0 + - col2 col2 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

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

query I rowsort
SELECT - col2 * 10 + - col0 + + 3 * col2 / - col2 col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT - CAST ( col2 AS INTEGER ) / col2 - col1 * + tab2.col2 AS col1 FROM tab2

query I rowsort
SELECT - cor0.col2 col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1

query I rowsort
SELECT DISTINCT + col1 * + 68 / + col1 AS col0 FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT ALL + 36 + 69 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT + col0 + col2 col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col2 + - tab1.col0 * - 6 / + col0 FROM tab1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT ALL + col2 col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - 76 + col0 * + col0 FROM tab2 cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab2, tab1 AS cor1

query IIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab1 USING ( col1, col2 )

query I rowsort
SELECT - ( 65 ) FROM tab1 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab1, tab1 cor1, tab1 AS cor2

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 cor1

query I rowsort
SELECT DISTINCT 42 * col0 + 23 * - col0 / + col2 FROM tab1

query I rowsort
SELECT 36 * + col1 / + col0 col0 FROM tab0

query I rowsort
SELECT - col2 FROM tab1 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT - tab1.col2 AS col0 FROM tab0 AS cor0 INNER JOIN tab1

query I rowsort
SELECT col2 * + col2 / - col0 FROM tab0

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

query I rowsort
SELECT - 26 * col1 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT - col1 / ( cor0.col2 ) FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - + ( - col0 ) * - col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col2 )

skipif mysql
query I rowsort
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col1 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1

query I rowsort
SELECT DISTINCT + col2 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

Added proto/random/select/slt_bad_128.proto.

















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT + tab2.col2 / + col0 + + col2 - col1 / - col2 col0 FROM tab2

query I rowsort
SELECT ALL 41 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT DISTINCT col1 + + col1 - - CAST ( 71 AS INTEGER ) / cor0.col2 AS col1 FROM tab2 cor0

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 cor2

query I rowsort
SELECT ALL + cor1.col1 - - 65 AS col2 FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - - col2 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT DISTINCT col2 * + col2 / 18 + - ( - col2 ) AS col1 FROM tab0 cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 LEFT JOIN tab1, tab1 AS cor1, tab1 AS cor2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 JOIN tab1, tab2 cor1, tab2 cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 INNER JOIN tab0, tab2 cor1

query I rowsort
SELECT ALL + tab2.col1 / + col2 AS col1 FROM tab2

query I rowsort
SELECT col2 * col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 INNER JOIN tab0 USING ( col1 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1, tab1 cor1

query I rowsort
SELECT + 15 * - cor0.col0 + 70 * + 33 / col1 + cor0.col1 AS col2 FROM tab0 AS cor0

query I rowsort
SELECT col0 * cor1.col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col1, col1, col1, col1, col2 )

query I rowsort
SELECT ALL + - 57 AS col2 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col2 / tab2.col2 FROM tab2

query I rowsort
SELECT DISTINCT col0 / tab2.col2 AS col0 FROM tab2

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

query I rowsort
SELECT - col0 / + col2 + col2 AS col1 FROM tab2

query I rowsort
SELECT ALL + + 12 AS col0 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT - + 4 - 28 / + cor0.col0 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT col0 * - ( 8 ) / - col2 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT - col2 * - cor0.col2 + col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - - 30 + 5 AS col0 FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1, col0, col2, col1, col0, col0, col2, col0, col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col2, col2 )

query I rowsort
SELECT + col1 * + 38 + - col2 * + col0 / - col2 FROM tab1 AS cor0

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

query I rowsort
SELECT ALL - ( + 33 ) * - cor0.col2 + + 37 * + 50 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT ( tab2.col1 + - col2 ) / tab2.col2 FROM tab2

query I rowsort
SELECT + 1 * 43 + col2 / - col2 + - tab2.col1 FROM tab2

query I rowsort
SELECT + - col2 * - col1 / + col0 FROM tab0 AS cor0

query I rowsort
SELECT col1 / + col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT - cor0.col1 + + 78 FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL - cor0.col0 * - col0 / + col1 FROM tab2 AS cor0

query I rowsort
SELECT - - 23 * col1 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL ( + col0 + - tab2.col2 ) / - col2 AS col2 FROM tab2

skipif mysql
query I rowsort
SELECT DISTINCT - + cor0.col1 * col2 - col0 * - CAST ( - ( - col0 ) AS REAL ) AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

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

query IIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab1, tab1 AS cor1 USING ( col2, col2, col0, col0, col2 )

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

query I rowsort
SELECT ALL + 40 / col2 + 42 / + col2 FROM tab2

query I rowsort
SELECT ALL tab2.col2 / + col2 + col2 + + col2 AS col0 FROM tab2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + col1 + + 28 * cor0.col2 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 NATURAL JOIN tab2, tab1 AS cor1

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

query I rowsort
SELECT 44 * - cor0.col0 AS col1 FROM tab1, tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT + col1 * - col0 + + 80 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - col1 / cor0.col2 + - 68 FROM tab2 cor0

query I rowsort
SELECT ALL + cor0.col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col1 + col1 * 68 / col2 FROM tab2 AS cor0

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 cor1

query IIIIII rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab1, tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + col2 * + 21 / col1 + col1 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col0 * - col0 / col1 FROM tab1

query I rowsort
SELECT col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + - col0 * - 63 * + col2 + 85 FROM tab2 cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT DISTINCT - col1 + ( 25 ) / + col2 FROM tab2

query I rowsort
SELECT DISTINCT + cor1.col1 AS col0 FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT + 41 + + col0 * + cor0.col2 / + 87 col1 FROM tab1 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col1, col2, col2, col1, col2, col0 )

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab1 cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + + cor1.col0 FROM tab1 AS cor0 LEFT JOIN tab1 AS cor1

query I rowsort
SELECT - col2 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT ALL - 61 * + col2 col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col1 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT - + cor0.col0 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL + + 56 + col0 / cor0.col2 AS col2 FROM tab2 cor0

query I rowsort
SELECT col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 / CAST ( - 27 AS INTEGER ) AS col1 FROM tab2 cor0

query I rowsort
SELECT + col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col1 * col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL + + CAST ( - col0 AS REAL ) / col1 col2 FROM tab1 AS cor0

query I rowsort
SELECT - col1 / cor0.col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 JOIN tab0, tab1 cor1

query I rowsort
SELECT DISTINCT 17 AS col1 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + + 64 * 2 + - col1 * col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT ALL + cor0.col2 * + col2 / 52 AS col0 FROM tab2 cor0

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

skipif mysql
query I rowsort
SELECT DISTINCT - ( col0 ) + + col2 * CAST ( NULL AS REAL ) FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 2 / - cor0.col1 FROM tab2 cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + ( ( + col1 ) ) AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 77 AS col2 FROM tab1 cor0 JOIN tab1 AS cor1

query I rowsort
SELECT ALL + ( - col2 ) * - cor1.col1 * ( 1 * - cor1.col2 ) FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT ALL CAST ( - col1 AS INTEGER ) AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + col0 + col2 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT 50 / - tab2.col2 AS col1 FROM tab2

query I rowsort
SELECT - + col2 * - cor1.col1 - col2 * 9 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col0 * - tab2.col1 / + col0 FROM tab2

query I rowsort
SELECT DISTINCT tab2.col2 * - col2 / col0 AS col2 FROM tab2

Added proto/random/select/slt_bad_129.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

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

query I rowsort
SELECT ALL 71 FROM tab1, tab1, tab0 AS cor0, tab1 AS cor1

query I rowsort
SELECT ALL - 47 FROM tab0, tab0, tab0 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL col2 / + col2 + col0 FROM tab2

query I rowsort
SELECT DISTINCT 84 FROM tab2, tab1 AS cor0, tab2, tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 NATURAL INNER JOIN tab1, tab0 AS cor1, tab1 AS cor2

query I rowsort
SELECT ALL cor0.col2 * tab1.col0 AS col0 FROM tab2, tab1 AS cor0 INNER JOIN tab1

query IIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col1, col2, col2 )

skipif mysql
query I rowsort
SELECT + - col0 * cor0.col2 * - col1 + - 45 / col1 + col1 * ( col1 + CAST ( NULL AS INTEGER ) ) AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIII rowsort
SELECT * FROM tab0 cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col1, col0, col0, col0 )

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT ALL 21 AS col1 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT col0 * - col1 / col2 col2 FROM tab2 AS cor0

query I rowsort
SELECT + col2 / ( col2 ) AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + + 40 / + col2 AS col0 FROM tab2 AS cor0

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col0, col0, col2, col0, col2, col2, col1 )

query I rowsort
SELECT 18 * - 72 / tab0.col1 AS col1 FROM tab0

query I rowsort
SELECT 97 / col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + 22 * - cor0.col0 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab2 cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT + ( - col1 ) / + col2 AS col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 LEFT OUTER JOIN tab0 AS cor1

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

query I rowsort
SELECT ALL - + col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + + col2 + col1 * - ( - col1 ) / col0 FROM tab2 cor0

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab1

query I rowsort
SELECT ALL - col2 AS col2 FROM tab2 AS cor0 NATURAL LEFT JOIN tab2

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT + + 49 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2, tab1 cor2

query I rowsort
SELECT DISTINCT col2 * - 88 / - col2 + cor0.col2 + - col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT ALL 16 AS col0 FROM tab1, tab1, tab2 cor0

query I rowsort
SELECT - cor0.col2 * 59 AS col0 FROM tab2, tab2, tab1 AS cor0

query III rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab0 cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT DISTINCT - 21 * + cor0.col1 * cor1.col1 AS col2 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + 62 col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1

query I rowsort
SELECT - 15 FROM tab2, tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT + - col2 col0 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT + + 99 * - 62 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col0 * + 70 / + col0 FROM tab2

query I rowsort
SELECT + - col1 + col1 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col0 / + col2 FROM tab2

query I rowsort
SELECT ALL 36 * col2 + + col0 * + col2 / + col0 FROM tab0 AS cor0

query I rowsort
SELECT - ( col2 ) * - col0 / col2 - + col0 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL col0 * col2 / ( col2 ) AS col0 FROM tab2

query I rowsort
SELECT DISTINCT col2 / col2 AS col0 FROM tab2 cor0

query I rowsort
SELECT + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT col1 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT ALL - + cor0.col0 / - col2 + col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL cor1.col0 + col1 col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT ( - 47 ) + col0 * 20 * ( cor0.col2 * + col2 ) AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

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

query I rowsort
SELECT ALL + - col0 / + cor0.col2 AS col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab2 cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 LEFT OUTER JOIN tab2 cor1

query I rowsort
SELECT 15 AS col0 FROM tab2, tab2 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT + - 79 col2 FROM tab2 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT ALL + 19 + col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col2, col1, col0 )

query I rowsort
SELECT ALL + col2 * col1 + col1 / col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT CAST ( 5 AS REAL ) AS col0 FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL - col1 + - ( col2 ) * + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT 74 AS col2 FROM tab2, tab0 AS cor0, tab2 cor1, tab2, tab2 AS cor2

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

query I rowsort
SELECT col1 * 84 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - + col2 / col2 + - col1 FROM tab2 AS cor0

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

query I rowsort
SELECT DISTINCT col1 * col1 FROM tab1 cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab1 AS cor1

query I rowsort
SELECT + 71 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab0, tab0 AS cor2

query I rowsort
SELECT DISTINCT - + col0 - ( 70 ) FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab0, tab2 cor1

query IIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL INNER JOIN tab2, tab0 AS cor1 USING ( col2, col0 )

query I rowsort
SELECT + 82 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - 22 col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1

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

query I rowsort
SELECT DISTINCT cor0.col0 * + col1 / - 55 AS col2 FROM tab1 AS cor0

skipif mysql
query I rowsort
SELECT col0 * + col0 / + CAST ( + col1 AS INTEGER ) AS col1 FROM tab1 AS cor0

query I rowsort
SELECT ALL + 64 + col2 * - col1 / + col0 AS col1 FROM tab1

query I rowsort
SELECT - ( 13 ) + + cor1.col1 FROM tab0 cor0 NATURAL INNER JOIN tab1, tab1 AS cor1 USING ( col0, col0, col0 )

query I rowsort
SELECT DISTINCT - 98 / col2 + col2 + - col1 * 85 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL col1 + col0 * + col1 / + cor0.col2 FROM tab0 AS cor0

query I rowsort
SELECT - col2 / tab2.col2 AS col2 FROM tab2

query I rowsort
SELECT + 64 FROM tab1 AS cor0 JOIN tab2 AS cor1

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

query I rowsort
SELECT DISTINCT - col2 / col2 col2 FROM tab2 cor0

query I rowsort
SELECT 86 FROM tab0 AS cor0 INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0 INNER JOIN tab1 USING ( col0, col2, col1, col1 )

query IIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 JOIN tab2 USING ( col1 )

skipif mysql
query I rowsort
SELECT CAST ( - 1 AS INTEGER ) col1 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab0, tab0 AS cor2

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 cor2, tab1, tab0 AS cor3

query I rowsort
SELECT tab2.col0 - - col2 / col2 FROM tab2

query I rowsort
SELECT - col2 + + 25 / + cor0.col2 FROM tab2 AS cor0

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

Added proto/random/select/slt_bad_13.proto.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL INNER JOIN tab1, tab0 AS cor1 USING ( col2 ), tab2 AS cor2, tab0 AS cor3

query I rowsort
SELECT + cor0.col2 FROM tab0, tab0, tab0 AS cor0, tab0 AS cor1

query I rowsort
SELECT + col2 * - tab1.col0 / col2 AS col0 FROM tab1

query I rowsort
SELECT 10 FROM tab0, tab1, tab0 AS cor0, tab0

query I rowsort
SELECT - cor0.col2 * + col2 / col0 + cor0.col0 FROM tab1 AS cor0

skipif mysql
query I rowsort
SELECT - col0 * + cor1.col2 - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT - - 83 FROM tab2 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2, tab0 AS cor1, tab1 AS cor2

query I rowsort
SELECT - 34 + col0 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1, tab0 AS cor2, tab1 cor3

query I rowsort
SELECT + col1 * + cor1.col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col0 / ( + col2 ) + - col2 * col2 FROM tab2

query I rowsort
SELECT 40 + + col1 AS col2 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - - ( 86 ) FROM tab0 AS cor0 JOIN tab0 cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT + cor0.col2 / col2 AS col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) col1 FROM tab1, tab0, tab1 AS cor0, tab0

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

query I rowsort
SELECT - col2 / + col2 + tab2.col2 / + 90 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT - 85 / col2 + 0 FROM tab2 AS cor0

query IIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2, tab1 cor1 USING ( col2, col0 )

query I rowsort
SELECT - col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT - col1 / + col2 AS col2 FROM tab2

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 AS cor1

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

query I rowsort
SELECT col2 + col2 - - col2 / - tab2.col2 FROM tab2

query I rowsort
SELECT + tab2.col0 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 * + col0 - col0 / - col2 AS col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab0 cor0 INNER JOIN tab2 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab0 cor1 USING ( col0 )

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col1 + col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col2, col2, col0 )

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab1 AS cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab1 cor1

query I rowsort
SELECT DISTINCT - col0 - - col0 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab2, tab0 cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + col2 * - 10 / 22 col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2

skipif mysql
query I rowsort
SELECT + + ( + cor0.col1 ) * col2 - - CAST ( col2 AS INTEGER ) col2 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 cor1

query I rowsort
SELECT ALL - + 54 FROM tab2, tab2, tab2 AS cor0, tab0

query I rowsort
SELECT - - col0 * + col0 + 24 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col2 * + 64 / - col0 col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL col2 / - col2 FROM tab2

query I rowsort
SELECT DISTINCT - tab2.col2 * tab2.col2 / col2 AS col2 FROM tab2

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

query I rowsort
SELECT ALL col0 / + col2 FROM tab2

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1

query I rowsort
SELECT ALL - + col0 + + col1 / - col2 + + cor0.col1 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT - + cor1.col1 AS col1 FROM tab0 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT - tab0.col1 * - col2 / col1 AS col2 FROM tab0

query I rowsort
SELECT + 25 + + cor0.col0 * + col0 / col1 FROM tab1 AS cor0

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

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab2, tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab2, tab0 AS cor1 USING ( col0 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab2, tab0 AS cor1

query I rowsort
SELECT ALL - 38 + ( cor0.col2 ) col1 FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col2, col0, col2, col1 )

query I rowsort
SELECT ALL - - col1 + col1 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab2 AS cor1 USING ( col0 )

query III rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS REAL ) * 25 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0 cor1 USING ( col1 )

skipif mysql
query I rowsort
SELECT + col2 * CAST ( ( col1 ) AS INTEGER ) AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 LEFT OUTER JOIN tab2 USING ( col1, col0, col0, col1, col2, col2, col1 )

query I rowsort
SELECT ALL 80 AS col2 FROM tab0, tab0, tab1 AS cor0

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

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS REAL ) AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab0

skipif mysql
query I rowsort
SELECT ALL + 33 * + col1 / col2 - - CAST ( + col1 * + col2 + col2 AS INTEGER ) FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + 52 - 98 col2 FROM tab1, tab1, tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 JOIN tab1, tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 JOIN tab1, tab2 AS cor1

query I rowsort
SELECT ALL - col2 col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 cor0 LEFT OUTER JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab1 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT ALL col0 / 72 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT ALL - col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 cor1

query I rowsort
SELECT ( + 34 ) AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT 34 * cor0.col0 + col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col1 + - col2 + ( col2 ) AS col1 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - - 8 * col0 + col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 INNER JOIN tab0 USING ( col0, col2, col0 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 JOIN tab1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 NATURAL JOIN tab2, tab2 AS cor1, tab1 cor2

query I rowsort
SELECT ALL + col0 / col2 + col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 * + tab0.col2 / - col1 + col2 * + col0 AS col2 FROM tab0

query I rowsort
SELECT DISTINCT 86 + col1 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1, tab0 cor1, tab0 cor2

query I rowsort
SELECT DISTINCT 64 / - col2 + 91 * + col0 + + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + + col2 * - 47 / + col2 + - col0 FROM tab2 AS cor0

Added proto/random/select/slt_bad_130.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT + 32 * col0 / - col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT + - CAST ( + col1 AS INTEGER ) / - col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col1 * col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 / col2 + col1 FROM tab2

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT col2 AS col1 FROM tab1 AS cor0 JOIN tab1 cor1 USING ( col2 )

query I rowsort
SELECT ALL - cor0.col1 + - col1 * + col1 / + 29 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT cor3.col0 + - ( ( cor3.col1 ) ) AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2 ), tab1 AS cor2, tab2 AS cor3

query I rowsort
SELECT + col1 - + 82 * - col0 / col2 FROM tab2

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 INNER JOIN tab1, tab2 AS cor1

query I rowsort
SELECT - col2 / col2 + - 27 * cor0.col0 * + cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT 61 AS col2 FROM tab0 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col0 * - col1 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT ( + 69 ) AS col2 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT + 70 FROM tab0 AS cor0 JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT + + col0 + + 84 / - cor0.col2 + 2 FROM tab2 cor0

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab0, tab0 AS cor0 JOIN tab2, tab2 AS cor1

query I rowsort
SELECT - - 85 * 75 * cor1.col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col1 * + col1 + col0 * + cor1.col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 NATURAL JOIN tab0, tab0 cor1

query I rowsort
SELECT DISTINCT + col1 * + ( + 49 ) / - col2 AS col1 FROM tab0 cor0

query I rowsort
SELECT 40 + - col1 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col2 * ( col0 ) FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col2, col1 )

query I rowsort
SELECT DISTINCT - col2 + col1 * - ( - col0 ) FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT + + cor0.col0 / + cor0.col2 + col1 * col0 * + col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1, tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab0, tab1 AS cor1

query I rowsort
SELECT DISTINCT - ( 80 ) FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL - ( + col1 ) * - col1 * - col2 + - ( + col2 + + 53 ) AS col0 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT + col1 * + 76 / col0 FROM tab1

query I rowsort
SELECT DISTINCT + 86 / + 94 FROM tab2, tab1 AS cor0 CROSS JOIN tab2

query I rowsort
SELECT cor1.col1 AS col1 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT - col0 / - col2 col2 FROM tab2

query I rowsort
SELECT ALL - col2 / col2 + + 36 - + col0 / - cor0.col0 AS col0 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT DISTINCT 91 * + col1 / + col2 AS col2 FROM tab0

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

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT ( - col1 ) / col2 FROM tab2

query I rowsort
SELECT col0 * - col1 / + col2 FROM tab1

query I rowsort
SELECT - - col1 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

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

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2

query I rowsort
SELECT tab2.col2 FROM tab0 AS cor0 NATURAL JOIN tab2

query IIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col1 )

query I rowsort
SELECT ALL col2 * + col1 / col0 + + tab0.col1 AS col0 FROM tab0

query I rowsort
SELECT + - 35 AS col2 FROM tab1, tab2 AS cor0, tab1, tab0 AS cor1

query I rowsort
SELECT ALL + cor0.col1 * col1 + + col0 * + col0 / col2 + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 / + col2 FROM tab2 AS cor0

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

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

query I rowsort
SELECT - col1 * cor0.col0 FROM tab1 AS cor0 NATURAL JOIN tab1 cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab0, tab2 AS cor1 USING ( col0, col0 )

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 LEFT JOIN tab0 cor1 USING ( col1 ), tab2 AS cor2, tab0 AS cor3

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

query I rowsort
SELECT DISTINCT 95 AS col1 FROM tab1, tab0, tab2 cor0, tab0

query I rowsort
SELECT DISTINCT 49 FROM tab0, tab0 AS cor0 JOIN tab0

skipif mysql
query I rowsort
SELECT - col1 * - CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col0 * - 51 / - 99 + + col2 FROM tab1 AS cor0

query I rowsort
SELECT - col1 / + 41 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ( col1 ) + - col0 / col2 FROM tab2

query I rowsort
SELECT ALL + cor0.col1 * 48 + col2 * col2 * 37 + - col1 / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + col0 * col2 - + 40 / col2 FROM tab2

query I rowsort
SELECT ALL + cor0.col1 * 99 / + cor1.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2

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

query I rowsort
SELECT - col0 / - cor0.col2 FROM tab2 cor0

query I rowsort
SELECT tab2.col1 / + col2 AS col1 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab2, tab0 AS cor1 USING ( col0, col0 )

query I rowsort
SELECT col0 * - tab2.col0 / 67 FROM tab2

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

query I rowsort
SELECT + cor0.col1 col2 FROM tab1 AS cor0 JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT + col0 / col2 + - CAST ( 39 AS INTEGER ) * - cor0.col2 - col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT - 9 + + 4 / - col2 col0 FROM tab2 AS cor0

query IIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2, tab2 AS cor3

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 INNER JOIN tab0, tab1, tab2 AS cor1

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

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

query I rowsort
SELECT ( + 45 ) + col2 * + ( 49 ) / col2 FROM tab1 AS cor0

query I rowsort
SELECT - 93 AS col1 FROM tab2 cor0 JOIN tab0 cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT 7 * col1 - col0 * - cor0.col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - tab2.col1 / - tab2.col2 FROM tab2

query I rowsort
SELECT ALL + 82 + col1 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + + cor0.col0 + + cor0.col2 * + 95 / col0 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT + 22 * 52 FROM tab2, tab1, tab0 AS cor0, tab2

query I rowsort
SELECT + 27 / + col2 + - col1 AS col2 FROM tab2

query IIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 JOIN tab0 USING ( col0, col1 )

query IIIIIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab0 AS cor1 USING ( col2 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT 56 FROM tab1, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1

query I rowsort
SELECT ALL - 3 + col1 / col2 AS col1 FROM tab2

query I rowsort
SELECT 5 AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab0

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

query I rowsort
SELECT DISTINCT - 58 / - cor0.col2 + - col0 FROM tab2 AS cor0

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2, tab2, tab0 AS cor0, tab2

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 JOIN tab2, tab0 AS cor1, tab0 AS cor2

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col0, col2, col1, col2, col0 )

query I rowsort
SELECT DISTINCT + + cor0.col0 / + col2 FROM tab2 AS cor0

Added proto/random/select/slt_bad_131.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIII rowsort
SELECT ALL * FROM tab0 cor0 INNER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT ALL - + col1 FROM tab0 cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 INNER JOIN tab0, tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab2 cor1 USING ( col2 ), tab0 cor2

query I rowsort
SELECT - 76 / + tab2.col2 FROM tab2

query I rowsort
SELECT + ( + 37 ) * col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIII rowsort
SELECT * FROM tab0, tab0 cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col0, col1, col1 )

query I rowsort
SELECT ALL + 28 * - ( col2 ) / + col0 - + ( col1 ) * - 47 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + + col1 + + col0 FROM tab2 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT 58 AS col2 FROM tab0, tab2, tab2 AS cor0, tab2

query I rowsort
SELECT DISTINCT + - 75 * col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + - col1 - col1 * col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 46 col0 FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT ALL - cor1.col1 FROM tab1 cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT col1 * + 47 / + col0 FROM tab0 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3

query I rowsort
SELECT col2 + col0 + col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

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

query I rowsort
SELECT DISTINCT + col1 * + col0 / cor0.col1 FROM tab1 AS cor0

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

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

query I rowsort
SELECT ALL col0 + - col2 + - col1 FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col0 * col2 col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + 0 FROM tab1, tab1, tab0 cor0, tab0

query I rowsort
SELECT ALL - col2 * - col1 + col2 - - 98 * col2 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT + tab0.col0 * - col1 / + ( col0 * col2 ) + + tab0.col0 AS col1 FROM tab0

query I rowsort
SELECT ALL + col2 / + col2 FROM tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab1, tab0 cor1, tab1 AS cor2, tab1 cor3

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2

query IIIIII rowsort
SELECT ALL * FROM tab0 cor0 JOIN tab2

query I rowsort
SELECT + cor0.col1 + + 83 AS col0 FROM tab0, tab1, tab2 AS cor0, tab0

query I rowsort
SELECT ALL + + col1 * col0 * col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col1 / + col2 + + col2 * col1 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 / + tab2.col2 FROM tab2

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab0, tab0, tab0 cor0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 NATURAL JOIN tab0, tab1 AS cor1, tab2, tab2 AS cor2

query IIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0 cor1 USING ( col1 )

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

query I rowsort
SELECT ALL - cor1.col0 * + cor1.col0 FROM tab1, tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2, tab2 AS cor0, tab2, tab1 AS cor1

query I rowsort
SELECT ALL + - col1 / col2 col2 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1, tab1, tab1 cor0

query I rowsort
SELECT ALL + col0 + - ( 8 ) FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + + 10 FROM tab1, tab0, tab2 cor0, tab0

query I rowsort
SELECT ALL + col1 + - 13 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL col2 - col2 / - 38 AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL 3 * - tab0.col0 / - col1 FROM tab0

skipif mysql
query I rowsort
SELECT CAST ( NULL AS REAL ) FROM tab1 AS cor0 INNER JOIN tab0 cor1 USING ( col2 )

query I rowsort
SELECT - col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col0 + col0 / + col2 FROM tab2

query I rowsort
SELECT 5 AS col2 FROM tab1 AS cor0 LEFT JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT tab0.col2 * + 8 / cor0.col0 FROM tab0, tab0 AS cor0

query I rowsort
SELECT + + cor0.col1 FROM tab0, tab0 AS cor0 JOIN tab1 USING ( col2, col0, col0 )

query I rowsort
SELECT + col2 * 57 + + col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 80 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col1 ), tab0 AS cor2, tab0 AS cor3

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab2, tab1 cor1, tab0 AS cor2

query IIII rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col2, col2, col1, col2 )

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1 USING ( col0 )

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT col2 + + col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col2 * - col2 / - col2 - - col0 * - tab2.col0 FROM tab2

query I rowsort
SELECT col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT 70 + col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + cor0.col0 FROM tab2, tab2, tab2 AS cor0, tab0

query I rowsort
SELECT - - cor0.col2 * cor0.col2 - col0 * + col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col1 col2 FROM tab0, tab0, tab2 cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 AS cor1, tab2 cor2

query I rowsort
SELECT col2 + ( 24 ) + + col0 / + tab2.col2 col1 FROM tab2

query I rowsort
SELECT + col0 * col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + 21 * col1 + col0 * - ( + col0 ) / col2 + 3 AS col1 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT + - CAST ( + 27 AS INTEGER ) FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 81 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - ( col2 ) * col0 AS col0 FROM tab1 cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT ALL + + 82 AS col2 FROM tab0 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col0, col2, col2 )

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

query I rowsort
SELECT ALL - col1 * + 40 + col2 * - col1 / + col0 FROM tab0 cor0

query I rowsort
SELECT DISTINCT tab2.col2 / col2 FROM tab2

query I rowsort
SELECT + col1 * - col2 + col2 FROM tab2 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT 63 AS col1 FROM tab1, tab1 AS cor0, tab1, tab0 AS cor1

skipif mysql
query I rowsort
SELECT - cor1.col1 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 INNER JOIN tab2 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT DISTINCT + + col2 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - col1 FROM tab0 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col2 + - col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT + + 65 + 46 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT tab0.col2 * + col0 / col2 FROM tab0

query I rowsort
SELECT ( col0 ) - - tab2.col1 * - col1 / - col0 FROM tab2

skipif mysql
query I rowsort
SELECT ALL + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 JOIN tab0, tab2 AS cor1 USING ( col2, col1, col1, col2, col0, col1, col1, col1 )

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT 28 + - col1 * - ( + 99 ) / + col2 AS col0 FROM tab0

skipif mysql
query I rowsort
SELECT ALL 13 + col2 - CAST ( col1 + col2 AS INTEGER ) / + ( col2 ) AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + + 65 AS col2 FROM tab1 AS cor0 NATURAL LEFT JOIN tab0 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2, tab0 AS cor3

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

query I rowsort
SELECT + - cor0.col0 / + ( - cor0.col2 ) + + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL 94 col0 FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col2, col1, col2, col0, col0 )

Added proto/random/select/slt_bad_132.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2 cor0 NATURAL LEFT JOIN tab0, tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT JOIN tab2 AS cor1 USING ( col0 ), tab2 cor2

query I rowsort
SELECT - - col0 * col2 + - ( + col1 ) * + col2 / + 24 + col0 col1 FROM tab1 AS cor0

query I rowsort
SELECT col2 + col2 / - col2 + + col0 col1 FROM tab2

query I rowsort
SELECT - + 40 - - col2 * + cor0.col2 / - ( - col1 ) FROM tab0 AS cor0

query I rowsort
SELECT ALL 12 AS col0 FROM tab1 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL - - col0 + + col2 * 28 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

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

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

query I rowsort
SELECT DISTINCT 43 * - col0 / + col1 FROM tab0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab2 AS cor2

query IIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col1, col2, col1, col1, col2, col1 )

query I rowsort
SELECT + col2 / ( + col2 ) FROM tab2

query I rowsort
SELECT ALL - + 1 FROM tab2, tab1, tab2 AS cor0, tab2

query I rowsort
SELECT 40 * 37 + col0 * - 68 - col0 / col2 FROM tab2

query I rowsort
SELECT ALL + + ( - col0 ) + col0 * - 75 / + col0 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT + 31 AS col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query IIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab2 AS cor1 USING ( col2 )

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

query IIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0, tab2 cor1 USING ( col1, col0, col0, col0, col1 )

query I rowsort
SELECT DISTINCT col2 / ( cor0.col2 ) + col0 AS col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT + CAST ( + ( + col0 / + col0 / - col2 / col2 ) AS INTEGER ) * - col1 / col0 col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col0 + col0 AS col2 FROM tab1 cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL - col2 / + cor0.col2 + + col1 / - col2 col0 FROM tab2 AS cor0

query I rowsort
SELECT + col1 / cor0.col2 + - col0 FROM tab2 cor0

query I rowsort
SELECT ALL col0 col2 FROM tab2 AS cor0 NATURAL JOIN tab2

query I rowsort
SELECT ALL col0 / - col2 + col1 * col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col1 FROM tab2 cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT col2 * + tab0.col1 / - 82 FROM tab0

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT + 43 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - + ( - col0 ) * + cor0.col0 - col2 * + col0 / - col2 AS col0 FROM tab0 AS cor0

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

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

query I rowsort
SELECT ALL col0 / - tab2.col2 AS col1 FROM tab2

query I rowsort
SELECT + - 67 / + col2 + 7 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL cor1.col1 * + 61 - col1 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT + col2 * col2 + - col1 FROM tab1 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT - + col2 + - col1 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT + col0 / col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + col0 * + ( + col0 ) / col1 FROM tab1 AS cor0

query I rowsort
SELECT ALL - cor0.col2 / col2 + col0 * 68 + - col0 FROM tab2 cor0

query I rowsort
SELECT ALL + cor1.col1 * - col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - - col0 / col2 - - 54 AS col1 FROM tab2 AS cor0

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col0, col2, col1 )

query I rowsort
SELECT - + col1 FROM tab0 cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT ALL cor1.col1 AS col0 FROM tab0 AS cor0 INNER JOIN tab1, tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col0 )

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab1 AS cor1 USING ( col2, col2 )

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT JOIN tab2

query I rowsort
SELECT - col1 + - col0 + tab2.col2 / - col2 col2 FROM tab2

query I rowsort
SELECT DISTINCT + cor0.col1 / col2 + + col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT 76 + 66 FROM tab0, tab0, tab2 AS cor0, tab2

query I rowsort
SELECT + 25 * - col1 + col0 * + 20 / col0 AS col0 FROM tab1

query I rowsort
SELECT - 22 AS col1 FROM tab0 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT col0 * + col1 + - 69 - col2 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col1 + ( + col2 ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0 NATURAL JOIN tab0, tab1 AS cor1

query I rowsort
SELECT - col0 * - col1 / - col0 col1 FROM tab2 AS cor0

query I rowsort
SELECT 48 / + col2 + 19 + col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 * 56 / col2 - + col2 FROM tab2

query I rowsort
SELECT + 34 AS col1 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + - cor0.col1 * - 19 FROM tab1, tab0, tab2 AS cor0, tab1

query I rowsort
SELECT 79 + col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 47 AS col0 FROM tab2 AS cor0 INNER JOIN tab1 cor1

query I rowsort
SELECT - col2 / + col2 + col1 * + col1 + col0 AS col0 FROM tab2

query I rowsort
SELECT ALL - cor0.col0 + cor0.col2 / + col2 FROM tab2 cor0

query I rowsort
SELECT + col2 + - col2 / - col2 AS col0 FROM tab2

query I rowsort
SELECT + col2 AS col2 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + - 24 FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col1, col1, col0, col2, col0, col0, col0, col1, col2, col0, col2, col2, col1 )

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

query I rowsort
SELECT ALL - col0 + 31 / col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL - col0 * 9 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

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

skipif mysql
query I rowsort
SELECT DISTINCT col0 + + col0 / + CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT + col0 * - 24 + col2 * - CAST ( 76 AS INTEGER ) + - col1 / ( cor0.col2 ) FROM tab2 AS cor0

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab1 AS cor1 USING ( col0, col1, col2, col0, col2, col0 )

query I rowsort
SELECT ALL + + 6 * 34 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col2, col2, col0, col0, col0 )

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

query I rowsort
SELECT - - 93 / col2 FROM tab2 cor0

query I rowsort
SELECT ALL 92 / + col2 + - col2 * tab2.col0 * + col0 AS col0 FROM tab2

query IIIIII rowsort
SELECT * FROM tab1 cor0 INNER JOIN tab1, tab1 AS cor1 USING ( col1, col2, col2, col0 )

query I rowsort
SELECT - 78 FROM tab2, tab2, tab1 cor0

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

query I rowsort
SELECT + col2 * + col2 / 6 + - col1 FROM tab0 AS cor0

query I rowsort
SELECT + 64 AS col1 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT 25 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT ALL + - col1 + - col1 * col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT DISTINCT - 76 / col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT ( col1 ) col0 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab1 cor1, tab2 cor2, tab0 AS cor3

skipif mysql
query I rowsort
SELECT DISTINCT + col1 * - ( + col1 ) / + CAST ( + col2 AS REAL ) AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT col0 * col0 / tab2.col2 col0 FROM tab2

query I rowsort
SELECT - col2 * - col0 + col2 * + tab2.col2 + - tab2.col2 * + col2 / + col0 AS col1 FROM tab2

query III rowsort
SELECT ALL * FROM tab0 cor0 NATURAL JOIN tab2

query III rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL JOIN tab1

query I rowsort
SELECT ALL - cor0.col1 + col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab1

query I rowsort
SELECT cor1.col0 FROM tab0, tab0, tab2 AS cor0, tab2 cor1

query I rowsort
SELECT 5 + + tab1.col1 AS col1 FROM tab2, tab2, tab0 AS cor0, tab1

Added proto/random/select/slt_bad_133.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT DISTINCT - col1 + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 * + 65 / ( + tab1.col1 ) AS col0 FROM tab1

query I rowsort
SELECT + - col2 + - col2 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab1, tab1 AS cor1, tab0, tab0 AS cor2

query I rowsort
SELECT ALL 43 * col1 AS col1 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT tab0.col0 FROM tab2, tab2 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT ALL + col0 * + 18 + + cor1.col0 * col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + - tab0.col2 + 58 FROM tab2, tab2, tab2 cor0, tab0

query I rowsort
SELECT DISTINCT - col2 - - col0 / 0 FROM tab0

skipif mysql
query I rowsort
SELECT ALL - CAST ( - 12 AS INTEGER ) / - cor0.col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT + - cor0.col0 AS col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1

query I rowsort
SELECT ALL + tab0.col2 FROM tab1, tab1, tab2 cor0, tab0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL LEFT JOIN tab2, tab1 AS cor1, tab0, tab1 AS cor2

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 INNER JOIN tab1 USING ( col2 )

query I rowsort
SELECT + col2 * + col2 / col1 + + col1 * - col0 AS col2 FROM tab0 cor0

query I rowsort
SELECT - col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + cor1.col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1, col2, col0 )

query I rowsort
SELECT ALL - - col1 * + col1 + - 6 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0 JOIN tab1 USING ( col1 )

query I rowsort
SELECT - 46 / + cor0.col2 AS col2 FROM tab2, tab2 AS cor0

query I rowsort
SELECT 83 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT ALL + col1 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col2 + col2 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 3 / - col2 + col1 * col0 - cor0.col1 FROM tab2 AS cor0

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 INNER JOIN tab2, tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL - - col2 + - col2 / + col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col1 * - col0 / + 95 col2 FROM tab0 AS cor0

query I rowsort
SELECT col1 / + col0 + col2 / + col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT DISTINCT - + ( col0 ) * - col2 + ( - col2 ) * + col0 - + col2 / - 62 AS col2 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 cor1

query I rowsort
SELECT 94 + 2 + - col1 AS col0 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT cor0.col1 * + col2 / col1 col2 FROM tab1 AS cor0

query III rowsort
SELECT * FROM tab0 cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT + 20 FROM tab0, tab2 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT ALL - col2 / - col2 + + 18 * - 21 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab1, tab1 cor1 USING ( col1, col1 )

query I rowsort
SELECT - col0 + col0 * + col2 / + 85 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT 61 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + ( 24 ) AS col2 FROM tab2 AS cor0 INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT - col1 / cor0.col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - + col0 * - col1 / col2 FROM tab0 AS cor0

query I rowsort
SELECT 50 - - 43 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT + col2 AS col2 FROM tab0 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL 74 / col2 AS col0 FROM tab2

query I rowsort
SELECT - 77 * col0 + + cor0.col2 / col2 FROM tab2 cor0

query I rowsort
SELECT - tab2.col1 * col2 + col1 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT tab2.col1 + + col0 / + col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 * + col1 FROM tab1 cor0 NATURAL JOIN tab1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0 JOIN tab2 USING ( col1 )

query I rowsort
SELECT + cor0.col1 FROM tab0, tab2, tab2 AS cor0, tab0

query I rowsort
SELECT ALL - ( + cor0.col0 ) * - col0 / 95 AS col2 FROM tab0 cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 NATURAL JOIN tab1, tab0 AS cor1, tab1 AS cor2

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

query IIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col1, col2, col2, col2 )

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

query IIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL + + col1 AS col2 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT - cor0.col2 col2 FROM tab2, tab2, tab0 AS cor0, tab0

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT DISTINCT + 33 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - ( + cor0.col1 ) + - cor0.col1 * + 87 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT DISTINCT + col2 + - col0 / col2 AS col2 FROM tab2

query I rowsort
SELECT + + col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + ( col0 ) FROM tab0 AS cor0 JOIN tab2 cor1 USING ( col0 )

query I rowsort
SELECT + cor0.col1 FROM tab0 cor0 JOIN tab1 AS cor1

query I rowsort
SELECT + cor0.col1 + + 0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col1 / + col2 FROM tab2 cor0

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

query I rowsort
SELECT - + col2 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT ALL - - cor0.col2 FROM tab0, tab0, tab1 AS cor0

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

query I rowsort
SELECT - 75 + cor0.col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - 58 * col1 + - col2 + + ( - cor1.col1 + col0 ) AS col2 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1 USING ( col2 )

query I rowsort
SELECT DISTINCT col1 * - col1 / col0 + - col1 * col0 FROM tab0

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

skipif mysql
query I rowsort
SELECT CAST ( - 11 AS INTEGER ) * - col1 + + 56 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - 33 col2 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT DISTINCT - col1 * + cor0.col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + col0 * + col0 AS col1 FROM tab2 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + - 52 - - cor0.col1 * col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT col2 * + col1 / - 89 FROM tab1

query I rowsort
SELECT ALL - col0 * col2 / col2 + + col0 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT col2 / tab2.col2 + - col2 * col1 AS col2 FROM tab2

query I rowsort
SELECT ALL - col2 + 77 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

skipif mysql
query I rowsort
SELECT ALL + CAST ( NULL AS INTEGER ) * 1 AS col0 FROM tab1, tab1, tab2 cor0

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

query I rowsort
SELECT - col1 * col0 / + col2 AS col2 FROM tab2 cor0

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

query I rowsort
SELECT + 49 FROM tab2 cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ALL col0 + - col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT ALL - col0 * + CAST ( + col0 AS INTEGER ) * + col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - + col2 - + col2 * col0 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

Added proto/random/select/slt_bad_134.proto.





















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL + col0 + col1 * - col0 / ( col1 ) + tab1.col2 AS col2 FROM tab1

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

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab2, tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT + + col0 / - CAST ( - ( col2 ) AS INTEGER ) AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + 78 FROM tab0, tab0, tab0 AS cor0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 NATURAL INNER JOIN tab0, tab2 AS cor1, tab2 AS cor2, tab1 AS cor3

query I rowsort
SELECT + col2 + 84 FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT + 63 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT ALL - 17 FROM tab1, tab1, tab0 cor0, tab0 AS cor1

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab1, tab2 AS cor0, tab1

query I rowsort
SELECT DISTINCT col1 / col2 + + col2 + col2 col2 FROM tab2

query I rowsort
SELECT - col2 * + col0 / - col1 FROM tab0

query I rowsort
SELECT 77 FROM tab2, tab2, tab2 cor0, tab0

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col2 ), tab0 cor2, tab2 AS cor3

skipif mysql
query I rowsort
SELECT + - CAST ( NULL AS REAL ) FROM tab0 AS cor0 JOIN tab1 cor1

query I rowsort
SELECT ALL - + 5 / + col2 + col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL + col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab2, tab2 AS cor1

query I rowsort
SELECT DISTINCT - col2 * 77 + col0 * - col0 / + 19 + + col1 FROM tab1 AS cor0

query I rowsort
SELECT - col2 * - cor0.col0 / - col1 FROM tab1 AS cor0

query I rowsort
SELECT col1 * col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT 7 FROM tab2, tab2, tab1 AS cor0

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab2 cor1, tab1 cor2

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

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col2 )

query III rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab1, tab1 cor1 USING ( col2, col2, col1, col0, col2, col2, col2, col0, col2, col0, col2, col0, col2 )

query I rowsort
SELECT DISTINCT cor0.col0 + col2 col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT col1 + CAST ( NULL AS INTEGER ) * + col1 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 36 * tab0.col2 AS col2 FROM tab0, tab2, tab2 AS cor0, tab2

query I rowsort
SELECT 98 * col2 / + col2 FROM tab2 AS cor0

query IIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT OUTER JOIN tab2 cor1 USING ( col0 )

query I rowsort
SELECT + + col2 + + col0 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT col1 + col1 / + col2 FROM tab2

query I rowsort
SELECT ALL - col2 * + col0 / - col2 AS col0 FROM tab1 AS cor0

query I rowsort
SELECT col0 + col1 * - col2 / + col1 + - col0 FROM tab0 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab2

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 INNER JOIN tab1 USING ( col1, col0, col1, col2, col0 )

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0

query I rowsort
SELECT + + 63 * + col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

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

query I rowsort
SELECT - 83 AS col2 FROM tab0 AS cor0 JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0 JOIN tab0 AS cor1

query I rowsort
SELECT + ( col2 ) / - col2 FROM tab2

query I rowsort
SELECT ALL - 58 AS col0 FROM tab1, tab2, tab2 AS cor0, tab2

query I rowsort
SELECT DISTINCT + cor1.col2 AS col2 FROM tab1, tab2 AS cor0, tab1, tab0 cor1

query I rowsort
SELECT DISTINCT col2 / col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT ALL + col0 * cor1.col1 * - col1 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 cor1

query I rowsort
SELECT - 91 * - cor0.col2 + 32 * - cor0.col0 / col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL col1 / + col2 + + col1 FROM tab2

query I rowsort
SELECT - 67 / col2 col0 FROM tab2 AS cor0

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 JOIN tab2, tab1 AS cor1

query I rowsort
SELECT - col2 + - col0 AS col2 FROM tab0 cor0 NATURAL JOIN tab2 cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT OUTER JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT + cor1.col2 + + col0 * - col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL + col2 + 26 * - col1 / col0 FROM tab2 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL JOIN tab1

query I rowsort
SELECT DISTINCT + + 58 - 93 * col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2, tab1 AS cor3

query I rowsort
SELECT DISTINCT + cor0.col1 * + 11 / col0 + + col0 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT + col2 / + col2 + col1 * 3 / col0 AS col0 FROM tab2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2, tab0 AS cor1, tab2 AS cor2, tab0 AS cor3

query I rowsort
SELECT ALL - col1 + col1 - col1 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

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

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

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 JOIN tab0, tab0 AS cor1, tab1 AS cor2

query IIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab1, tab1 cor1 USING ( col2, col1 )

query I rowsort
SELECT + ( + 72 ) FROM tab0 AS cor0 JOIN tab0, tab2 AS cor1, tab1 AS cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab1 AS cor1, tab1 AS cor2

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

query I rowsort
SELECT col2 + + col0 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ( 60 ) * + cor0.col1 / - ( 30 * - col1 ) col1 FROM tab0 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT + + 10 / + col2 + - col2 - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT JOIN tab1, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT 92 FROM tab1, tab1, tab1 AS cor0

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2, tab0, tab0 AS cor3

query I rowsort
SELECT DISTINCT + 91 FROM tab2 cor0 JOIN tab2 cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS REAL ) * + cor0.col0 AS col2 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2, tab2 AS cor3

query I rowsort
SELECT ALL col2 * - col2 + - col2 / col2 AS col0 FROM tab2

query I rowsort
SELECT ALL + + 77 + col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab1 cor1 USING ( col0 ), tab2 AS cor2

query I rowsort
SELECT ALL + + 82 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL JOIN tab2, tab2 AS cor1, tab0, tab2 AS cor2

skipif mysql
query I rowsort
SELECT - - CAST ( NULL AS INTEGER ) col1 FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + 30 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + 59 / col2 + - cor0.col0 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL col1 - - col0 / - tab2.col2 FROM tab2

skipif mysql
query I rowsort
SELECT ALL + CAST ( NULL AS INTEGER ) * 13 AS col1 FROM tab0, tab0, tab1 AS cor0

query IIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0 NATURAL LEFT JOIN tab2, tab2 AS cor1 USING ( col2, col0, col0 )

query I rowsort
SELECT DISTINCT + col2 * col2 / col2 + - 37 + cor0.col1 FROM tab2 cor0

query I rowsort
SELECT + cor0.col2 FROM tab0, tab0, tab2 AS cor0

Added proto/random/select/slt_bad_135.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL + - 39 + + cor0.col1 AS col0 FROM tab1, tab1, tab1 AS cor0

query III rowsort
SELECT * FROM tab0 cor0 NATURAL INNER JOIN tab0, tab0 cor1 USING ( col1, col0, col2, col2, col2, col0, col2, col1, col2, col1, col2, col0, col0 )

query I rowsort
SELECT + cor1.col1 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + - col2 col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT cor1.col2 + - col1 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + + 70 * col2 + ( ( + col0 ) + - ( col0 ) ) / - col2 col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) + + col1 / col2 FROM tab2

query IIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab0 AS cor1 USING ( col1 ), tab2 AS cor2, tab2 AS cor3

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

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 LEFT JOIN tab2, tab1 cor1 USING ( col1, col1, col0, col2, col1, col2, col0, col0, col0, col1, col1, col2, col1 )

query I rowsort
SELECT DISTINCT + col2 * - 80 / col2 FROM tab0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 JOIN tab1 USING ( col2 )

query I rowsort
SELECT ALL 49 + col2 * - cor0.col0 / - col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 2 + col0 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col1 * cor0.col2 + - cor1.col2 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + 29 FROM tab2, tab0 AS cor0, tab2, tab0 AS cor1

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

query I rowsort
SELECT DISTINCT - 62 * 95 + - cor0.col1 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + 81 / ( col2 ) AS col0 FROM tab2 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab2, tab0, tab0 AS cor1

query I rowsort
SELECT ALL + col0 * + col2 / col1 AS col2 FROM tab2

query IIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 INNER JOIN tab1 USING ( col2, col1, col0 )

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

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT OUTER JOIN tab0, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL 58 AS col2 FROM tab2, tab2, tab0 cor0

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab2 cor0, tab2, tab0 cor1

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

query I rowsort
SELECT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 cor1, tab2, tab0 AS cor2

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab1, tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0, tab2 cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab0 AS cor1, tab1 AS cor2

query I rowsort
SELECT ALL - cor1.col2 col0 FROM tab1, tab0 AS cor0, tab1, tab2 AS cor1

query I rowsort
SELECT ALL cor2.col1 col0 FROM tab0 cor0 JOIN tab1 AS cor1 USING ( col2 ), tab1 cor2

query I rowsort
SELECT 66 FROM tab2 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT + - cor0.col1 + - 19 AS col0 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT - col2 / tab2.col2 AS col1 FROM tab2

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col0, col1, col2, col2 )

query I rowsort
SELECT - col1 + - col2 + col2 / - col2 AS col2 FROM tab2

query I rowsort
SELECT tab2.col0 / col2 + + col0 FROM tab2

query I rowsort
SELECT DISTINCT - 26 col1 FROM tab0, tab0, tab0 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT DISTINCT col1 * - col0 / - col1 FROM tab0

query I rowsort
SELECT DISTINCT col1 / - col2 - col0 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col1 * + col1 / ( 94 ) FROM tab2 AS cor0

query I rowsort
SELECT + col2 / - col2 AS col2 FROM tab2

query I rowsort
SELECT 10 FROM tab0, tab0, tab2 AS cor0, tab2

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

skipif mysql
query I rowsort
SELECT ALL + CAST ( tab2.col2 AS INTEGER ) / col2 AS col0 FROM tab2

skipif mysql
query I rowsort
SELECT + tab1.col0 * + col2 / 75 - col2 * - CAST ( + col0 AS INTEGER ) AS col0 FROM tab1

query I rowsort
SELECT ALL + 9 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT ALL col2 * + col0 + + ( col0 ) / + tab2.col2 FROM tab2

query I rowsort
SELECT ALL + + 17 * - col0 / - col2 - + ( col0 * + cor0.col0 ) AS col2 FROM tab0 AS cor0

query I rowsort
SELECT ALL - cor0.col2 col2 FROM tab1, tab1, tab2 cor0

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) col1 FROM tab2, tab2, tab0 AS cor0, tab1

query I rowsort
SELECT + 23 - + cor0.col1 FROM tab2 AS cor0 JOIN tab1 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab0 cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT DISTINCT - 40 * 4 + col2 AS col2 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT + 15 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT + col0 / ( col2 ) AS col0 FROM tab2

query IIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab0 AS cor1 USING ( col2 ), tab2 cor2, tab0, tab2 AS cor3

query I rowsort
SELECT ALL - col1 * col0 + - col0 * col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col2 / - col0 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT - + cor0.col0 + - cor0.col1 * - 73 / 83 FROM tab2 AS cor0

query I rowsort
SELECT + + col1 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT col2 * col0 + + cor1.col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 33 * - cor0.col2 / - cor0.col1 + - 17 AS col0 FROM tab0 AS cor0

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

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT + ( 88 ) AS col0 FROM tab2, tab1 AS cor0 CROSS JOIN tab2

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab1, tab0 cor1, tab1 AS cor2

query I rowsort
SELECT col2 / + col2 + cor0.col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 * - col1 + col1 * + col1 / + col0 col0 FROM tab0

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT 47 * 39 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab2 AS cor2, tab0, tab1 AS cor3

query IIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col0, col0, col1 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab2 AS cor1, tab2 cor2

query I rowsort
SELECT + cor0.col1 * col2 * - 41 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col1 )

query IIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab0, tab1 AS cor1 USING ( col0, col0, col2 )

query I rowsort
SELECT ALL + 69 AS col0 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT ALL - + col2 * + 59 / + cor0.col0 + 98 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT + col1 * - col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 39 AS col1 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT 12 - cor0.col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT + cor0.col2 / + 74 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0, tab0 AS cor2

query I rowsort
SELECT DISTINCT - col2 / ( col2 ) + - col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col1 * col0 AS col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT - + col2 * + col2 / - col1 FROM tab0 cor0

query I rowsort
SELECT + col2 + + col2 / + col2 FROM tab2 cor0

query IIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1

query I rowsort
SELECT ALL - col0 / - cor0.col2 + cor0.col0 * + cor0.col0 AS col0 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL - col2 * - 48 / + 84 FROM tab1 AS cor0

query I rowsort
SELECT 72 / - col2 AS col2 FROM tab2 AS cor0

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

Added proto/random/select/slt_bad_136.proto.









































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1 cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT - col0 / - 0 FROM tab2 AS cor0

query I rowsort
SELECT - + 42 + + 58 AS col2 FROM tab2 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT 95 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT - col0 + + col2 * + col1 / col0 AS col1 FROM tab1

query I rowsort
SELECT - col2 * + col1 / + col2 + 45 col1 FROM tab2 AS cor0

query I rowsort
SELECT - - 67 AS col0 FROM tab1, tab1, tab2 cor0

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT - col1 / col2 + - col1 / ( col0 ) FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - - 23 AS col2 FROM tab0 cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + + cor0.col0 + 71 AS col0 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT ALL + 3 * - cor0.col1 * + cor0.col2 col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + 95 + 52 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT col1 * + col2 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + col1 + - col2 * - cor0.col0 / + col2 AS col0 FROM tab1 cor0

query I rowsort
SELECT + ( - col0 ) * + col1 / + 94 AS col0 FROM tab0

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT cor0.col1 * + col2 / col0 - col1 AS col1 FROM tab1 cor0

query I rowsort
SELECT + 62 / + col2 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0

query I rowsort
SELECT ALL + col2 + - cor0.col0 * col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0

query IIIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab0

query IIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 JOIN tab0 USING ( col1 )

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col2 ), tab1 AS cor2

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + 20 col0 FROM tab2 AS cor0 JOIN tab0 AS cor1

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

query I rowsort
SELECT DISTINCT - col2 * - col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT 40 - col0 / ( col2 ) AS col1 FROM tab2 AS cor0

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

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0, tab2 AS cor1

query I rowsort
SELECT DISTINCT - 36 * + 6 / col1 - + col2 FROM tab2 cor0

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT + cor1.col2 + cor1.col0 * cor0.col1 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT col1 * col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT col2 * col1 + 25 + + 34 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT 33 * + ( col1 ) - col0 * col0 / col2 FROM tab2

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

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab2, tab2, tab2 cor0

query I rowsort
SELECT + 95 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 51 / - tab2.col2 + col2 * - ( - 41 ) col2 FROM tab2

query I rowsort
SELECT ALL - - col1 * 54 + col0 * - col2 / 78 AS col0 FROM tab2 AS cor0

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

query I rowsort
SELECT DISTINCT 35 * + col0 / + col1 + + col1 FROM tab1 AS cor0

query I rowsort
SELECT + + col0 + - cor0.col1 col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL tab2.col0 * + col0 / col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT 47 FROM tab2, tab2, tab0 AS cor0

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

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL JOIN tab0, tab0 cor1

query I rowsort
SELECT + cor0.col1 FROM tab2 cor0 JOIN tab1, tab0 AS cor1 USING ( col2 )

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 JOIN tab2 USING ( col2 )

query I rowsort
SELECT ALL 76 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - col1 * + col1 + - col0 / + cor0.col2 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL + 41 - cor0.col1 FROM tab1, tab2 AS cor0 INNER JOIN tab1

query I rowsort
SELECT 23 AS col2 FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT - col0 + - col0 * ( col1 ) FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 cor0 NATURAL JOIN tab1, tab1 AS cor1

query I rowsort
SELECT tab0.col2 FROM tab2, tab2, tab0 AS cor0, tab0

query I rowsort
SELECT ALL - col2 + col2 * + col2 / col1 FROM tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1, tab2 AS cor2

query I rowsort
SELECT ALL - cor1.col1 AS col0 FROM tab2 AS cor0 INNER JOIN tab1, tab2 cor1

query I rowsort
SELECT - cor0.col0 * + col0 + - 6 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL ( col0 ) * col2 * 75 AS col0 FROM tab1 cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT ( - 98 ) * col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT col2 * col0 + - col1 * - col2 / + col1 FROM tab0

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + col1 + - 65 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col0 + + ( + col0 * + col1 ) FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT 29 AS col0 FROM tab1, tab1, tab2 AS cor0, tab0 AS cor1

query I rowsort
SELECT DISTINCT col2 * 5 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 66 * 51 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - + col2 + + 7 / + col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab0, tab1 AS cor1 USING ( col2 )

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab1, tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab2 cor0 LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + col2 * col2 + + cor0.col0 / + ( col2 ) FROM tab2 AS cor0

query I rowsort
SELECT - col2 * - col0 * cor1.col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab1, tab2 AS cor0, tab1

skipif mysql
query I rowsort
SELECT CAST ( - col1 AS INTEGER ) / + col2 - + CAST ( col2 AS INTEGER ) * col1 FROM tab2 AS cor0

query I rowsort
SELECT - col2 * + col2 / + 88 AS col2 FROM tab1 AS cor0

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab2 AS cor1

query IIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL INNER JOIN tab1, tab1 AS cor1 USING ( col2, col2, col0 )

query I rowsort
SELECT + + col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 cor1

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col0, col1, col1, col2, col2 )

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + + col0 / + col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL + col0 / col2 FROM tab2

query I rowsort
SELECT - 94 FROM tab0, tab1, tab2 AS cor0, tab0

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab0 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT 62 FROM tab0, tab1 AS cor0, tab0, tab2 AS cor1

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 ON NOT NULL <= NULL

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab1, tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab1 AS cor1

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 JOIN tab2 cor1 USING ( col2 ), tab0 AS cor2

Added proto/random/select/slt_bad_137.proto.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col1 ), tab2 AS cor2, tab0, tab0 cor3

query I rowsort
SELECT + ( col2 ) * cor1.col0 - col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL - - col0 * + col0 / + ( - 81 ) + + col2 FROM tab1 cor0

query I rowsort
SELECT ALL 63 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT - col1 * - col0 / col2 + col1 FROM tab1 AS cor0

query I rowsort
SELECT 71 AS col1 FROM tab1, tab0 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT DISTINCT - 84 * + col1 + col0 - - col2 / - col2 FROM tab2 cor0

query I rowsort
SELECT + 32 * col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT cor0.col2 * col2 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT - + col0 * cor0.col0 / col0 + + col0 + - cor0.col1 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT - ( - cor0.col1 ) col0 FROM tab2, tab2, tab2 cor0

query I rowsort
SELECT cor0.col1 + + 81 AS col1 FROM tab2, tab1 AS cor0, tab2, tab2 AS cor1

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

query I rowsort
SELECT DISTINCT + col2 * col1 / col2 FROM tab2

query I rowsort
SELECT + col0 * - cor1.col2 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( 88 AS INTEGER ) FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col0 FROM tab2 cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 cor0 INNER JOIN tab0 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT ( cor2.col1 ) FROM tab0, tab2 AS cor0, tab2 AS cor1, tab0, tab2 AS cor2

query I rowsort
SELECT col1 / col2 + col0 * - col1 AS col0 FROM tab2

query I rowsort
SELECT col0 * + col2 / col0 col0 FROM tab1 AS cor0

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2, tab0 AS cor3

query I rowsort
SELECT + - col1 + col2 * - col1 / - 2 FROM tab0 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 INNER JOIN tab2

query I rowsort
SELECT + 2 + - col0 * cor0.col0 * 60 + col2 / - col0 AS col1 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + - 57 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT + cor1.col2 * - col2 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + + col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab1, tab0 cor1, tab0 AS cor2

query I rowsort
SELECT ALL + - 65 / 87 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + + ( + 26 ) * - col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col1 * col2 / col1 + - col2 / - col2 FROM tab2

query I rowsort
SELECT + - cor0.col2 * col0 / - col2 AS col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT ALL - col2 * + CAST ( - col2 AS INTEGER ) + + col2 FROM tab0 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT ALL col2 * + col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + col2 + + col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + 8 * + cor0.col2 FROM tab2 AS cor0 JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab0, tab0 cor1

query I rowsort
SELECT + col2 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT col0 * + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 INNER JOIN tab0, tab1 AS cor1

query I rowsort
SELECT 1 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT + col1 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col2 )

query I rowsort
SELECT col2 * - col2 / - col2 FROM tab2

query I rowsort
SELECT tab2.col1 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT - - col2 * 44 - - 11 * - col2 / + 87 FROM tab2 AS cor0

query I rowsort
SELECT + - 94 + col1 / - col2 AS col1 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 LEFT JOIN tab0, tab1 cor1

query III rowsort
SELECT ALL * FROM tab1 cor0 NATURAL LEFT OUTER JOIN tab2, tab0 AS cor1 USING ( col0, col1, col1, col0, col2, col1 )

skipif mysql
query I rowsort
SELECT ALL + + CAST ( col1 AS REAL ) * + col1 / col2 col1 FROM tab0 AS cor0

query I rowsort
SELECT + col2 * + 75 / col2 FROM tab0 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT OUTER JOIN tab0, tab1 AS cor1, tab2 AS cor2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT JOIN tab2, tab0 AS cor1, tab0, tab0 AS cor2

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col2 )

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT 84 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 )

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT JOIN tab2, tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 LEFT JOIN tab0 AS cor1

query I rowsort
SELECT + - 31 * - col1 / + cor0.col0 + col1 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT - + col2 * ( col0 ) - + col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + - col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + col1 - + col0 / col2 AS col1 FROM tab2

skipif mysql
query I rowsort
SELECT DISTINCT + col1 + + CAST ( NULL AS INTEGER ) + col1 * col1 / - col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 INNER JOIN tab1 USING ( col2 )

query I rowsort
SELECT ALL + - col0 * + cor0.col0 - - 92 FROM tab2 cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT + col2 + CAST ( NULL AS INTEGER ) / - col1 + - cor0.col1 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT 56 / + ( + col2 ) + + ( 10 ) AS col0 FROM tab2

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 JOIN tab1, tab1 AS cor1

query I rowsort
SELECT ALL + 63 AS col0 FROM tab0, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1

query I rowsort
SELECT ALL + col0 * - col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col2 / col2 AS col1 FROM tab2

query IIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col2, col1 )

query I rowsort
SELECT + col0 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - - cor0.col0 + - cor0.col1 * 61 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 19 AS col0 FROM tab0, tab2, tab1 AS cor0, tab2

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1, tab2 cor1

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

query I rowsort
SELECT ALL + cor1.col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL 79 col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT DISTINCT - + col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - tab2.col0 AS col2 FROM tab1, tab1, tab1 cor0, tab2

query IIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 NATURAL JOIN tab2, tab2 AS cor1

query I rowsort
SELECT - col0 + col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT ALL + cor1.col2 AS col1 FROM tab0 AS cor0 JOIN tab0, tab2 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 cor1, tab1 AS cor2

query I rowsort
SELECT ALL 93 + col2 / + col2 FROM tab2 cor0

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

query I rowsort
SELECT 37 col0 FROM tab1, tab1, tab0 AS cor0, tab0 AS cor1

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0 JOIN tab1 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT col0 / + col1 - - col1 / ( - 82 * col0 ) AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT DISTINCT col0 * + col0 / + col2 AS col0 FROM tab1

query I rowsort
SELECT DISTINCT tab2.col1 * - col2 / + col0 FROM tab2

query I rowsort
SELECT - col1 / col2 AS col1 FROM tab2

query I rowsort
SELECT - + 92 + + cor0.col2 AS col2 FROM tab2 cor0 JOIN tab0 AS cor1

query I rowsort
SELECT ALL - cor0.col1 + + cor1.col2 * cor0.col1 AS col0 FROM tab0 AS cor0 INNER JOIN tab0 AS cor1

Added proto/random/select/slt_bad_138.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT - 37 AS col2 FROM tab1, tab1 AS cor0 JOIN tab2

query I rowsort
SELECT 79 FROM tab2, tab2, tab1 AS cor0

query I rowsort
SELECT 39 AS col2 FROM tab2, tab2, tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 JOIN tab1, tab1 AS cor1

query I rowsort
SELECT - 19 AS col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT + 17 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT DISTINCT + 88 col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT - 78 * - col2 / col2 FROM tab2

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 LEFT OUTER JOIN tab1 cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT - ( col0 ) / col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab0 AS cor2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab0 AS cor2

query IIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 )

query IIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 JOIN tab1 USING ( col2, col2, col2, col0, col1, col0, col1 )

query I rowsort
SELECT ALL col2 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

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

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2, tab1 AS cor1

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 + col2 * + cor0.col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT - cor0.col1 * + col1 / col0 AS col2 FROM tab1 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab1, tab2 AS cor1 USING ( col0, col0, col0 )

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - - col2 * 4 * col1 + col0 + col2 / cor0.col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT - col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 90 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT ALL 93 / - 2 FROM tab0 AS cor0 JOIN tab0 AS cor1

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

skipif mysql
query I rowsort
SELECT CAST ( NULL AS REAL ) FROM tab0 AS cor0 NATURAL JOIN tab1, tab0 cor1 USING ( col0, col2, col0, col1, col2, col0 )

query I rowsort
SELECT DISTINCT - col0 * ( - col0 ) / col2 FROM tab2 AS cor0

query I rowsort
SELECT + + col2 / + col2 AS col2 FROM tab2 cor0

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

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 INNER JOIN tab1, tab0 AS cor1 USING ( col0, col2, col0, col0, col2, col1 )

query I rowsort
SELECT ALL cor1.col0 col2 FROM tab2 AS cor0 JOIN tab1, tab2 AS cor1

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col2 * + col0 / + 15 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT 20 * 66 AS col0 FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT + + col0 + col2 AS col2 FROM tab1 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + col0 + ( col1 + tab2.col2 ) * + col1 / 64 FROM tab2

query I rowsort
SELECT ALL col1 + 53 / - col2 col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - + 6 FROM tab1, tab1, tab0 cor0, tab2

query I rowsort
SELECT - 46 FROM tab2, tab1, tab1 cor0, tab1

query I rowsort
SELECT - - cor1.col2 + 77 AS col2 FROM tab0 AS cor0 JOIN tab0 cor1

query I rowsort
SELECT ALL + cor1.col2 col1 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT - col0 * col1 / col2 - + col0 col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( cor0.col2 AS INTEGER ) * - col1 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT col1 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 90 AS col2 FROM tab0, tab0, tab1 AS cor0

query I rowsort
SELECT 76 col0 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab1 cor2

query I rowsort
SELECT + 38 AS col2 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT + ( cor0.col2 ) + cor0.col1 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT DISTINCT + - 38 / col0 + - 87 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 NATURAL JOIN tab1

query I rowsort
SELECT DISTINCT + + col0 * + col0 FROM tab1 cor0 NATURAL INNER JOIN tab0 cor1

skipif mysql
query I rowsort
SELECT + col1 * + CAST ( 14 AS INTEGER ) * - col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - - col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + ( + 48 ) AS col1 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - col0 * - col1 / + col0 FROM tab0 AS cor0

query I rowsort
SELECT col1 / + ( col2 ) col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL col1 / - col2 AS col1 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 INNER JOIN tab2 USING ( col2 )

query I rowsort
SELECT ALL 84 FROM tab0, tab1, tab0 AS cor0, tab0

query IIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0 NATURAL JOIN tab1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0 cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT ALL + - col0 * + col1 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col2 ), tab2 AS cor2

query IIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab2 AS cor2, tab1 AS cor3

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1, tab2 AS cor1, tab0 cor2

query I rowsort
SELECT - col1 * col1 / col2 AS col2 FROM tab2

query I rowsort
SELECT + 92 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab1, tab2 AS cor1 USING ( col0, col2, col1, col1, col2 )

query I rowsort
SELECT DISTINCT - col1 * - col0 col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col1 + + col2 * - col0 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col1 FROM tab2 AS cor0 NATURAL INNER JOIN tab0 WHERE NOT col0 + col0 NOT IN ( cor0.col1 )

query I rowsort
SELECT ALL + cor0.col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT + + ( cor0.col1 ) + col1 / col2 AS col0 FROM tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 LEFT JOIN tab1 cor1

skipif mysql
query I rowsort
SELECT CAST ( 41 AS REAL ) * + col0 / 82 AS col1 FROM tab0 AS cor0

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 59 col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 72 / + col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT cor0.col0 FROM tab2, tab2, tab1 cor0

query I rowsort
SELECT col2 * col2 AS col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query III rowsort
SELECT ALL * FROM tab0 cor0 NATURAL LEFT OUTER JOIN tab2, tab2 AS cor1 USING ( col2, col1, col0, col0, col1, col1 )

query I rowsort
SELECT - 87 * col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT + 62 AS col0 FROM tab0, tab2, tab1 AS cor0, tab2

query I rowsort
SELECT + col1 * - col0 / col2 FROM tab1 cor0

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 NATURAL INNER JOIN tab2, tab0 cor1

query I rowsort
SELECT ALL + col2 col0 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT 8 FROM tab2 cor0 JOIN tab0, tab0 AS cor1, tab2 cor2, tab0 AS cor3

query I rowsort
SELECT + + cor0.col2 AS col2 FROM tab1, tab1 AS cor0 NATURAL JOIN tab1 cor1

query I rowsort
SELECT DISTINCT col2 / - col2 + col0 * - col1 / col1 FROM tab2

query I rowsort
SELECT + + col1 * + col2 + + col1 / - col2 + 81 FROM tab2 cor0

query I rowsort
SELECT ALL - 23 FROM tab2 AS cor0 LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - 65 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT - col0 / - ( col0 * col2 ) + col1 * - col0 * - col1 FROM tab2

query I rowsort
SELECT ALL - + 51 - cor0.col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - 62 AS col1 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT ALL 65 AS col1 FROM tab1, tab1, tab0 cor0

query I rowsort
SELECT + cor1.col2 * - col2 * col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

Added proto/random/select/slt_bad_139.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT DISTINCT + 19 / + col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - cor0.col0 * 77 / + col2 FROM tab2 cor0

query I rowsort
SELECT col0 * + col0 / col2 AS col2 FROM tab2 cor0

query I rowsort
SELECT - ( col0 ) * + col0 / + 38 FROM tab2 cor0

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

query I rowsort
SELECT + col0 / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + - cor1.col0 * - 33 + + 4 col0 FROM tab0 AS cor0 LEFT OUTER JOIN tab2 AS cor1

query IIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab1 AS cor1 USING ( col0, col2, col2 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab2, tab0 cor1, tab2 AS cor2

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT + - col0 * + 17 + - col0 * - cor0.col1 / 18 col1 FROM tab1 cor0

query I rowsort
SELECT ALL col2 * + col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - tab1.col2 FROM tab2, tab2, tab2 cor0, tab1

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col0 )

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col0 ), tab0 AS cor2

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab2 AS cor2

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

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

query I rowsort
SELECT + cor0.col0 * + 96 AS col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT + cor0.col1 AS col0 FROM tab1, tab2 cor0 CROSS JOIN tab1

query I rowsort
SELECT + col0 * + col2 / col1 AS col1 FROM tab0 AS cor0

query I rowsort
SELECT ALL 33 AS col0 FROM tab1, tab1, tab2 cor0, tab0

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT OUTER JOIN tab0 cor1 USING ( col1 )

query I rowsort
SELECT - col0 * + col0 / tab1.col1 + + col2 FROM tab1

query I rowsort
SELECT ALL + - ( + col0 ) - - col1 / + col2 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - ( - col2 ) + + col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 LEFT JOIN tab0 AS cor1 USING ( col2 ), tab1 AS cor2

query IIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL 82 FROM tab2, tab2, tab2 cor0

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

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

query I rowsort
SELECT DISTINCT + col2 + col0 * + col2 / + 43 AS col1 FROM tab2 cor0

query I rowsort
SELECT DISTINCT - 98 * col2 + ( + col1 ) FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT cor1.col1 col0 FROM tab2 AS cor0 JOIN tab1, tab1 AS cor1

query IIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2, tab1 AS cor1 USING ( col1, col1, col1, col0, col1 )

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

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 JOIN tab2, tab1 AS cor1 USING ( col2, col2 )

query IIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab0 cor1

query I rowsort
SELECT DISTINCT + 9 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 cor1

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1, tab0 cor0, tab1

query IIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col1 ), tab1 AS cor2, tab0 AS cor3

query I rowsort
SELECT + + 34 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT 19 AS col2 FROM tab0, tab0, tab1 cor0, tab0

query IIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT OUTER JOIN tab2 AS cor1 USING ( col0 )

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT - 13 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col0, col2, col2 )

query I rowsort
SELECT ALL + 8 * cor0.col0 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - 67 * - cor0.col2 / col0 FROM tab2 AS cor0

query I rowsort
SELECT - ( - cor1.col0 ) AS col1 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL + tab2.col2 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col1 * + col0 / + col1 FROM tab1

query I rowsort
SELECT DISTINCT - col1 / col2 AS col1 FROM tab2

query I rowsort
SELECT col0 - tab2.col2 * + tab2.col1 / + col0 col1 FROM tab2

query I rowsort
SELECT DISTINCT - col2 * - col0 + col1 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0, tab0, tab2 cor0

query I rowsort
SELECT cor0.col1 * - 46 / + col1 col1 FROM tab2 AS cor0

query I rowsort
SELECT + 65 AS col1 FROM tab2 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT - - col1 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0 INNER JOIN tab1 USING ( col2, col2 )

query I rowsort
SELECT + col1 + col0 / + col0 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT DISTINCT col1 / cor0.col2 + col1 * - cor0.col2 * col1 FROM tab2 cor0

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

skipif mysql
query I rowsort
SELECT ALL + + CAST ( col1 AS INTEGER ) * - col1 / - 42 FROM tab2 AS cor0

query I rowsort
SELECT ALL col0 * - col0 / ( + col0 + col0 ) FROM tab2

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1, col0, col2, col1 )

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 INNER JOIN tab0, tab0 AS cor1

skipif mysql
query I rowsort
SELECT + + ( col1 ) * CAST ( + col1 AS INTEGER ) - - col2 * - 99 / col2 FROM tab1 AS cor0

query I rowsort
SELECT + - 86 AS col1 FROM tab2, tab0, tab0 AS cor0, tab0

query IIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT - cor1.col0 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL 26 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col0 / + col2 + col1 FROM tab2 AS cor0

query I rowsort
SELECT - tab2.col0 * + col2 / + 28 AS col1 FROM tab2

query I rowsort
SELECT - + col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - col2 * col2 - col2 / - col2 FROM tab2 AS cor0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1, tab2, tab1 AS cor2

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

query I rowsort
SELECT col2 - col1 * - col0 / + col1 FROM tab0 cor0

query I rowsort
SELECT ALL + cor0.col1 col1 FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT ALL col0 / col2 + + col1 * col0 * col2 FROM tab2

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT - 52 + col0 * - tab2.col2 / + tab2.col1 FROM tab2

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col0, col1, col2 )

query I rowsort
SELECT + ( col1 ) * + col1 / - col0 - col0 FROM tab0 AS cor0

query I rowsort
SELECT + 82 FROM tab1, tab2 AS cor0, tab1, tab1 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab1 cor1 USING ( col0 )

query I rowsort
SELECT + 37 * col0 AS col2 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT col0 + - 42 / col2 FROM tab2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT ALL - col1 * - col0 / + 28 AS col2 FROM tab0

query I rowsort
SELECT ALL + - ( + 20 ) FROM tab1 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col2 / - col2 AS col1 FROM tab2

query I rowsort
SELECT DISTINCT + col1 + col2 / col2 FROM tab2 cor0

query I rowsort
SELECT cor0.col0 FROM tab1, tab1, tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3

query I rowsort
SELECT DISTINCT - ( 45 ) * col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

Added proto/random/select/slt_bad_14.proto.











































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL col0 + ( col2 ) / - ( - col2 ) AS col0 FROM tab2 AS cor0

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab2 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 JOIN tab2

query IIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab1 cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 )

query IIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab0 AS cor2, tab2 AS cor3

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 cor1

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

query I rowsort
SELECT col2 / + col2 col1 FROM tab2

query I rowsort
SELECT ( - col0 ) AS col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT 54 FROM tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + tab2.col2 * + tab2.col2 / - col0 FROM tab2

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col1, col1, col2, col0, col0, col1, col0, col2, col2, col1, col0 )

query I rowsort
SELECT ALL col0 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 cor1 USING ( col2 )

query I rowsort
SELECT 89 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT ALL - 15 / col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT + 42 AS col1 FROM tab2, tab0, tab0 AS cor0, tab0

query I rowsort
SELECT ALL + + tab1.col0 * + 11 AS col1 FROM tab0, tab0, tab2 AS cor0, tab1

query I rowsort
SELECT + 73 / - col2 + + col0 * col0 FROM tab2 AS cor0

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

query IIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 JOIN tab0 USING ( col1 )

query I rowsort
SELECT DISTINCT col1 + col0 * + col2 / col0 AS col2 FROM tab1 AS cor0

query III rowsort
SELECT * FROM tab0 AS cor0 NATURAL INNER JOIN tab0

query I rowsort
SELECT DISTINCT + col1 / col2 + col1 AS col2 FROM tab2

query I rowsort
SELECT ALL - col1 * - col1 + - col0 * - col0 / - col2 AS col1 FROM tab1 AS cor0

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL - 47 * cor0.col1 / cor0.col2 AS col0 FROM tab2 cor0

skipif mysql
query I rowsort
SELECT - CAST ( + ( + col1 ) AS REAL ) / col2 + 80 AS col0 FROM tab1 AS cor0

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

query I rowsort
SELECT - 22 / 59 - col0 * - 61 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + cor1.col1 + cor1.col1 AS col1 FROM tab0 cor0 NATURAL INNER JOIN tab0, tab0 AS cor1 USING ( col0, col1, col2, col0, col1, col2, col2 )

query I rowsort
SELECT - 56 FROM tab1 AS cor0 JOIN tab2 cor1

query IIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col2, col0 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab2 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 INNER JOIN tab2, tab1 cor1 USING ( col0, col2, col2, col1 )

query I rowsort
SELECT - + 59 AS col0 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT ALL - - cor1.col0 FROM tab1, tab1 AS cor0 JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab1 AS cor0 JOIN tab0, tab2 AS cor1

query IIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 NATURAL JOIN tab1, tab2 AS cor1 USING ( col2, col1 )

query III rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab0, tab1 AS cor1 USING ( col0, col2, col1, col0, col1, col1, col0, col0, col2, col1, col0, col1 )

query I rowsort
SELECT ALL 88 * - cor0.col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1

query IIIII rowsort
SELECT * FROM tab2 cor0 INNER JOIN tab0 AS cor1 USING ( col2 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0, tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL LEFT JOIN tab1, tab1 AS cor1, tab2, tab2 AS cor2

query I rowsort
SELECT DISTINCT + 1 FROM tab0 AS cor0 JOIN tab1, tab1 AS cor1, tab1 AS cor2

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT DISTINCT + + 92 AS col1 FROM tab0 AS cor0 JOIN tab0 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1 cor1 USING ( col0 )

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 NATURAL JOIN tab2, tab0 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col1 * - col0 / col1 + col2 + + col1 FROM tab1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab1 WHERE NOT ( + col2 * col2 * + col2 + cor0.col2 * col0 ) = NULL

query I rowsort
SELECT ALL - col1 * col0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT 89 FROM tab1, tab1 AS cor0 NATURAL JOIN tab2

query IIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab0 AS cor1 USING ( col1 ), tab0 AS cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 INNER JOIN tab0 AS cor1

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab1 AS cor2

query IIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 INNER JOIN tab2 AS cor1 USING ( col2 ), tab2 cor2, tab2 AS cor3

query III rowsort
SELECT ALL * FROM tab0 cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 INNER JOIN tab1, tab1 AS cor1, tab1 AS cor2

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

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

query I rowsort
SELECT DISTINCT + col0 * col1 - - col0 / col0 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT + col0 / col2 + col0 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1, tab2 AS cor2

query IIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1, tab0 AS cor2

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab1, tab0 cor1, tab2 cor2

query I rowsort
SELECT ALL - col0 * + col2 + col1 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + col0 * - col2 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

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

skipif mysql
query I rowsort
SELECT col0 + + col1 / + CAST ( - 48 + + col2 AS REAL ) AS col1 FROM tab2

query I rowsort
SELECT ALL col2 * + col1 FROM tab1 AS cor0 NATURAL LEFT JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 )

query I rowsort
SELECT - 28 * 40 AS col1 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 LEFT OUTER JOIN tab1, tab0 AS cor1

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2

query I rowsort
SELECT ALL cor1.col0 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT - + 79 * col2 * col2 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col2 / + col2 FROM tab2

query IIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 JOIN tab0 USING ( col0, col0, col1, col1 )

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 LEFT OUTER JOIN tab1, tab1 AS cor1

query I rowsort
SELECT ALL - col0 / - col2 FROM tab2 AS cor0

query I rowsort
SELECT - col0 - - 51 col1 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT tab2.col1 * + 28 / 75 + + tab2.col1 + + tab2.col1 / col1 AS col1 FROM tab2

query I rowsort
SELECT ALL - col2 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 JOIN tab2 USING ( col2, col0, col2, col1 )

query I rowsort
SELECT - col1 * col1 + - col0 * + col2 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

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

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab2 AS cor1 USING ( col1 ), tab0 AS cor2

query I rowsort
SELECT + 30 * 47 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) FROM tab2, tab2, tab0 AS cor0

query I rowsort
SELECT ALL col0 / 57 - - col0 * - cor0.col2 / 29 col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL + 51 FROM tab0, tab0, tab0 cor0

Added proto/random/select/slt_bad_140.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT - col0 * - col1 / col2 FROM tab0 cor0

query I rowsort
SELECT DISTINCT - cor0.col2 / - 55 AS col0 FROM tab2, tab2, tab1 AS cor0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab2, tab2 cor1, tab0 AS cor2, tab1 AS cor3

query IIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT col2 + + 36 / + col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT + 17 * cor2.col1 col2 FROM tab1 AS cor0 NATURAL LEFT JOIN tab2, tab0 cor1, tab1 cor2

query I rowsort
SELECT col1 * col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab2 cor2

query I rowsort
SELECT ALL + 82 AS col0 FROM tab1, tab1, tab1 AS cor0

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

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) * - ( tab1.col1 ) AS col0 FROM tab2, tab1 cor0 NATURAL JOIN tab1

query I rowsort
SELECT DISTINCT + - cor2.col0 AS col1 FROM tab2, tab2 cor0 CROSS JOIN tab1, tab0 AS cor1, tab1, tab0 AS cor2

query I rowsort
SELECT - 52 AS col2 FROM tab2 AS cor0 JOIN tab0, tab2 cor1, tab2 AS cor2

query IIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col0, col2, col2 )

query I rowsort
SELECT ALL col2 * + 28 + col0 / col2 FROM tab2

query I rowsort
SELECT + - 46 AS col1 FROM tab0, tab0, tab0 AS cor0

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

query I rowsort
SELECT - - 77 FROM tab1, tab2, tab2 AS cor0, tab1

query I rowsort
SELECT - - 61 * col0 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab1 cor1

query I rowsort
SELECT col0 * - ( col0 ) FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL tab1.col1 + - col2 * + col1 / - ( col0 ) FROM tab1

query I rowsort
SELECT ALL - 70 * + col2 / - col1 AS col1 FROM tab2 cor0

query I rowsort
SELECT + col2 * - col0 / tab0.col1 FROM tab0

query I rowsort
SELECT col0 + col1 / cor0.col2 + cor0.col2 AS col2 FROM tab2 cor0

query I rowsort
SELECT ALL 66 FROM tab1, tab1, tab1 AS cor0, tab2

query I rowsort
SELECT + col2 + tab2.col1 * ( - tab2.col1 ) / + col2 FROM tab2

query I rowsort
SELECT + ( col1 ) + cor0.col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 INNER JOIN tab1 USING ( col2, col0, col0, col1, col2 )

query I rowsort
SELECT + 39 + + 55 / + col2 AS col2 FROM tab2 cor0

skipif mysql
query I rowsort
SELECT CAST ( NULL AS INTEGER ) * col0 + col2 / + tab2.col2 AS col2 FROM tab2

query I rowsort
SELECT ALL - cor1.col1 FROM tab1, tab0 AS cor0 CROSS JOIN tab1, tab0, tab2 AS cor1, tab2

query I rowsort
SELECT + cor1.col1 FROM tab0 AS cor0 JOIN tab2 cor1

query IIIII rowsort
SELECT ALL * FROM tab1 cor0 INNER JOIN tab1 AS cor1 USING ( col0 )

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab0 AS cor2, tab0, tab0 AS cor3

query I rowsort
SELECT ALL + cor0.col1 * 27 AS col0 FROM tab0, tab1, tab2 AS cor0, tab1

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1, tab1, tab2 cor0, tab2

query I rowsort
SELECT + col0 + col2 + col2 / tab2.col2 FROM tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab1, tab2 AS cor1, tab0 AS cor2

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 LEFT JOIN tab2, tab1 AS cor1

query I rowsort
SELECT DISTINCT + - col0 * col0 * + col1 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + col2 + tab2.col1 / + col2 FROM tab2

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT OUTER JOIN tab2, tab1 AS cor1

query I rowsort
SELECT 30 AS col2 FROM tab1, tab1, tab1 AS cor0

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

query I rowsort
SELECT ALL - ( + col2 ) * - col0 / - col2 + col2 FROM tab1

query I rowsort
SELECT - col1 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL col1 * - tab2.col1 + tab2.col1 / - col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col0 + col0 / col2 + col0 * + col1 AS col2 FROM tab2

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 NATURAL JOIN tab0, tab1, tab1 AS cor1

query I rowsort
SELECT - + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 NATURAL JOIN tab1, tab2 AS cor1

query I rowsort
SELECT - cor0.col2 + cor0.col0 * + col0 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 NATURAL JOIN tab1, tab2 AS cor1

query I rowsort
SELECT ALL 75 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT DISTINCT + + col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) + cor0.col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - + ( + ( col2 ) ) + - col0 AS col2 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - 97 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT - 68 FROM tab2, tab1 AS cor0 NATURAL JOIN tab0

query I rowsort
SELECT 11 AS col2 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT col1 AS col1 FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col1 )

query I rowsort
SELECT - col0 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT 96 AS col2 FROM tab1, tab1, tab1 AS cor0

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab0, tab1 cor0

query I rowsort
SELECT col1 * - tab2.col2 / - col0 FROM tab2

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1 cor0 NATURAL LEFT JOIN tab0 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 LEFT JOIN tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + 88 / cor0.col2 + cor0.col0 FROM tab2 cor0

query I rowsort
SELECT ALL + 49 FROM tab1, tab0 AS cor0, tab1, tab0 AS cor1

query I rowsort
SELECT + 51 * + 96 col1 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT DISTINCT + col0 / + col2 col2 FROM tab2

query I rowsort
SELECT + cor0.col0 * col1 FROM tab1 cor0 NATURAL JOIN tab2

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

query I rowsort
SELECT ALL - col0 * - col0 - - tab2.col1 / - col2 FROM tab2

query I rowsort
SELECT - 83 / col2 + col0 AS col0 FROM tab2

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

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 JOIN tab1, tab0, tab2 cor1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1

query I rowsort
SELECT + - col1 FROM tab1 cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT ALL * FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL col2 + tab2.col0 * - col2 / + tab2.col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT + col2 * - col2 / col0 - + col1 AS col1 FROM tab1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0, tab1 cor1 USING ( col2, col1, col0 )

query I rowsort
SELECT + col1 * - col0 / col2 + col1 FROM tab1

query I rowsort
SELECT col0 / - col2 AS col2 FROM tab2

query I rowsort
SELECT - col0 FROM tab2 AS cor0 INNER JOIN tab1 cor1 USING ( col0 )

query I rowsort
SELECT DISTINCT + 59 * + col1 / - cor0.col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL + 63 + col2 * - col1 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1, tab1, tab0 cor0

query I rowsort
SELECT ALL + 10 * + col2 * - 13 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT 69 * cor0.col2 FROM tab0 AS cor0 JOIN tab0 cor1

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2 cor0 INNER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL LEFT JOIN tab1, tab0 AS cor1

query I rowsort
SELECT ALL + cor0.col2 / - col2 col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 2 FROM tab2 AS cor0 INNER JOIN tab0 AS cor1

query IIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 JOIN tab2 USING ( col1, col2, col2, col2, col2, col2 )

query I rowsort
SELECT tab2.col2 / col2 - - tab2.col1 * col0 AS col1 FROM tab2

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

Added proto/random/select/slt_bad_141.proto.













































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3

query IIII rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL JOIN tab2, tab2 AS cor1 USING ( col0, col2 )

query I rowsort
SELECT ALL col2 * col0 + - col2 * col2 + + col0 / col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT + col0 / col2 FROM tab2

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col1, col0, col0, col1, col2, col0, col2, col0, col2, col2, col0 )

query III rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab2, tab2 cor1 USING ( col2, col0, col2, col1, col1, col0 )

query I rowsort
SELECT - - 20 AS col2 FROM tab2, tab2, tab2 AS cor0, tab1

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 LEFT JOIN tab1, tab0 AS cor1 USING ( col1, col0, col2, col0 )

query I rowsort
SELECT + col1 / col2 + - col2 AS col0 FROM tab2

query I rowsort
SELECT DISTINCT + col2 * + col2 / 12 FROM tab1

query I rowsort
SELECT DISTINCT 47 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT col2 / - col2 + col2 * col2 AS col0 FROM tab2

query I rowsort
SELECT + ( 15 ) col0 FROM tab0, tab0, tab0 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab0, tab1 AS cor0 JOIN tab1, tab1 AS cor1

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab2, tab2, tab1 AS cor0

query IIIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT OUTER JOIN tab1 cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 NATURAL JOIN tab2, tab0 AS cor1, tab2 cor2

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2 cor1 USING ( col0 ), tab0 cor2, tab2, tab1 cor3

query I rowsort
SELECT ALL 46 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 AS cor1, tab1 AS cor2

skipif mysql
query I rowsort
SELECT + - col0 / CAST ( - col2 AS INTEGER ) + + col1 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL + ( - col2 ) + 33 * + ( - col1 ) / - col0 FROM tab0 AS cor0

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1, tab0, tab1 AS cor0, tab0

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

query I rowsort
SELECT DISTINCT 66 FROM tab0, tab0, tab1 AS cor0, tab0

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 NATURAL JOIN tab1, tab1 cor1 USING ( col2 ), tab2 AS cor2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col2 )

query I rowsort
SELECT ALL 20 AS col2 FROM tab0, tab2 AS cor0 JOIN tab0 cor1

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

query I rowsort
SELECT 56 AS col0 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT ALL + col0 * + col0 / col2 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT ALL - cor1.col2 * + ( + 48 ) + + cor0.col1 + + 65 FROM tab0 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab0 cor2

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL INNER JOIN tab2, tab2 AS cor1

query I rowsort
SELECT ALL - col0 / col2 - + col0 * - col1 FROM tab2 AS cor0

query I rowsort
SELECT + col1 * - col0 / 14 AS col0 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT - + col1 * + CAST ( NULL AS INTEGER ) * 18 AS col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT ALL - col2 FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

query IIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 INNER JOIN tab2 AS cor1 USING ( col2 ), tab0 AS cor2, tab0 AS cor3

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab1, tab1 AS cor1 USING ( col1, col0, col2, col0 )

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

query IIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 INNER JOIN tab2 USING ( col0 )

query IIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab1 AS cor2

query I rowsort
SELECT ALL 55 FROM tab1, tab1 AS cor0 CROSS JOIN tab1

query I rowsort
SELECT DISTINCT - col0 + 10 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT col1 + + 45 * col2 FROM tab1 cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT col1 + col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT + col0 * col1 AS col0 FROM tab2 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT + col2 * - col0 / cor0.col2 FROM tab0 AS cor0

query I rowsort
SELECT ALL + 80 * - col1 / 49 FROM tab2 AS cor0

query IIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 JOIN tab2 AS cor1 USING ( col0 ), tab2 AS cor2, tab0 cor3

query IIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab1 AS cor1 USING ( col1 ), tab1 AS cor2

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

query I rowsort
SELECT ALL col0 FROM tab1 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query I rowsort
SELECT - col1 * 14 + + col1 - col2 AS col1 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query III rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL LEFT JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT col2 + + tab0.col1 * - col1 / - col0 + col1 FROM tab0

query III rowsort
SELECT * FROM tab2 cor0 NATURAL JOIN tab1

query IIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 JOIN tab2 USING ( col2 )

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

query I rowsort
SELECT ALL + cor0.col1 * ( 83 ) AS col1 FROM tab0, tab0, tab2 AS cor0, tab0

query I rowsort
SELECT ALL - col0 + col1 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col2, col0 )

query I rowsort
SELECT + + col1 + + 38 * + col2 FROM tab1 cor0 NATURAL JOIN tab0 cor1

skipif mysql
query I rowsort
SELECT ALL - - col1 * CAST ( - 15 * col1 AS REAL ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 NATURAL INNER JOIN tab1, tab2 AS cor1 USING ( col0 ), tab0 AS cor2, tab0 AS cor3

query I rowsort
SELECT - col2 * + col0 / - ( col0 * - col2 + - col2 ) AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab1, tab1, tab1 AS cor0

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

query I rowsort
SELECT + + 63 AS col2 FROM tab2, tab2, tab2 cor0

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab0 AS cor0 LEFT OUTER JOIN tab0 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL + 30 AS col1 FROM tab2 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT - 65 * - col1 / + col2 - col1 AS col2 FROM tab0 AS cor0

query I rowsort
SELECT cor0.col0 FROM tab2, tab1 AS cor0, tab2, tab1 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col0 / - cor0.col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL + + 45 + + col1 / cor0.col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab0 cor2, tab1, tab1 AS cor3

query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1

query IIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 ), tab2 AS cor2, tab2, tab0 AS cor3

query I rowsort
SELECT DISTINCT + 13 AS col1 FROM tab0, tab0, tab1 AS cor0

query IIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 JOIN tab0 AS cor1 USING ( col1 ), tab2 AS cor2

query I rowsort
SELECT DISTINCT + col1 + + 12 / col2 col2 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab0, tab0 AS cor1, tab2 cor2

query IIIIIII rowsort
SELECT * FROM tab0 AS cor0 INNER JOIN tab2, tab0 AS cor1 USING ( col0, col1, col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL INNER JOIN tab0, tab2 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab2, tab1 AS cor1, tab0, tab0 AS cor2

query I rowsort
SELECT DISTINCT 94 FROM tab0, tab2, tab0 cor0, tab0

query I rowsort
SELECT + + 16 / 61 AS col0 FROM tab0, tab2, tab0 AS cor0, tab0

query I rowsort
SELECT - + ( - 58 ) AS col1 FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab0 AS cor0 JOIN tab1 USING ( col1 )

query IIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 INNER JOIN tab0 cor1

query I rowsort
SELECT DISTINCT col0 / - col2 col0 FROM tab2

query IIIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col0 ), tab2 AS cor2

skipif mysql
query I rowsort
SELECT ALL 53 * col1 + + col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

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

query I rowsort
SELECT DISTINCT + col0 + - col2 * col2 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 NATURAL LEFT JOIN tab0, tab2 AS cor1 USING ( col2 )

query I rowsort
SELECT + + 73 FROM tab1, tab1, tab0 AS cor0

Added proto/random/select/slt_bad_142.proto.

















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query I rowsort
SELECT ALL - + 81 AS col2 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT col0 * - col2 + - 21 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL 26 AS col0 FROM tab0 AS cor0 JOIN tab2, tab1 AS cor1, tab2 AS cor2

query I rowsort
SELECT ALL - col2 * + 28 / + col0 - col0 * 22 / - col1 FROM tab0 AS cor0

skipif mysql
query I rowsort
SELECT ( - ( col2 ) ) + CAST ( col1 AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT - ( + 47 ) AS col2 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT ALL - 30 AS col1 FROM tab1, tab1, tab2 AS cor0

query I rowsort
SELECT DISTINCT + 15 AS col0 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT ALL col2 + - col0 * + 71 / - col2 AS col1 FROM tab0

query I rowsort
SELECT DISTINCT + + col0 col0 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT ALL - col2 AS col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT - cor0.col0 / col2 - - col0 FROM tab2 cor0

query I rowsort
SELECT DISTINCT + col1 FROM tab2 AS cor0 NATURAL JOIN tab0 cor1

query I rowsort
SELECT - 32 col0 FROM tab2 AS cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT 52 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT 3 / - col2 - 0 FROM tab2

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

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

query I rowsort
SELECT DISTINCT - + 65 * 79 col2 FROM tab1 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT ALL - ( 24 ) * - col0 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( 72 AS INTEGER ) FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab0, tab2 AS cor0, tab0 AS cor1

query I rowsort
SELECT DISTINCT + + tab1.col0 FROM tab0, tab0, tab2 AS cor0, tab1

query I rowsort
SELECT DISTINCT col2 col1 FROM tab0 AS cor0 JOIN tab1 AS cor1 USING ( col2 )

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

query I rowsort
SELECT ALL - col0 + col1 AS col2 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL LEFT JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab1 AS cor3

query I rowsort
SELECT - + 52 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab1 AS cor1 USING ( col1, col2, col2 )

query I rowsort
SELECT - cor0.col0 * col0 AS col1 FROM tab2 cor0 NATURAL INNER JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 JOIN tab0, tab0 cor1

query I rowsort
SELECT DISTINCT col0 / + col2 + col1 - + 37 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col2 col2 FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1

query IIIIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab0, tab2 AS cor1 USING ( col0, col2 )

query I rowsort
SELECT ALL + + 97 AS col0 FROM tab2, tab1, tab2 AS cor0, tab1

query I rowsort
SELECT DISTINCT + - 11 FROM tab1 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT cor0.col0 * cor1.col1 AS col2 FROM tab1 cor0 JOIN tab1, tab0 AS cor1

query I rowsort
SELECT ALL + col2 * - col1 AS col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + col1 / ( col2 ) FROM tab2 cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col1 ), tab0 AS cor2

skipif mysql
query I rowsort
SELECT CAST ( col0 AS INTEGER ) FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT - tab2.col0 / tab2.col2 AS col2 FROM tab2

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

query I rowsort
SELECT col1 - col2 / col2 AS col2 FROM tab2

query I rowsort
SELECT - col0 / col2 col1 FROM tab2

query I rowsort
SELECT DISTINCT - col2 / + tab2.col2 FROM tab2

query I rowsort
SELECT DISTINCT - 4 col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab2

query IIIII rowsort
SELECT ALL * FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col1 )

query I rowsort
SELECT + 90 / + col2 FROM tab2 AS cor0

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col0 ), tab0 AS cor2

query I rowsort
SELECT + + col0 FROM tab2 AS cor0 NATURAL INNER JOIN tab1 AS cor1

query I rowsort
SELECT ( col0 ) * tab2.col2 * col1 + 7 / + col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT - col2 * + col2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT - col2 * + 63 / col2 - + ( 87 + cor0.col0 ) AS col0 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + - 26 + + 85 / cor0.col2 FROM tab2 AS cor0

skipif mysql
query I rowsort
SELECT CAST ( + col1 AS REAL ) * col1 / cor0.col0 + ( col1 * + cor0.col0 ) AS col2 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

skipif mysql
query I rowsort
SELECT - cor0.col0 * - CAST ( + col2 AS INTEGER ) / - col0 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT - 19 + - ( col1 ) FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - ( col1 ) FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL INNER JOIN tab0, tab0 AS cor1 USING ( col1, col2, col0 )

query I rowsort
SELECT + col0 FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - + col1 + + ( - col2 ) / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT - cor2.col0 AS col0 FROM tab1 AS cor0 JOIN tab1 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab2, tab0 AS cor0, tab2

query I rowsort
SELECT DISTINCT col2 * + tab2.col0 / col2 FROM tab2

query I rowsort
SELECT col1 * col0 + col1 * + col0 / + tab2.col1 FROM tab2

query I rowsort
SELECT - cor0.col0 * + col0 / + col2 FROM tab0 AS cor0

query III rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col2, col1, col0, col1, col0 )

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT JOIN tab0 AS cor1 USING ( col2 )

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

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2, tab0 cor1

query IIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 NATURAL INNER JOIN tab0, tab1 AS cor1

query I rowsort
SELECT DISTINCT - col0 * + 6 / col2 - + col1 FROM tab2 AS cor0

query I rowsort
SELECT + col1 * + col0 / + col1 AS col1 FROM tab1 AS cor0

query I rowsort
SELECT col2 / - col0 + col0 * + tab1.col2 / col0 FROM tab1

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

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

query I rowsort
SELECT + 9 AS col1 FROM tab0, tab0, tab2 AS cor0

query I rowsort
SELECT + col1 - col0 * + 97 / cor0.col1 AS col0 FROM tab2 AS cor0

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

query I rowsort
SELECT ALL col2 * col1 + 25 AS col0 FROM tab1 AS cor0 NATURAL INNER JOIN tab2 AS cor1

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

query I rowsort
SELECT DISTINCT - col0 FROM tab2 AS cor0 NATURAL JOIN tab1 cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 cor0 INNER JOIN tab2, tab2 AS cor1

query I rowsort
SELECT DISTINCT + cor0.col2 AS col0 FROM tab1 AS cor0 JOIN tab1 cor1

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

skipif mysql
query I rowsort
SELECT ALL col0 + CAST ( col1 AS REAL ) / cor0.col2 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT ALL 67 AS col0 FROM tab0 cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL col0 FROM tab1 cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 NATURAL LEFT OUTER JOIN tab1, tab2 AS cor1, tab0, tab2 AS cor2

query I rowsort
SELECT + + col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - col1 * 59 + cor1.col2 FROM tab2 AS cor0 NATURAL JOIN tab2 cor1

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 NATURAL JOIN tab0, tab2 cor1, tab1 AS cor2

query I rowsort
SELECT + ( + col1 ) * 25 FROM tab1 AS cor0 NATURAL JOIN tab2 cor1

query I rowsort
SELECT - - 46 AS col0 FROM tab2 cor0 JOIN tab0 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 LEFT OUTER JOIN tab1 USING ( col2, col1, col0, col0 )

query I rowsort
SELECT DISTINCT + col0 / 89 - cor0.col0 AS col0 FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT - 95 col2 FROM tab2 AS cor0 JOIN tab0 cor1

Added proto/random/select/slt_bad_143.proto.



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

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

query I rowsort
SELECT + cor0.col0 AS col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ( - cor1.col2 ) * - col2 + + 63 + 32 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT col1 + + col2 * cor0.col0 / - col2 col0 FROM tab2 cor0

query I rowsort
SELECT DISTINCT col1 / + col2 + + 48 * 56 col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + 56 + cor0.col0 * + ( - ( col0 ) ) / - col2 AS col1 FROM tab2 cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0, tab2 AS cor1

query IIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0 NATURAL JOIN tab1

query I rowsort
SELECT ALL - col0 col0 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query IIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL JOIN tab1, tab1 AS cor1 USING ( col0, col1 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 JOIN tab0, tab2 cor1 USING ( col2 )

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

query I rowsort
SELECT + cor1.col0 + - 93 FROM tab0 AS cor0 JOIN tab0 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 JOIN tab0, tab1 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 JOIN tab0 USING ( col0, col0, col0, col1, col2, col2, col0, col1, col2, col2, col2, col0 )

query I rowsort
SELECT + 63 FROM tab0, tab0, tab1 cor0

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

query I rowsort
SELECT + ( - col2 ) + col0 * 38 FROM tab0 AS cor0 NATURAL JOIN tab2 AS cor1

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

query I rowsort
SELECT + col1 * col2 AS col2 FROM tab0 AS cor0 NATURAL LEFT OUTER JOIN tab2 AS cor1

query I rowsort
SELECT DISTINCT + 49 FROM tab0 AS cor0 NATURAL INNER JOIN tab0 AS cor1

query I rowsort
SELECT col1 + col1 * - col0 / - col1 + col2 AS col0 FROM tab0 AS cor0

query I rowsort
SELECT DISTINCT + 36 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2, tab1 AS cor1 USING ( col1 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0 JOIN tab2 USING ( col2 )

query I rowsort
SELECT 7 FROM tab0 cor0 JOIN tab1 cor1

query I rowsort
SELECT - cor1.col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL 59 + - col2 * + col2 / + 25 AS col2 FROM tab2

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT 29 FROM tab0 cor0 LEFT JOIN tab2, tab1 AS cor1

query I rowsort
SELECT - + cor0.col1 + - cor0.col2 * col2 * - col0 + col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab1 AS cor1 USING ( col2 )

query IIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT JOIN tab2, tab2 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL cor0.col1 FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1

query I rowsort
SELECT ALL ( 91 ) / col2 AS col1 FROM tab2 AS cor0

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

query I rowsort
SELECT 60 col2 FROM tab2 AS cor0 INNER JOIN tab1, tab2 AS cor1, tab0 cor2, tab0 cor3

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 INNER JOIN tab2, tab0 AS cor1

query I rowsort
SELECT ALL 51 * cor1.col2 AS col1 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT ALL CAST ( NULL AS INTEGER ) * + 16 FROM tab1 AS cor0 NATURAL JOIN tab1, tab0 AS cor1 USING ( col2, col1, col2, col2, col1, col1, col1 )

query IIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab1, tab0 AS cor1 USING ( col2, col0, col1, col0, col0 )

query I rowsort
SELECT 49 / - cor0.col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL - col0 * 82 * + col0 AS col1 FROM tab1 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + + col0 * + 79 / + 44 - col1 FROM tab0 AS cor0

query IIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col2 ), tab1 AS cor2

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 cor1

query I rowsort
SELECT ALL - - col2 * col2 / + ( col2 * col1 ) col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL - - 76 * - col1 / - cor0.col2 FROM tab1 AS cor0

query I rowsort
SELECT col0 * + cor0.col2 / - 39 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT 21 - + cor1.col2 FROM tab2 AS cor0 JOIN tab0 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab0, tab0 AS cor0

query I rowsort
SELECT DISTINCT + col0 * - col0 / - col2 FROM tab0

query I rowsort
SELECT DISTINCT + col2 / + col2 AS col1 FROM tab2 AS cor0

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

skipif mysql
query I rowsort
SELECT DISTINCT - col0 * 81 + - 33 * + col1 / CAST ( col0 AS INTEGER ) FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab2, tab2 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 LEFT JOIN tab1 AS cor1 USING ( col1 )

query I rowsort
SELECT + col0 * - col1 + + cor1.col1 AS col1 FROM tab2 cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT + + 18 AS col1 FROM tab1, tab1 AS cor0, tab1, tab1 AS cor1

skipif mysql
query I rowsort
SELECT ALL + + cor0.col1 * col2 / CAST ( col2 AS INTEGER ) FROM tab2 AS cor0

query I rowsort
SELECT ALL ( - 24 ) FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT + col2 / ( cor0.col2 ) FROM tab2 AS cor0

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

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 AS cor0 JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( + 28 AS REAL ) / col2 AS col2 FROM tab1 AS cor0

query I rowsort
SELECT DISTINCT + - 69 * col1 - 68 / cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL - ( col0 ) AS col2 FROM tab2 AS cor0 NATURAL JOIN tab1 AS cor1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 JOIN tab0, tab2 AS cor1, tab1, tab0 AS cor2

query IIIII rowsort
SELECT * FROM tab0 AS cor0 LEFT JOIN tab0 AS cor1 USING ( col0 )

skipif mysql
query I rowsort
SELECT + CAST ( NULL AS REAL ) + cor0.col1 AS col0 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT - 9 FROM tab0, tab1 AS cor0 CROSS JOIN tab0

query I rowsort
SELECT DISTINCT col1 * - col2 / + 92 FROM tab0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1, tab1 AS cor1

query I rowsort
SELECT + col1 + tab2.col2 * - 89 / col1 + ( - col0 ) AS col2 FROM tab2

query IIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 INNER JOIN tab1 cor1 USING ( col1 ), tab2 cor2

query I rowsort
SELECT 94 * col0 - + 36 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - col1 * col1 FROM tab1 AS cor0 JOIN tab0 AS cor1 USING ( col1 )

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

query I rowsort
SELECT cor0.col2 * - cor1.col2 * + cor1.col0 FROM tab0 cor0 JOIN tab0 AS cor1

query I rowsort
SELECT ALL + - col0 + ( - 5 + col0 ) * - 16 / col1 FROM tab2 AS cor0

query I rowsort
SELECT ALL + 33 * - col0 / - col2 AS col1 FROM tab0 AS cor0

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 NATURAL JOIN tab1, tab2 AS cor1

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1, tab1, tab0 AS cor0

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

query I rowsort
SELECT ALL - col2 * + 90 FROM tab2 AS cor0 INNER JOIN tab0 AS cor1 USING ( col2 )

query I rowsort
SELECT DISTINCT 49 col1 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1

query I rowsort
SELECT + + col2 * + cor0.col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab1, tab0 AS cor0

query I rowsort
SELECT ALL - 29 FROM tab0, tab1, tab1 AS cor0, tab0

query I rowsort
SELECT col2 / col2 + + col2 FROM tab2

skipif mysql
query I rowsort
SELECT ALL col0 * col0 / + CAST ( col2 + - col2 AS INTEGER ) FROM tab2

query I rowsort
SELECT ALL + + col0 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab2, tab2, tab1 AS cor0, tab0

query I rowsort
SELECT ALL - - col2 * + col1 / col2 + col0 FROM tab1 AS cor0

query I rowsort
SELECT ALL - - ( col2 ) - col1 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT CAST ( 98 AS INTEGER ) FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - col1 FROM tab2 cor0 NATURAL INNER JOIN tab2 AS cor1

query I rowsort
SELECT + cor0.col2 / + 39 FROM tab0, tab0, tab2 AS cor0

query IIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 INNER JOIN tab2, tab0 AS cor1 USING ( col2, col1 )

Added proto/random/select/slt_bad_144.proto.















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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(51,34,43)

statement ok
INSERT INTO tab0 VALUES(72,93,25)

statement ok
INSERT INTO tab0 VALUES(21,64,78)

statement ok
INSERT INTO tab1 VALUES(54,78,73)

statement ok
INSERT INTO tab1 VALUES(67,57,94)

statement ok
INSERT INTO tab1 VALUES(43,29,78)

statement ok
INSERT INTO tab2 VALUES(38,9,81)

statement ok
INSERT INTO tab2 VALUES(56,72,0)

statement ok
INSERT INTO tab2 VALUES(33,3,76)

query IIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 NATURAL JOIN tab2, tab0 AS cor1 USING ( col1, col1 )

query I rowsort
SELECT + col2 + ( col0 ) / - cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT + col0 * - 24 AS col1 FROM tab1 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col0 )

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 JOIN tab2, tab2 AS cor1 USING ( col1 )

query I rowsort
SELECT cor1.col2 AS col0 FROM tab1 AS cor0 INNER JOIN tab1 AS cor1 USING ( col2 ), tab2 AS cor2

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 NATURAL JOIN tab2, tab1 AS cor1, tab1 cor2, tab1 AS cor3

query I rowsort
SELECT DISTINCT col1 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT - 78 / cor2.col0 AS col0 FROM tab1 cor0 JOIN tab1 AS cor1 USING ( col0 ), tab1 AS cor2

query I rowsort
SELECT + col1 / - col2 + tab2.col0 FROM tab2

query I rowsort
SELECT ALL col0 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab0

query IIIII rowsort
SELECT ALL * FROM tab2 AS cor0 LEFT OUTER JOIN tab1 USING ( col0 )

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab0 AS cor0 NATURAL INNER JOIN tab0

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

query I rowsort
SELECT col1 AS col2 FROM tab2 AS cor0 NATURAL INNER JOIN tab2 AS cor1

skipif mysql
query I rowsort
SELECT - cor0.col2 * CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0 JOIN tab2 AS cor1

query IIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 NATURAL JOIN tab0, tab2 AS cor1 USING ( col1, col1 )

query IIIIII rowsort
SELECT * FROM tab1 AS cor0 NATURAL LEFT OUTER JOIN tab2, tab0 AS cor1

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 AS cor0 LEFT OUTER JOIN tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT ALL - col1 FROM tab0 AS cor0 NATURAL INNER JOIN tab1 AS cor1

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

query I rowsort
SELECT ALL 26 FROM tab0 AS cor0 JOIN tab2 cor1

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 JOIN tab2, tab2 cor1

query I rowsort
SELECT ALL + 43 * - 0 / col2 FROM tab2 AS cor0

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2, tab1 AS cor0 JOIN tab2

query I rowsort
SELECT col2 / col2 AS col0 FROM tab2 AS cor0

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 JOIN tab2 USING ( col0, col1, col2, col1, col0, col1, col0 )

skipif mysql
query I rowsort
SELECT - CAST ( NULL AS INTEGER ) + 2 / col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + cor0.col0 / col2 AS col2 FROM tab2 AS cor0

query I rowsort
SELECT - - 53 FROM tab2, tab1, tab2 AS cor0, tab2

query IIIIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 JOIN tab2 AS cor1 USING ( col2 ), tab0 AS cor2, tab1, tab0 AS cor3

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1

query I rowsort
SELECT + 37 * cor0.col2 FROM tab0 AS cor0 JOIN tab2 AS cor1

query I rowsort
SELECT + + 96 AS col2 FROM tab2, tab2, tab0 AS cor0, tab2

query I rowsort
SELECT DISTINCT col1 / - col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT ALL - col0 * - col1 / + 44 + col1 * tab1.col0 AS col1 FROM tab1

query I rowsort
SELECT ALL + - 48 / cor0.col2 + - col0 - - cor0.col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT tab2.col2 / + col2 AS col1 FROM tab2

query I rowsort
SELECT - col1 * col2 - + col2 / col2 FROM tab2

skipif mysql
query I rowsort
SELECT - col2 / CAST ( col1 AS REAL ) + - col1 * tab1.col1 * col2 FROM tab1

query I rowsort
SELECT col0 - col1 / col2 AS col2 FROM tab2

query I rowsort
SELECT DISTINCT col0 / - cor0.col2 AS col1 FROM tab2 AS cor0

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 INNER JOIN tab2, tab1 AS cor1

query I rowsort
SELECT - - col0 * cor0.col1 / + col2 FROM tab2 AS cor0

query I rowsort
SELECT - col1 FROM tab0 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab2, tab1, tab1 AS cor0, tab1

query I rowsort
SELECT - - col0 * - 49 - 53 AS col0 FROM tab2 AS cor0 NATURAL JOIN tab2 AS cor1

query I rowsort
SELECT - 8 FROM tab0 AS cor0 JOIN tab0 AS cor1

query I rowsort
SELECT - col1 - - col2 * + col1 / + cor0.col0 FROM tab1 cor0

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

query I rowsort
SELECT ALL col0 + col0 * - col1 / col2 FROM tab2

query I rowsort
SELECT ALL - 35 / + cor0.col2 AS col0 FROM tab2 cor0

query IIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 NATURAL JOIN tab0, tab0 AS cor1 USING ( col1, col2, col2 )

query I rowsort
SELECT DISTINCT - - 28 FROM tab1 AS cor0 JOIN tab2 cor1

query I rowsort
SELECT + 86 * col2 AS col2 FROM tab2 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT ALL + 34 + - 71 AS col1 FROM tab1, tab1, tab0 AS cor0, tab1

query I rowsort
SELECT ALL col2 + col1 * - 23 / col1 AS col0 FROM tab1 AS cor0

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

query I rowsort
SELECT ALL - 42 / + col2 AS col0 FROM tab2 AS cor0

query I rowsort
SELECT + col1 + + col0 FROM tab0 AS cor0 NATURAL LEFT JOIN tab2 AS cor1

query IIIII rowsort
SELECT * FROM tab2 AS cor0 LEFT JOIN tab1 AS cor1 USING ( col2 )

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

query I rowsort
SELECT ALL + col1 + cor0.col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT DISTINCT + 72 + col2 AS col1 FROM tab0 AS cor0 NATURAL JOIN tab2 cor1

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

query IIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 INNER JOIN tab2, tab0 AS cor1 USING ( col0 )

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 INNER JOIN tab1, tab2 AS cor1

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 JOIN tab2, tab0 AS cor1

query I rowsort
SELECT ALL - + 26 AS col0 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

query I rowsort
SELECT ALL - + 83 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab0, tab1 cor2

query I rowsort
SELECT col2 * col1 / col2 + col2 + + 0 FROM tab2 cor0

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 JOIN tab2 USING ( col2, col2, col0, col0, col1, col0, col0 )

query I rowsort
SELECT DISTINCT - col1 / + col2 col0 FROM tab2

query I rowsort
SELECT ALL col1 * + col0 / - 2 + ( - col2 ) * col2 * - col2 AS col1 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT + + col0 / col2 + - 17 * - 25 col2 FROM tab2 AS cor0

query I rowsort
SELECT DISTINCT - 69 * + cor0.col2 / col1 FROM tab1 AS cor0

query I rowsort
SELECT ALL + + col0 + col1 / col2 AS col1 FROM tab2 AS cor0

query IIIII rowsort
SELECT ALL * FROM tab0 AS cor0 JOIN tab0 cor1 USING ( col2 )

query I rowsort
SELECT ALL col1 * col1 + - col0 AS col2 FROM tab1 AS cor0 NATURAL JOIN tab0 AS cor1

query I rowsort
SELECT DISTINCT - cor1.col0 AS col1 FROM tab1 cor0 JOIN tab0 AS cor1 USING ( col1 )

query IIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 INNER JOIN tab1, tab1 AS cor1 USING ( col0 )

query I rowsort
SELECT + tab1.col2 * - col1 / col0 FROM tab1

query IIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 NATURAL JOIN tab2 cor1

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

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

query I rowsort
SELECT ALL - col0 * col1 FROM tab0 cor0 NATURAL INNER JOIN tab0 AS cor1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 INNER JOIN tab0 AS cor1

query I rowsort
SELECT + 91 FROM tab2, tab2, tab2 AS cor0

query I rowsort
SELECT - col0 + + col2 AS col0 FROM tab2 cor0 NATURAL JOIN tab2 AS cor1

query IIIIIII rowsort
SELECT * FROM tab0 AS cor0 JOIN tab0, tab0 AS cor1 USING ( col1, col2 )

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab0 AS cor0 NATURAL JOIN tab1 AS cor1

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

skip