hash-threshold 8

statement ok
CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT)

statement ok
INSERT INTO tab0 VALUES(0,71,77.22,'npogi',4,9.45,'zoayf')

statement ok
INSERT INTO tab0 VALUES(1,57,38.62,'gakbm',76,49.58,'kkxld')

statement ok
INSERT INTO tab0 VALUES(2,89,41.95,'agiin',59,63.91,'mgyqt')

statement ok
INSERT INTO tab0 VALUES(3,5,69.66,'usrpp',75,80.47,'iqdch')

statement ok
INSERT INTO tab0 VALUES(4,92,64.38,'xhfvn',53,22.52,'obguo')

statement ok
INSERT INTO tab0 VALUES(5,97,93.3,'ypwqj',34,66.65,'phokh')

statement ok
INSERT INTO tab0 VALUES(6,36,9.92,'fvkfd',88,6.96,'lmihc')

statement ok
INSERT INTO tab0 VALUES(7,9,12.94,'jexsi',25,15.13,'jbrvw')

statement ok
INSERT INTO tab0 VALUES(8,14,15.61,'csmep',7,11.57,'kbygl')

statement ok
INSERT INTO tab0 VALUES(9,56,5.26,'rtyqm',62,14.56,'zhlai')

statement ok
CREATE TABLE tab1(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT)

statement ok
CREATE INDEX idx_tab1_0 on tab1 (col0)

statement ok
CREATE INDEX idx_tab1_1 on tab1 (col1)

statement ok
CREATE INDEX idx_tab1_3 on tab1 (col3)

statement ok
CREATE INDEX idx_tab1_4 on tab1 (col4)

statement ok
INSERT INTO tab1 SELECT * FROM tab0

statement ok
CREATE TABLE tab2(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT)

statement ok
CREATE UNIQUE INDEX idx_tab2_0 ON tab2 (col0,col4)

statement ok
CREATE INDEX idx_tab2_2 ON tab2 (col1 DESC,col3)

statement ok
CREATE UNIQUE INDEX idx_tab2_3 ON tab2 (col1,col4 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab2_5 ON tab2 (col1 DESC,col0)

statement ok
INSERT INTO tab2 SELECT * FROM tab0

statement ok
CREATE TABLE tab3(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT)

statement ok
CREATE INDEX idx_tab3_0 ON tab3 (col3,col1 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab3_3 ON tab3 (col0)

statement ok
CREATE INDEX idx_tab3_4 ON tab3 (col1,col4)

statement ok
INSERT INTO tab3 SELECT * FROM tab0

statement ok
CREATE TABLE tab4(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT)

statement ok
CREATE UNIQUE INDEX idx_tab4_0 ON tab4 (col1)

statement ok
CREATE UNIQUE INDEX idx_tab4_1 ON tab4 (col0 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab4_3 ON tab4 (col4 DESC)

statement ok
CREATE INDEX idx_tab4_5 ON tab4 (col3 DESC)

statement ok
INSERT INTO tab4 SELECT * FROM tab0

query I rowsort label-empty
SELECT pk FROM tab0 WHERE pk IS NULL
----

query II rowsort label-all
SELECT pk, col0 FROM tab0
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1009') DROP VIEW view_1_tab0_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1009') DROP VIEW view_2_tab0_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1009') DROP VIEW view_3_tab0_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1009

statement ok
CREATE VIEW view_1_tab0_1009 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14

statement ok
CREATE VIEW view_2_tab0_1009 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)

statement ok
CREATE VIEW view_3_tab0_1009 AS SELECT pk FROM view_1_tab0_1009

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
0
71
5
97

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_1009
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_1009
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1009 UNION ALL SELECT pk, col0 FROM view_2_tab0_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1009 UNION SELECT pk, col0 FROM view_2_tab0_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 ) AS tab0_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT * FROM view_3_tab0_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1009

statement ok
DROP VIEW view_2_tab0_1009

statement ok
DROP VIEW view_3_tab0_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1009') DROP VIEW view_1_tab1_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1009') DROP VIEW view_2_tab1_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1009') DROP VIEW view_3_tab1_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1009

statement ok
CREATE VIEW view_1_tab1_1009 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14

statement ok
CREATE VIEW view_2_tab1_1009 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)

statement ok
CREATE VIEW view_3_tab1_1009 AS SELECT pk FROM view_1_tab1_1009

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
0
71
5
97

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_1009
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_1009
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1009 UNION ALL SELECT pk, col0 FROM view_2_tab1_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1009 UNION SELECT pk, col0 FROM view_2_tab1_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 ) AS tab1_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT * FROM view_3_tab1_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1009

statement ok
DROP VIEW view_2_tab1_1009

statement ok
DROP VIEW view_3_tab1_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1009') DROP VIEW view_1_tab2_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1009') DROP VIEW view_2_tab2_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1009') DROP VIEW view_3_tab2_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1009

statement ok
CREATE VIEW view_1_tab2_1009 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14

statement ok
CREATE VIEW view_2_tab2_1009 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)

statement ok
CREATE VIEW view_3_tab2_1009 AS SELECT pk FROM view_1_tab2_1009

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
0
71
5
97

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_1009
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_1009
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1009 UNION ALL SELECT pk, col0 FROM view_2_tab2_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1009 UNION SELECT pk, col0 FROM view_2_tab2_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 ) AS tab2_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT * FROM view_3_tab2_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1009

statement ok
DROP VIEW view_2_tab2_1009

statement ok
DROP VIEW view_3_tab2_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1009') DROP VIEW view_1_tab3_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1009') DROP VIEW view_2_tab3_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1009') DROP VIEW view_3_tab3_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1009

statement ok
CREATE VIEW view_1_tab3_1009 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14

statement ok
CREATE VIEW view_2_tab3_1009 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)

statement ok
CREATE VIEW view_3_tab3_1009 AS SELECT pk FROM view_1_tab3_1009

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
0
71
5
97

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_1009
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_1009
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1009 UNION ALL SELECT pk, col0 FROM view_2_tab3_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1009 UNION SELECT pk, col0 FROM view_2_tab3_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 ) AS tab3_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT * FROM view_3_tab3_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1009

statement ok
DROP VIEW view_2_tab3_1009

statement ok
DROP VIEW view_3_tab3_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1009') DROP VIEW view_1_tab4_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1009') DROP VIEW view_2_tab4_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1009') DROP VIEW view_3_tab4_1009

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1009

statement ok
CREATE VIEW view_1_tab4_1009 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14

statement ok
CREATE VIEW view_2_tab4_1009 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)

statement ok
CREATE VIEW view_3_tab4_1009 AS SELECT pk FROM view_1_tab4_1009

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
0
71
5
97

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_1009
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_1009
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1009 UNION ALL SELECT pk, col0 FROM view_2_tab4_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1009 UNION SELECT pk, col0 FROM view_2_tab4_1009
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14 ) AS tab4_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT * FROM view_3_tab4_1009
----
1
2
3
4
6
7
8
9

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE (col3 > 2 AND col3 >= 92) AND col1 <= 41.49 OR col1 < 72.14
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1009

statement ok
DROP VIEW view_2_tab4_1009

statement ok
DROP VIEW view_3_tab4_1009

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1012') DROP VIEW view_1_tab0_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1012') DROP VIEW view_2_tab0_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1012') DROP VIEW view_3_tab0_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1012

statement ok
CREATE VIEW view_1_tab0_1012 AS SELECT pk, col0 FROM tab0 WHERE col0 < 50

statement ok
CREATE VIEW view_2_tab0_1012 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 50)

statement ok
CREATE VIEW view_3_tab0_1012 AS SELECT pk FROM view_1_tab0_1012

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE col0 < 50
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 50)
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_1012
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_1012
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 50 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1012 UNION ALL SELECT pk, col0 FROM view_2_tab0_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 50 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1012 UNION SELECT pk, col0 FROM view_2_tab0_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 50 ) AS tab0_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT * FROM view_3_tab0_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col0 < 50
----
3
6
7
8

statement ok
DROP VIEW view_1_tab0_1012

statement ok
DROP VIEW view_2_tab0_1012

statement ok
DROP VIEW view_3_tab0_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1012') DROP VIEW view_1_tab1_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1012') DROP VIEW view_2_tab1_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1012') DROP VIEW view_3_tab1_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1012

statement ok
CREATE VIEW view_1_tab1_1012 AS SELECT pk, col0 FROM tab1 WHERE col0 < 50

statement ok
CREATE VIEW view_2_tab1_1012 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 50)

statement ok
CREATE VIEW view_3_tab1_1012 AS SELECT pk FROM view_1_tab1_1012

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE col0 < 50
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 50)
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_1012
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_1012
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 50 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1012 UNION ALL SELECT pk, col0 FROM view_2_tab1_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 50 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1012 UNION SELECT pk, col0 FROM view_2_tab1_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 50 ) AS tab1_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT * FROM view_3_tab1_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col0 < 50
----
3
6
7
8

statement ok
DROP VIEW view_1_tab1_1012

statement ok
DROP VIEW view_2_tab1_1012

statement ok
DROP VIEW view_3_tab1_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1012') DROP VIEW view_1_tab2_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1012') DROP VIEW view_2_tab2_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1012') DROP VIEW view_3_tab2_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1012

statement ok
CREATE VIEW view_1_tab2_1012 AS SELECT pk, col0 FROM tab2 WHERE col0 < 50

statement ok
CREATE VIEW view_2_tab2_1012 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 50)

statement ok
CREATE VIEW view_3_tab2_1012 AS SELECT pk FROM view_1_tab2_1012

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE col0 < 50
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 50)
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_1012
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_1012
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 50 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1012 UNION ALL SELECT pk, col0 FROM view_2_tab2_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 50 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1012 UNION SELECT pk, col0 FROM view_2_tab2_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 50 ) AS tab2_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT * FROM view_3_tab2_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col0 < 50
----
3
6
7
8

statement ok
DROP VIEW view_1_tab2_1012

statement ok
DROP VIEW view_2_tab2_1012

statement ok
DROP VIEW view_3_tab2_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1012') DROP VIEW view_1_tab3_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1012') DROP VIEW view_2_tab3_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1012') DROP VIEW view_3_tab3_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1012

statement ok
CREATE VIEW view_1_tab3_1012 AS SELECT pk, col0 FROM tab3 WHERE col0 < 50

statement ok
CREATE VIEW view_2_tab3_1012 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 50)

statement ok
CREATE VIEW view_3_tab3_1012 AS SELECT pk FROM view_1_tab3_1012

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE col0 < 50
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 50)
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_1012
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_1012
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 50 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1012 UNION ALL SELECT pk, col0 FROM view_2_tab3_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 50 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1012 UNION SELECT pk, col0 FROM view_2_tab3_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 50 ) AS tab3_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT * FROM view_3_tab3_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col0 < 50
----
3
6
7
8

statement ok
DROP VIEW view_1_tab3_1012

statement ok
DROP VIEW view_2_tab3_1012

statement ok
DROP VIEW view_3_tab3_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1012') DROP VIEW view_1_tab4_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1012') DROP VIEW view_2_tab4_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1012') DROP VIEW view_3_tab4_1012

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1012

statement ok
CREATE VIEW view_1_tab4_1012 AS SELECT pk, col0 FROM tab4 WHERE col0 < 50

statement ok
CREATE VIEW view_2_tab4_1012 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 50)

statement ok
CREATE VIEW view_3_tab4_1012 AS SELECT pk FROM view_1_tab4_1012

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE col0 < 50
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 50)
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_1012
----
3
5
6
36
7
9
8
14

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_1012
----
12 values hashing to 1e2dba45830ddaf5216a11f8042c23d5

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 50 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1012 UNION ALL SELECT pk, col0 FROM view_2_tab4_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 50 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 50)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1012 UNION SELECT pk, col0 FROM view_2_tab4_1012
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 50 ) AS tab4_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT * FROM view_3_tab4_1012
----
3
6
7
8

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col0 < 50
----
3
6
7
8

statement ok
DROP VIEW view_1_tab4_1012

statement ok
DROP VIEW view_2_tab4_1012

statement ok
DROP VIEW view_3_tab4_1012

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1013') DROP VIEW view_1_tab0_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1013') DROP VIEW view_2_tab0_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1013') DROP VIEW view_3_tab0_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1013

statement ok
CREATE VIEW view_1_tab0_1013 AS SELECT pk, col0 FROM tab0 WHERE col0 < 78

statement ok
CREATE VIEW view_2_tab0_1013 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 78)

statement ok
CREATE VIEW view_3_tab0_1013 AS SELECT pk FROM view_1_tab0_1013

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE col0 < 78
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 78)
----
2
89
4
92
5
97

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_1013
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_1013
----
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 78 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1013 UNION ALL SELECT pk, col0 FROM view_2_tab0_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 78 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1013 UNION SELECT pk, col0 FROM view_2_tab0_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 78 ) AS tab0_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT * FROM view_3_tab0_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE col0 < 78
----
0
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1013

statement ok
DROP VIEW view_2_tab0_1013

statement ok
DROP VIEW view_3_tab0_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1013') DROP VIEW view_1_tab1_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1013') DROP VIEW view_2_tab1_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1013') DROP VIEW view_3_tab1_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1013

statement ok
CREATE VIEW view_1_tab1_1013 AS SELECT pk, col0 FROM tab1 WHERE col0 < 78

statement ok
CREATE VIEW view_2_tab1_1013 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 78)

statement ok
CREATE VIEW view_3_tab1_1013 AS SELECT pk FROM view_1_tab1_1013

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE col0 < 78
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 78)
----
2
89
4
92
5
97

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_1013
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_1013
----
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 78 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1013 UNION ALL SELECT pk, col0 FROM view_2_tab1_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 78 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1013 UNION SELECT pk, col0 FROM view_2_tab1_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 78 ) AS tab1_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT * FROM view_3_tab1_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE col0 < 78
----
0
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1013

statement ok
DROP VIEW view_2_tab1_1013

statement ok
DROP VIEW view_3_tab1_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1013') DROP VIEW view_1_tab2_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1013') DROP VIEW view_2_tab2_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1013') DROP VIEW view_3_tab2_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1013

statement ok
CREATE VIEW view_1_tab2_1013 AS SELECT pk, col0 FROM tab2 WHERE col0 < 78

statement ok
CREATE VIEW view_2_tab2_1013 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 78)

statement ok
CREATE VIEW view_3_tab2_1013 AS SELECT pk FROM view_1_tab2_1013

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE col0 < 78
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 78)
----
2
89
4
92
5
97

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_1013
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_1013
----
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 78 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1013 UNION ALL SELECT pk, col0 FROM view_2_tab2_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 78 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1013 UNION SELECT pk, col0 FROM view_2_tab2_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 78 ) AS tab2_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT * FROM view_3_tab2_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE col0 < 78
----
0
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1013

statement ok
DROP VIEW view_2_tab2_1013

statement ok
DROP VIEW view_3_tab2_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1013') DROP VIEW view_1_tab3_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1013') DROP VIEW view_2_tab3_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1013') DROP VIEW view_3_tab3_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1013

statement ok
CREATE VIEW view_1_tab3_1013 AS SELECT pk, col0 FROM tab3 WHERE col0 < 78

statement ok
CREATE VIEW view_2_tab3_1013 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 78)

statement ok
CREATE VIEW view_3_tab3_1013 AS SELECT pk FROM view_1_tab3_1013

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE col0 < 78
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 78)
----
2
89
4
92
5
97

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_1013
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_1013
----
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 78 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1013 UNION ALL SELECT pk, col0 FROM view_2_tab3_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 78 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1013 UNION SELECT pk, col0 FROM view_2_tab3_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 78 ) AS tab3_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT * FROM view_3_tab3_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE col0 < 78
----
0
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1013

statement ok
DROP VIEW view_2_tab3_1013

statement ok
DROP VIEW view_3_tab3_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1013') DROP VIEW view_1_tab4_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1013') DROP VIEW view_2_tab4_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1013') DROP VIEW view_3_tab4_1013

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1013

statement ok
CREATE VIEW view_1_tab4_1013 AS SELECT pk, col0 FROM tab4 WHERE col0 < 78

statement ok
CREATE VIEW view_2_tab4_1013 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 78)

statement ok
CREATE VIEW view_3_tab4_1013 AS SELECT pk FROM view_1_tab4_1013

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE col0 < 78
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 78)
----
2
89
4
92
5
97

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_1013
----
14 values hashing to efa2948b161d03f086ec2443f381b6a4

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_1013
----
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 78 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1013 UNION ALL SELECT pk, col0 FROM view_2_tab4_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 78 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1013 UNION SELECT pk, col0 FROM view_2_tab4_1013
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 78 ) AS tab4_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT * FROM view_3_tab4_1013
----
0
1
3
6
7
8
9

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE col0 < 78
----
0
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1013

statement ok
DROP VIEW view_2_tab4_1013

statement ok
DROP VIEW view_3_tab4_1013

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1014') DROP VIEW view_1_tab0_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1014') DROP VIEW view_2_tab0_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1014') DROP VIEW view_3_tab0_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1014

statement ok
CREATE VIEW view_1_tab0_1014 AS SELECT pk, col0 FROM tab0 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89

statement ok
CREATE VIEW view_2_tab0_1014 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)

statement ok
CREATE VIEW view_3_tab0_1014 AS SELECT pk FROM view_1_tab0_1014

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_1014
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1014 UNION ALL SELECT pk, col0 FROM view_2_tab0_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1014 UNION SELECT pk, col0 FROM view_2_tab0_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 ) AS tab0_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT * FROM view_3_tab0_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1014

statement ok
DROP VIEW view_2_tab0_1014

statement ok
DROP VIEW view_3_tab0_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1014') DROP VIEW view_1_tab1_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1014') DROP VIEW view_2_tab1_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1014') DROP VIEW view_3_tab1_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1014

statement ok
CREATE VIEW view_1_tab1_1014 AS SELECT pk, col0 FROM tab1 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89

statement ok
CREATE VIEW view_2_tab1_1014 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)

statement ok
CREATE VIEW view_3_tab1_1014 AS SELECT pk FROM view_1_tab1_1014

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_1014
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1014 UNION ALL SELECT pk, col0 FROM view_2_tab1_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1014 UNION SELECT pk, col0 FROM view_2_tab1_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 ) AS tab1_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT * FROM view_3_tab1_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1014

statement ok
DROP VIEW view_2_tab1_1014

statement ok
DROP VIEW view_3_tab1_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1014') DROP VIEW view_1_tab2_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1014') DROP VIEW view_2_tab2_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1014') DROP VIEW view_3_tab2_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1014

statement ok
CREATE VIEW view_1_tab2_1014 AS SELECT pk, col0 FROM tab2 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89

statement ok
CREATE VIEW view_2_tab2_1014 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)

statement ok
CREATE VIEW view_3_tab2_1014 AS SELECT pk FROM view_1_tab2_1014

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_1014
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1014 UNION ALL SELECT pk, col0 FROM view_2_tab2_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1014 UNION SELECT pk, col0 FROM view_2_tab2_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 ) AS tab2_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT * FROM view_3_tab2_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1014

statement ok
DROP VIEW view_2_tab2_1014

statement ok
DROP VIEW view_3_tab2_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1014') DROP VIEW view_1_tab3_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1014') DROP VIEW view_2_tab3_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1014') DROP VIEW view_3_tab3_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1014

statement ok
CREATE VIEW view_1_tab3_1014 AS SELECT pk, col0 FROM tab3 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89

statement ok
CREATE VIEW view_2_tab3_1014 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)

statement ok
CREATE VIEW view_3_tab3_1014 AS SELECT pk FROM view_1_tab3_1014

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_1014
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1014 UNION ALL SELECT pk, col0 FROM view_2_tab3_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1014 UNION SELECT pk, col0 FROM view_2_tab3_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 ) AS tab3_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT * FROM view_3_tab3_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1014

statement ok
DROP VIEW view_2_tab3_1014

statement ok
DROP VIEW view_3_tab3_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1014') DROP VIEW view_1_tab4_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1014') DROP VIEW view_2_tab4_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1014') DROP VIEW view_3_tab4_1014

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1014

statement ok
CREATE VIEW view_1_tab4_1014 AS SELECT pk, col0 FROM tab4 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89

statement ok
CREATE VIEW view_2_tab4_1014 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)

statement ok
CREATE VIEW view_3_tab4_1014 AS SELECT pk FROM view_1_tab4_1014

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_1014
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1014 UNION ALL SELECT pk, col0 FROM view_2_tab4_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1014 UNION SELECT pk, col0 FROM view_2_tab4_1014
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89 ) AS tab4_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT * FROM view_3_tab4_1014
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE (col0 <= 94 OR col3 < 83) AND ((((((col0 < 5 AND (col3 < 66))))))) AND col0 IS NULL AND col1 IN (29.69) OR (col4 > 68.77) OR col0 <= 24 OR col3 <= 89
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1014

statement ok
DROP VIEW view_2_tab4_1014

statement ok
DROP VIEW view_3_tab4_1014

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1015') DROP VIEW view_1_tab0_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1015') DROP VIEW view_2_tab0_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1015') DROP VIEW view_3_tab0_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1015

statement ok
CREATE VIEW view_1_tab0_1015 AS SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 73.73 AND 33.21

statement ok
CREATE VIEW view_2_tab0_1015 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)

statement ok
CREATE VIEW view_3_tab0_1015 AS SELECT pk FROM view_1_tab0_1015

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 73.73 AND 33.21
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_1015
----

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 73.73 AND 33.21 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1015 UNION ALL SELECT pk, col0 FROM view_2_tab0_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 73.73 AND 33.21 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1015 UNION SELECT pk, col0 FROM view_2_tab0_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 73.73 AND 33.21 ) AS tab0_1015
----

query I rowsort label-400-3
SELECT * FROM view_3_tab0_1015
----

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE col4 BETWEEN 73.73 AND 33.21
----

statement ok
DROP VIEW view_1_tab0_1015

statement ok
DROP VIEW view_2_tab0_1015

statement ok
DROP VIEW view_3_tab0_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1015') DROP VIEW view_1_tab1_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1015') DROP VIEW view_2_tab1_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1015') DROP VIEW view_3_tab1_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1015

statement ok
CREATE VIEW view_1_tab1_1015 AS SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 73.73 AND 33.21

statement ok
CREATE VIEW view_2_tab1_1015 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)

statement ok
CREATE VIEW view_3_tab1_1015 AS SELECT pk FROM view_1_tab1_1015

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 73.73 AND 33.21
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_1015
----

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 73.73 AND 33.21 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1015 UNION ALL SELECT pk, col0 FROM view_2_tab1_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 73.73 AND 33.21 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1015 UNION SELECT pk, col0 FROM view_2_tab1_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 73.73 AND 33.21 ) AS tab1_1015
----

query I rowsort label-400-3
SELECT * FROM view_3_tab1_1015
----

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE col4 BETWEEN 73.73 AND 33.21
----

statement ok
DROP VIEW view_1_tab1_1015

statement ok
DROP VIEW view_2_tab1_1015

statement ok
DROP VIEW view_3_tab1_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1015') DROP VIEW view_1_tab2_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1015') DROP VIEW view_2_tab2_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1015') DROP VIEW view_3_tab2_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1015

statement ok
CREATE VIEW view_1_tab2_1015 AS SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 73.73 AND 33.21

statement ok
CREATE VIEW view_2_tab2_1015 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)

statement ok
CREATE VIEW view_3_tab2_1015 AS SELECT pk FROM view_1_tab2_1015

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 73.73 AND 33.21
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_1015
----

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 73.73 AND 33.21 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1015 UNION ALL SELECT pk, col0 FROM view_2_tab2_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 73.73 AND 33.21 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1015 UNION SELECT pk, col0 FROM view_2_tab2_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 73.73 AND 33.21 ) AS tab2_1015
----

query I rowsort label-400-3
SELECT * FROM view_3_tab2_1015
----

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE col4 BETWEEN 73.73 AND 33.21
----

statement ok
DROP VIEW view_1_tab2_1015

statement ok
DROP VIEW view_2_tab2_1015

statement ok
DROP VIEW view_3_tab2_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1015') DROP VIEW view_1_tab3_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1015') DROP VIEW view_2_tab3_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1015') DROP VIEW view_3_tab3_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1015

statement ok
CREATE VIEW view_1_tab3_1015 AS SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 73.73 AND 33.21

statement ok
CREATE VIEW view_2_tab3_1015 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)

statement ok
CREATE VIEW view_3_tab3_1015 AS SELECT pk FROM view_1_tab3_1015

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 73.73 AND 33.21
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_1015
----

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 73.73 AND 33.21 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1015 UNION ALL SELECT pk, col0 FROM view_2_tab3_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 73.73 AND 33.21 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1015 UNION SELECT pk, col0 FROM view_2_tab3_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 73.73 AND 33.21 ) AS tab3_1015
----

query I rowsort label-400-3
SELECT * FROM view_3_tab3_1015
----

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE col4 BETWEEN 73.73 AND 33.21
----

statement ok
DROP VIEW view_1_tab3_1015

statement ok
DROP VIEW view_2_tab3_1015

statement ok
DROP VIEW view_3_tab3_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1015') DROP VIEW view_1_tab4_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1015') DROP VIEW view_2_tab4_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1015') DROP VIEW view_3_tab4_1015

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1015

statement ok
CREATE VIEW view_1_tab4_1015 AS SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 73.73 AND 33.21

statement ok
CREATE VIEW view_2_tab4_1015 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)

statement ok
CREATE VIEW view_3_tab4_1015 AS SELECT pk FROM view_1_tab4_1015

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 73.73 AND 33.21
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_1015
----

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 73.73 AND 33.21 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1015 UNION ALL SELECT pk, col0 FROM view_2_tab4_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 73.73 AND 33.21 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 73.73 AND 33.21)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1015 UNION SELECT pk, col0 FROM view_2_tab4_1015
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 73.73 AND 33.21 ) AS tab4_1015
----

query I rowsort label-400-3
SELECT * FROM view_3_tab4_1015
----

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE col4 BETWEEN 73.73 AND 33.21
----

statement ok
DROP VIEW view_1_tab4_1015

statement ok
DROP VIEW view_2_tab4_1015

statement ok
DROP VIEW view_3_tab4_1015

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1016') DROP VIEW view_1_tab0_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1016') DROP VIEW view_2_tab0_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1016') DROP VIEW view_3_tab0_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1016

statement ok
CREATE VIEW view_1_tab0_1016 AS SELECT pk, col0 FROM tab0 WHERE col0 > 58

statement ok
CREATE VIEW view_2_tab0_1016 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 58)

statement ok
CREATE VIEW view_3_tab0_1016 AS SELECT pk FROM view_1_tab0_1016

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col0 > 58
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 58)
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_1016
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_1016
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 58 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1016 UNION ALL SELECT pk, col0 FROM view_2_tab0_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 58 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1016 UNION SELECT pk, col0 FROM view_2_tab0_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 58 ) AS tab0_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT * FROM view_3_tab0_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col0 > 58
----
0
2
4
5

statement ok
DROP VIEW view_1_tab0_1016

statement ok
DROP VIEW view_2_tab0_1016

statement ok
DROP VIEW view_3_tab0_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1016') DROP VIEW view_1_tab1_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1016') DROP VIEW view_2_tab1_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1016') DROP VIEW view_3_tab1_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1016

statement ok
CREATE VIEW view_1_tab1_1016 AS SELECT pk, col0 FROM tab1 WHERE col0 > 58

statement ok
CREATE VIEW view_2_tab1_1016 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 58)

statement ok
CREATE VIEW view_3_tab1_1016 AS SELECT pk FROM view_1_tab1_1016

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col0 > 58
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 58)
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_1016
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_1016
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 58 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1016 UNION ALL SELECT pk, col0 FROM view_2_tab1_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 58 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1016 UNION SELECT pk, col0 FROM view_2_tab1_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 58 ) AS tab1_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT * FROM view_3_tab1_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col0 > 58
----
0
2
4
5

statement ok
DROP VIEW view_1_tab1_1016

statement ok
DROP VIEW view_2_tab1_1016

statement ok
DROP VIEW view_3_tab1_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1016') DROP VIEW view_1_tab2_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1016') DROP VIEW view_2_tab2_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1016') DROP VIEW view_3_tab2_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1016

statement ok
CREATE VIEW view_1_tab2_1016 AS SELECT pk, col0 FROM tab2 WHERE col0 > 58

statement ok
CREATE VIEW view_2_tab2_1016 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 58)

statement ok
CREATE VIEW view_3_tab2_1016 AS SELECT pk FROM view_1_tab2_1016

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col0 > 58
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 58)
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_1016
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_1016
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 58 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1016 UNION ALL SELECT pk, col0 FROM view_2_tab2_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 58 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1016 UNION SELECT pk, col0 FROM view_2_tab2_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 58 ) AS tab2_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT * FROM view_3_tab2_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col0 > 58
----
0
2
4
5

statement ok
DROP VIEW view_1_tab2_1016

statement ok
DROP VIEW view_2_tab2_1016

statement ok
DROP VIEW view_3_tab2_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1016') DROP VIEW view_1_tab3_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1016') DROP VIEW view_2_tab3_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1016') DROP VIEW view_3_tab3_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1016

statement ok
CREATE VIEW view_1_tab3_1016 AS SELECT pk, col0 FROM tab3 WHERE col0 > 58

statement ok
CREATE VIEW view_2_tab3_1016 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 58)

statement ok
CREATE VIEW view_3_tab3_1016 AS SELECT pk FROM view_1_tab3_1016

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col0 > 58
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 58)
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_1016
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_1016
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 58 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1016 UNION ALL SELECT pk, col0 FROM view_2_tab3_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 58 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1016 UNION SELECT pk, col0 FROM view_2_tab3_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 58 ) AS tab3_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT * FROM view_3_tab3_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col0 > 58
----
0
2
4
5

statement ok
DROP VIEW view_1_tab3_1016

statement ok
DROP VIEW view_2_tab3_1016

statement ok
DROP VIEW view_3_tab3_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1016') DROP VIEW view_1_tab4_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1016') DROP VIEW view_2_tab4_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1016') DROP VIEW view_3_tab4_1016

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1016

statement ok
CREATE VIEW view_1_tab4_1016 AS SELECT pk, col0 FROM tab4 WHERE col0 > 58

statement ok
CREATE VIEW view_2_tab4_1016 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 58)

statement ok
CREATE VIEW view_3_tab4_1016 AS SELECT pk FROM view_1_tab4_1016

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col0 > 58
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 58)
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_1016
----
0
71
2
89
4
92
5
97

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_1016
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 58 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1016 UNION ALL SELECT pk, col0 FROM view_2_tab4_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 58 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 58)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1016 UNION SELECT pk, col0 FROM view_2_tab4_1016
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 58 ) AS tab4_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT * FROM view_3_tab4_1016
----
0
2
4
5

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col0 > 58
----
0
2
4
5

statement ok
DROP VIEW view_1_tab4_1016

statement ok
DROP VIEW view_2_tab4_1016

statement ok
DROP VIEW view_3_tab4_1016

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1017') DROP VIEW view_1_tab0_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1017') DROP VIEW view_2_tab0_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1017') DROP VIEW view_3_tab0_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1017

statement ok
CREATE VIEW view_1_tab0_1017 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 2)

statement ok
CREATE VIEW view_2_tab0_1017 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 2))

statement ok
CREATE VIEW view_3_tab0_1017 AS SELECT pk FROM view_1_tab0_1017

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 2)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 2))
----

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_1017
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 2) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1017 UNION ALL SELECT pk, col0 FROM view_2_tab0_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 2) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1017 UNION SELECT pk, col0 FROM view_2_tab0_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 2) ) AS tab0_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT * FROM view_3_tab0_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE (col0 >= 2)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1017

statement ok
DROP VIEW view_2_tab0_1017

statement ok
DROP VIEW view_3_tab0_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1017') DROP VIEW view_1_tab1_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1017') DROP VIEW view_2_tab1_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1017') DROP VIEW view_3_tab1_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1017

statement ok
CREATE VIEW view_1_tab1_1017 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 2)

statement ok
CREATE VIEW view_2_tab1_1017 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 2))

statement ok
CREATE VIEW view_3_tab1_1017 AS SELECT pk FROM view_1_tab1_1017

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 2)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 2))
----

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_1017
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 2) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1017 UNION ALL SELECT pk, col0 FROM view_2_tab1_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 2) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1017 UNION SELECT pk, col0 FROM view_2_tab1_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 2) ) AS tab1_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT * FROM view_3_tab1_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE (col0 >= 2)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1017

statement ok
DROP VIEW view_2_tab1_1017

statement ok
DROP VIEW view_3_tab1_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1017') DROP VIEW view_1_tab2_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1017') DROP VIEW view_2_tab2_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1017') DROP VIEW view_3_tab2_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1017

statement ok
CREATE VIEW view_1_tab2_1017 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 2)

statement ok
CREATE VIEW view_2_tab2_1017 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 2))

statement ok
CREATE VIEW view_3_tab2_1017 AS SELECT pk FROM view_1_tab2_1017

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 2)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 2))
----

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_1017
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 2) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1017 UNION ALL SELECT pk, col0 FROM view_2_tab2_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 2) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1017 UNION SELECT pk, col0 FROM view_2_tab2_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 2) ) AS tab2_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT * FROM view_3_tab2_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE (col0 >= 2)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1017

statement ok
DROP VIEW view_2_tab2_1017

statement ok
DROP VIEW view_3_tab2_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1017') DROP VIEW view_1_tab3_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1017') DROP VIEW view_2_tab3_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1017') DROP VIEW view_3_tab3_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1017

statement ok
CREATE VIEW view_1_tab3_1017 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 2)

statement ok
CREATE VIEW view_2_tab3_1017 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 2))

statement ok
CREATE VIEW view_3_tab3_1017 AS SELECT pk FROM view_1_tab3_1017

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 2)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 2))
----

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_1017
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 2) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1017 UNION ALL SELECT pk, col0 FROM view_2_tab3_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 2) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1017 UNION SELECT pk, col0 FROM view_2_tab3_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 2) ) AS tab3_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT * FROM view_3_tab3_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE (col0 >= 2)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1017

statement ok
DROP VIEW view_2_tab3_1017

statement ok
DROP VIEW view_3_tab3_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1017') DROP VIEW view_1_tab4_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1017') DROP VIEW view_2_tab4_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1017') DROP VIEW view_3_tab4_1017

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1017

statement ok
CREATE VIEW view_1_tab4_1017 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 2)

statement ok
CREATE VIEW view_2_tab4_1017 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 2))

statement ok
CREATE VIEW view_3_tab4_1017 AS SELECT pk FROM view_1_tab4_1017

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 2)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 2))
----

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_1017
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 2) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1017 UNION ALL SELECT pk, col0 FROM view_2_tab4_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 2) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 2))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1017 UNION SELECT pk, col0 FROM view_2_tab4_1017
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 2) ) AS tab4_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT * FROM view_3_tab4_1017
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE (col0 >= 2)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1017

statement ok
DROP VIEW view_2_tab4_1017

statement ok
DROP VIEW view_3_tab4_1017

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1018') DROP VIEW view_1_tab0_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1018') DROP VIEW view_2_tab0_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1018') DROP VIEW view_3_tab0_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1018

statement ok
CREATE VIEW view_1_tab0_1018 AS SELECT pk, col0 FROM tab0 WHERE col0 < 63

statement ok
CREATE VIEW view_2_tab0_1018 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 63)

statement ok
CREATE VIEW view_3_tab0_1018 AS SELECT pk FROM view_1_tab0_1018

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE col0 < 63
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 63)
----
0
71
2
89
4
92
5
97

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab0_1018
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_1018
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 63 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1018 UNION ALL SELECT pk, col0 FROM view_2_tab0_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 63 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1018 UNION SELECT pk, col0 FROM view_2_tab0_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 63 ) AS tab0_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT * FROM view_3_tab0_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE col0 < 63
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1018

statement ok
DROP VIEW view_2_tab0_1018

statement ok
DROP VIEW view_3_tab0_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1018') DROP VIEW view_1_tab1_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1018') DROP VIEW view_2_tab1_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1018') DROP VIEW view_3_tab1_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1018

statement ok
CREATE VIEW view_1_tab1_1018 AS SELECT pk, col0 FROM tab1 WHERE col0 < 63

statement ok
CREATE VIEW view_2_tab1_1018 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 63)

statement ok
CREATE VIEW view_3_tab1_1018 AS SELECT pk FROM view_1_tab1_1018

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE col0 < 63
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 63)
----
0
71
2
89
4
92
5
97

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab1_1018
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_1018
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 63 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1018 UNION ALL SELECT pk, col0 FROM view_2_tab1_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 63 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1018 UNION SELECT pk, col0 FROM view_2_tab1_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 63 ) AS tab1_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT * FROM view_3_tab1_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE col0 < 63
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1018

statement ok
DROP VIEW view_2_tab1_1018

statement ok
DROP VIEW view_3_tab1_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1018') DROP VIEW view_1_tab2_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1018') DROP VIEW view_2_tab2_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1018') DROP VIEW view_3_tab2_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1018

statement ok
CREATE VIEW view_1_tab2_1018 AS SELECT pk, col0 FROM tab2 WHERE col0 < 63

statement ok
CREATE VIEW view_2_tab2_1018 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 63)

statement ok
CREATE VIEW view_3_tab2_1018 AS SELECT pk FROM view_1_tab2_1018

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE col0 < 63
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 63)
----
0
71
2
89
4
92
5
97

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab2_1018
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_1018
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 63 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1018 UNION ALL SELECT pk, col0 FROM view_2_tab2_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 63 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1018 UNION SELECT pk, col0 FROM view_2_tab2_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 63 ) AS tab2_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT * FROM view_3_tab2_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE col0 < 63
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1018

statement ok
DROP VIEW view_2_tab2_1018

statement ok
DROP VIEW view_3_tab2_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1018') DROP VIEW view_1_tab3_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1018') DROP VIEW view_2_tab3_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1018') DROP VIEW view_3_tab3_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1018

statement ok
CREATE VIEW view_1_tab3_1018 AS SELECT pk, col0 FROM tab3 WHERE col0 < 63

statement ok
CREATE VIEW view_2_tab3_1018 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 63)

statement ok
CREATE VIEW view_3_tab3_1018 AS SELECT pk FROM view_1_tab3_1018

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE col0 < 63
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 63)
----
0
71
2
89
4
92
5
97

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab3_1018
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_1018
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 63 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1018 UNION ALL SELECT pk, col0 FROM view_2_tab3_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 63 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1018 UNION SELECT pk, col0 FROM view_2_tab3_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 63 ) AS tab3_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT * FROM view_3_tab3_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE col0 < 63
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1018

statement ok
DROP VIEW view_2_tab3_1018

statement ok
DROP VIEW view_3_tab3_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1018') DROP VIEW view_1_tab4_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1018') DROP VIEW view_2_tab4_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1018') DROP VIEW view_3_tab4_1018

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1018

statement ok
CREATE VIEW view_1_tab4_1018 AS SELECT pk, col0 FROM tab4 WHERE col0 < 63

statement ok
CREATE VIEW view_2_tab4_1018 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 63)

statement ok
CREATE VIEW view_3_tab4_1018 AS SELECT pk FROM view_1_tab4_1018

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE col0 < 63
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 63)
----
0
71
2
89
4
92
5
97

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab4_1018
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_1018
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 63 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1018 UNION ALL SELECT pk, col0 FROM view_2_tab4_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 63 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 63)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1018 UNION SELECT pk, col0 FROM view_2_tab4_1018
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 63 ) AS tab4_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT * FROM view_3_tab4_1018
----
1
3
6
7
8
9

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE col0 < 63
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1018

statement ok
DROP VIEW view_2_tab4_1018

statement ok
DROP VIEW view_3_tab4_1018

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1019') DROP VIEW view_1_tab0_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1019') DROP VIEW view_2_tab0_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1019') DROP VIEW view_3_tab0_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1019

statement ok
CREATE VIEW view_1_tab0_1019 AS SELECT pk, col0 FROM tab0 WHERE col0 IN (93,81,44,3,48,11)

statement ok
CREATE VIEW view_2_tab0_1019 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (93,81,44,3,48,11))

statement ok
CREATE VIEW view_3_tab0_1019 AS SELECT pk FROM view_1_tab0_1019

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE col0 IN (93,81,44,3,48,11)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_1019
----

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (93,81,44,3,48,11) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1019 UNION ALL SELECT pk, col0 FROM view_2_tab0_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (93,81,44,3,48,11) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1019 UNION SELECT pk, col0 FROM view_2_tab0_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IN (93,81,44,3,48,11) ) AS tab0_1019
----

query I rowsort label-800-3
SELECT * FROM view_3_tab0_1019
----

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE col0 IN (93,81,44,3,48,11)
----

statement ok
DROP VIEW view_1_tab0_1019

statement ok
DROP VIEW view_2_tab0_1019

statement ok
DROP VIEW view_3_tab0_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1019') DROP VIEW view_1_tab1_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1019') DROP VIEW view_2_tab1_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1019') DROP VIEW view_3_tab1_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1019

statement ok
CREATE VIEW view_1_tab1_1019 AS SELECT pk, col0 FROM tab1 WHERE col0 IN (93,81,44,3,48,11)

statement ok
CREATE VIEW view_2_tab1_1019 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (93,81,44,3,48,11))

statement ok
CREATE VIEW view_3_tab1_1019 AS SELECT pk FROM view_1_tab1_1019

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE col0 IN (93,81,44,3,48,11)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_1019
----

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (93,81,44,3,48,11) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1019 UNION ALL SELECT pk, col0 FROM view_2_tab1_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (93,81,44,3,48,11) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1019 UNION SELECT pk, col0 FROM view_2_tab1_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IN (93,81,44,3,48,11) ) AS tab1_1019
----

query I rowsort label-800-3
SELECT * FROM view_3_tab1_1019
----

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE col0 IN (93,81,44,3,48,11)
----

statement ok
DROP VIEW view_1_tab1_1019

statement ok
DROP VIEW view_2_tab1_1019

statement ok
DROP VIEW view_3_tab1_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1019') DROP VIEW view_1_tab2_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1019') DROP VIEW view_2_tab2_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1019') DROP VIEW view_3_tab2_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1019

statement ok
CREATE VIEW view_1_tab2_1019 AS SELECT pk, col0 FROM tab2 WHERE col0 IN (93,81,44,3,48,11)

statement ok
CREATE VIEW view_2_tab2_1019 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (93,81,44,3,48,11))

statement ok
CREATE VIEW view_3_tab2_1019 AS SELECT pk FROM view_1_tab2_1019

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE col0 IN (93,81,44,3,48,11)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_1019
----

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (93,81,44,3,48,11) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1019 UNION ALL SELECT pk, col0 FROM view_2_tab2_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (93,81,44,3,48,11) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1019 UNION SELECT pk, col0 FROM view_2_tab2_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IN (93,81,44,3,48,11) ) AS tab2_1019
----

query I rowsort label-800-3
SELECT * FROM view_3_tab2_1019
----

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE col0 IN (93,81,44,3,48,11)
----

statement ok
DROP VIEW view_1_tab2_1019

statement ok
DROP VIEW view_2_tab2_1019

statement ok
DROP VIEW view_3_tab2_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1019') DROP VIEW view_1_tab3_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1019') DROP VIEW view_2_tab3_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1019') DROP VIEW view_3_tab3_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1019

statement ok
CREATE VIEW view_1_tab3_1019 AS SELECT pk, col0 FROM tab3 WHERE col0 IN (93,81,44,3,48,11)

statement ok
CREATE VIEW view_2_tab3_1019 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (93,81,44,3,48,11))

statement ok
CREATE VIEW view_3_tab3_1019 AS SELECT pk FROM view_1_tab3_1019

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE col0 IN (93,81,44,3,48,11)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_1019
----

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (93,81,44,3,48,11) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1019 UNION ALL SELECT pk, col0 FROM view_2_tab3_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (93,81,44,3,48,11) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1019 UNION SELECT pk, col0 FROM view_2_tab3_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IN (93,81,44,3,48,11) ) AS tab3_1019
----

query I rowsort label-800-3
SELECT * FROM view_3_tab3_1019
----

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE col0 IN (93,81,44,3,48,11)
----

statement ok
DROP VIEW view_1_tab3_1019

statement ok
DROP VIEW view_2_tab3_1019

statement ok
DROP VIEW view_3_tab3_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1019') DROP VIEW view_1_tab4_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1019') DROP VIEW view_2_tab4_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1019') DROP VIEW view_3_tab4_1019

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1019

statement ok
CREATE VIEW view_1_tab4_1019 AS SELECT pk, col0 FROM tab4 WHERE col0 IN (93,81,44,3,48,11)

statement ok
CREATE VIEW view_2_tab4_1019 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (93,81,44,3,48,11))

statement ok
CREATE VIEW view_3_tab4_1019 AS SELECT pk FROM view_1_tab4_1019

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE col0 IN (93,81,44,3,48,11)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_1019
----

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (93,81,44,3,48,11) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1019 UNION ALL SELECT pk, col0 FROM view_2_tab4_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (93,81,44,3,48,11) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (93,81,44,3,48,11))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1019 UNION SELECT pk, col0 FROM view_2_tab4_1019
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IN (93,81,44,3,48,11) ) AS tab4_1019
----

query I rowsort label-800-3
SELECT * FROM view_3_tab4_1019
----

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE col0 IN (93,81,44,3,48,11)
----

statement ok
DROP VIEW view_1_tab4_1019

statement ok
DROP VIEW view_2_tab4_1019

statement ok
DROP VIEW view_3_tab4_1019

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1020') DROP VIEW view_1_tab0_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1020') DROP VIEW view_2_tab0_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1020') DROP VIEW view_3_tab0_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1020

statement ok
CREATE VIEW view_1_tab0_1020 AS SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)

statement ok
CREATE VIEW view_2_tab0_1020 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))

statement ok
CREATE VIEW view_3_tab0_1020 AS SELECT pk FROM view_1_tab0_1020

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_1020
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1020 UNION ALL SELECT pk, col0 FROM view_2_tab0_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1020 UNION SELECT pk, col0 FROM view_2_tab0_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) ) AS tab0_1020
----

query I rowsort label-900-3
SELECT * FROM view_3_tab0_1020
----

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

statement ok
DROP VIEW view_1_tab0_1020

statement ok
DROP VIEW view_2_tab0_1020

statement ok
DROP VIEW view_3_tab0_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1020') DROP VIEW view_1_tab1_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1020') DROP VIEW view_2_tab1_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1020') DROP VIEW view_3_tab1_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1020

statement ok
CREATE VIEW view_1_tab1_1020 AS SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)

statement ok
CREATE VIEW view_2_tab1_1020 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))

statement ok
CREATE VIEW view_3_tab1_1020 AS SELECT pk FROM view_1_tab1_1020

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_1020
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1020 UNION ALL SELECT pk, col0 FROM view_2_tab1_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1020 UNION SELECT pk, col0 FROM view_2_tab1_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) ) AS tab1_1020
----

query I rowsort label-900-3
SELECT * FROM view_3_tab1_1020
----

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

statement ok
DROP VIEW view_1_tab1_1020

statement ok
DROP VIEW view_2_tab1_1020

statement ok
DROP VIEW view_3_tab1_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1020') DROP VIEW view_1_tab2_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1020') DROP VIEW view_2_tab2_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1020') DROP VIEW view_3_tab2_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1020

statement ok
CREATE VIEW view_1_tab2_1020 AS SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)

statement ok
CREATE VIEW view_2_tab2_1020 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))

statement ok
CREATE VIEW view_3_tab2_1020 AS SELECT pk FROM view_1_tab2_1020

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_1020
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1020 UNION ALL SELECT pk, col0 FROM view_2_tab2_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1020 UNION SELECT pk, col0 FROM view_2_tab2_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) ) AS tab2_1020
----

query I rowsort label-900-3
SELECT * FROM view_3_tab2_1020
----

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

statement ok
DROP VIEW view_1_tab2_1020

statement ok
DROP VIEW view_2_tab2_1020

statement ok
DROP VIEW view_3_tab2_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1020') DROP VIEW view_1_tab3_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1020') DROP VIEW view_2_tab3_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1020') DROP VIEW view_3_tab3_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1020

statement ok
CREATE VIEW view_1_tab3_1020 AS SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)

statement ok
CREATE VIEW view_2_tab3_1020 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))

statement ok
CREATE VIEW view_3_tab3_1020 AS SELECT pk FROM view_1_tab3_1020

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_1020
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1020 UNION ALL SELECT pk, col0 FROM view_2_tab3_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1020 UNION SELECT pk, col0 FROM view_2_tab3_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) ) AS tab3_1020
----

query I rowsort label-900-3
SELECT * FROM view_3_tab3_1020
----

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

statement ok
DROP VIEW view_1_tab3_1020

statement ok
DROP VIEW view_2_tab3_1020

statement ok
DROP VIEW view_3_tab3_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1020') DROP VIEW view_1_tab4_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1020') DROP VIEW view_2_tab4_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1020') DROP VIEW view_3_tab4_1020

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1020

statement ok
CREATE VIEW view_1_tab4_1020 AS SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)

statement ok
CREATE VIEW view_2_tab4_1020 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))

statement ok
CREATE VIEW view_3_tab4_1020 AS SELECT pk FROM view_1_tab4_1020

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_1020
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1020 UNION ALL SELECT pk, col0 FROM view_2_tab4_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 84 AND 79 OR (col4 = 85.87))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1020 UNION SELECT pk, col0 FROM view_2_tab4_1020
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87) ) AS tab4_1020
----

query I rowsort label-900-3
SELECT * FROM view_3_tab4_1020
----

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE col0 BETWEEN 84 AND 79 OR (col4 = 85.87)
----

statement ok
DROP VIEW view_1_tab4_1020

statement ok
DROP VIEW view_2_tab4_1020

statement ok
DROP VIEW view_3_tab4_1020

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1022') DROP VIEW view_1_tab0_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1022') DROP VIEW view_2_tab0_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1022') DROP VIEW view_3_tab0_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1022

statement ok
CREATE VIEW view_1_tab0_1022 AS SELECT pk, col0 FROM tab0 WHERE col0 < 68

statement ok
CREATE VIEW view_2_tab0_1022 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 68)

statement ok
CREATE VIEW view_3_tab0_1022 AS SELECT pk FROM view_1_tab0_1022

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE col0 < 68
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 68)
----
0
71
2
89
4
92
5
97

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_1022
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_1022
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 68 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1022 UNION ALL SELECT pk, col0 FROM view_2_tab0_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 68 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1022 UNION SELECT pk, col0 FROM view_2_tab0_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 68 ) AS tab0_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE col0 < 68
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1022

statement ok
DROP VIEW view_2_tab0_1022

statement ok
DROP VIEW view_3_tab0_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1022') DROP VIEW view_1_tab1_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1022') DROP VIEW view_2_tab1_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1022') DROP VIEW view_3_tab1_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1022

statement ok
CREATE VIEW view_1_tab1_1022 AS SELECT pk, col0 FROM tab1 WHERE col0 < 68

statement ok
CREATE VIEW view_2_tab1_1022 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 68)

statement ok
CREATE VIEW view_3_tab1_1022 AS SELECT pk FROM view_1_tab1_1022

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE col0 < 68
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 68)
----
0
71
2
89
4
92
5
97

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_1022
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_1022
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 68 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1022 UNION ALL SELECT pk, col0 FROM view_2_tab1_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 68 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1022 UNION SELECT pk, col0 FROM view_2_tab1_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 68 ) AS tab1_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE col0 < 68
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1022

statement ok
DROP VIEW view_2_tab1_1022

statement ok
DROP VIEW view_3_tab1_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1022') DROP VIEW view_1_tab2_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1022') DROP VIEW view_2_tab2_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1022') DROP VIEW view_3_tab2_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1022

statement ok
CREATE VIEW view_1_tab2_1022 AS SELECT pk, col0 FROM tab2 WHERE col0 < 68

statement ok
CREATE VIEW view_2_tab2_1022 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 68)

statement ok
CREATE VIEW view_3_tab2_1022 AS SELECT pk FROM view_1_tab2_1022

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE col0 < 68
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 68)
----
0
71
2
89
4
92
5
97

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_1022
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_1022
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 68 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1022 UNION ALL SELECT pk, col0 FROM view_2_tab2_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 68 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1022 UNION SELECT pk, col0 FROM view_2_tab2_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 68 ) AS tab2_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE col0 < 68
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1022

statement ok
DROP VIEW view_2_tab2_1022

statement ok
DROP VIEW view_3_tab2_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1022') DROP VIEW view_1_tab3_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1022') DROP VIEW view_2_tab3_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1022') DROP VIEW view_3_tab3_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1022

statement ok
CREATE VIEW view_1_tab3_1022 AS SELECT pk, col0 FROM tab3 WHERE col0 < 68

statement ok
CREATE VIEW view_2_tab3_1022 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 68)

statement ok
CREATE VIEW view_3_tab3_1022 AS SELECT pk FROM view_1_tab3_1022

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE col0 < 68
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 68)
----
0
71
2
89
4
92
5
97

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_1022
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_1022
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 68 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1022 UNION ALL SELECT pk, col0 FROM view_2_tab3_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 68 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1022 UNION SELECT pk, col0 FROM view_2_tab3_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 68 ) AS tab3_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE col0 < 68
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1022

statement ok
DROP VIEW view_2_tab3_1022

statement ok
DROP VIEW view_3_tab3_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1022') DROP VIEW view_1_tab4_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1022') DROP VIEW view_2_tab4_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1022') DROP VIEW view_3_tab4_1022

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1022

statement ok
CREATE VIEW view_1_tab4_1022 AS SELECT pk, col0 FROM tab4 WHERE col0 < 68

statement ok
CREATE VIEW view_2_tab4_1022 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 68)

statement ok
CREATE VIEW view_3_tab4_1022 AS SELECT pk FROM view_1_tab4_1022

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE col0 < 68
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 68)
----
0
71
2
89
4
92
5
97

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_1022
----
12 values hashing to 971d43c46f68cbf808d2472e2e1cfe17

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_1022
----
0
71
2
89
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 68 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1022 UNION ALL SELECT pk, col0 FROM view_2_tab4_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 68 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 68)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1022 UNION SELECT pk, col0 FROM view_2_tab4_1022
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 68 ) AS tab4_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_1022
----
1
3
6
7
8
9

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE col0 < 68
----
1
3
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1022

statement ok
DROP VIEW view_2_tab4_1022

statement ok
DROP VIEW view_3_tab4_1022

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1023') DROP VIEW view_1_tab0_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1023') DROP VIEW view_2_tab0_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1023') DROP VIEW view_3_tab0_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1023

statement ok
CREATE VIEW view_1_tab0_1023 AS SELECT pk, col0 FROM tab0 WHERE col0 > 22 OR col4 <= 27.14

statement ok
CREATE VIEW view_2_tab0_1023 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 22 OR col4 <= 27.14)

statement ok
CREATE VIEW view_3_tab0_1023 AS SELECT pk FROM view_1_tab0_1023

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE col0 > 22 OR col4 <= 27.14
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
3
5

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_1023
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_1023
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 22 OR col4 <= 27.14 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1023 UNION ALL SELECT pk, col0 FROM view_2_tab0_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 22 OR col4 <= 27.14 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1023 UNION SELECT pk, col0 FROM view_2_tab0_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 22 OR col4 <= 27.14 ) AS tab0_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE col0 > 22 OR col4 <= 27.14
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_1023

statement ok
DROP VIEW view_2_tab0_1023

statement ok
DROP VIEW view_3_tab0_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1023') DROP VIEW view_1_tab1_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1023') DROP VIEW view_2_tab1_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1023') DROP VIEW view_3_tab1_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1023

statement ok
CREATE VIEW view_1_tab1_1023 AS SELECT pk, col0 FROM tab1 WHERE col0 > 22 OR col4 <= 27.14

statement ok
CREATE VIEW view_2_tab1_1023 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 22 OR col4 <= 27.14)

statement ok
CREATE VIEW view_3_tab1_1023 AS SELECT pk FROM view_1_tab1_1023

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE col0 > 22 OR col4 <= 27.14
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
3
5

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_1023
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_1023
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 22 OR col4 <= 27.14 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1023 UNION ALL SELECT pk, col0 FROM view_2_tab1_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 22 OR col4 <= 27.14 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1023 UNION SELECT pk, col0 FROM view_2_tab1_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 22 OR col4 <= 27.14 ) AS tab1_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE col0 > 22 OR col4 <= 27.14
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_1023

statement ok
DROP VIEW view_2_tab1_1023

statement ok
DROP VIEW view_3_tab1_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1023') DROP VIEW view_1_tab2_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1023') DROP VIEW view_2_tab2_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1023') DROP VIEW view_3_tab2_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1023

statement ok
CREATE VIEW view_1_tab2_1023 AS SELECT pk, col0 FROM tab2 WHERE col0 > 22 OR col4 <= 27.14

statement ok
CREATE VIEW view_2_tab2_1023 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 22 OR col4 <= 27.14)

statement ok
CREATE VIEW view_3_tab2_1023 AS SELECT pk FROM view_1_tab2_1023

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE col0 > 22 OR col4 <= 27.14
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
3
5

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_1023
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_1023
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 22 OR col4 <= 27.14 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1023 UNION ALL SELECT pk, col0 FROM view_2_tab2_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 22 OR col4 <= 27.14 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1023 UNION SELECT pk, col0 FROM view_2_tab2_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 22 OR col4 <= 27.14 ) AS tab2_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE col0 > 22 OR col4 <= 27.14
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_1023

statement ok
DROP VIEW view_2_tab2_1023

statement ok
DROP VIEW view_3_tab2_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1023') DROP VIEW view_1_tab3_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1023') DROP VIEW view_2_tab3_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1023') DROP VIEW view_3_tab3_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1023

statement ok
CREATE VIEW view_1_tab3_1023 AS SELECT pk, col0 FROM tab3 WHERE col0 > 22 OR col4 <= 27.14

statement ok
CREATE VIEW view_2_tab3_1023 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 22 OR col4 <= 27.14)

statement ok
CREATE VIEW view_3_tab3_1023 AS SELECT pk FROM view_1_tab3_1023

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE col0 > 22 OR col4 <= 27.14
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
3
5

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_1023
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_1023
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 22 OR col4 <= 27.14 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1023 UNION ALL SELECT pk, col0 FROM view_2_tab3_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 22 OR col4 <= 27.14 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1023 UNION SELECT pk, col0 FROM view_2_tab3_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 22 OR col4 <= 27.14 ) AS tab3_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE col0 > 22 OR col4 <= 27.14
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_1023

statement ok
DROP VIEW view_2_tab3_1023

statement ok
DROP VIEW view_3_tab3_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1023') DROP VIEW view_1_tab4_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1023') DROP VIEW view_2_tab4_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1023') DROP VIEW view_3_tab4_1023

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1023

statement ok
CREATE VIEW view_1_tab4_1023 AS SELECT pk, col0 FROM tab4 WHERE col0 > 22 OR col4 <= 27.14

statement ok
CREATE VIEW view_2_tab4_1023 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 22 OR col4 <= 27.14)

statement ok
CREATE VIEW view_3_tab4_1023 AS SELECT pk FROM view_1_tab4_1023

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE col0 > 22 OR col4 <= 27.14
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
3
5

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_1023
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_1023
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 22 OR col4 <= 27.14 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1023 UNION ALL SELECT pk, col0 FROM view_2_tab4_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 22 OR col4 <= 27.14 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 22 OR col4 <= 27.14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1023 UNION SELECT pk, col0 FROM view_2_tab4_1023
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 22 OR col4 <= 27.14 ) AS tab4_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_1023
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE col0 > 22 OR col4 <= 27.14
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_1023

statement ok
DROP VIEW view_2_tab4_1023

statement ok
DROP VIEW view_3_tab4_1023

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1024') DROP VIEW view_1_tab0_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1024') DROP VIEW view_2_tab0_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1024') DROP VIEW view_3_tab0_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1024

statement ok
CREATE VIEW view_1_tab0_1024 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 12)

statement ok
CREATE VIEW view_2_tab0_1024 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 12))

statement ok
CREATE VIEW view_3_tab0_1024 AS SELECT pk FROM view_1_tab0_1024

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 12)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 12))
----
3
5
7
9

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_1024
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_1024
----
3
5
7
9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 12) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1024 UNION ALL SELECT pk, col0 FROM view_2_tab0_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 12) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1024 UNION SELECT pk, col0 FROM view_2_tab0_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 12) ) AS tab0_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE (col0 >= 12)
----
0
1
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab0_1024

statement ok
DROP VIEW view_2_tab0_1024

statement ok
DROP VIEW view_3_tab0_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1024') DROP VIEW view_1_tab1_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1024') DROP VIEW view_2_tab1_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1024') DROP VIEW view_3_tab1_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1024

statement ok
CREATE VIEW view_1_tab1_1024 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 12)

statement ok
CREATE VIEW view_2_tab1_1024 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 12))

statement ok
CREATE VIEW view_3_tab1_1024 AS SELECT pk FROM view_1_tab1_1024

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 12)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 12))
----
3
5
7
9

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_1024
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_1024
----
3
5
7
9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 12) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1024 UNION ALL SELECT pk, col0 FROM view_2_tab1_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 12) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1024 UNION SELECT pk, col0 FROM view_2_tab1_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 12) ) AS tab1_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE (col0 >= 12)
----
0
1
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab1_1024

statement ok
DROP VIEW view_2_tab1_1024

statement ok
DROP VIEW view_3_tab1_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1024') DROP VIEW view_1_tab2_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1024') DROP VIEW view_2_tab2_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1024') DROP VIEW view_3_tab2_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1024

statement ok
CREATE VIEW view_1_tab2_1024 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 12)

statement ok
CREATE VIEW view_2_tab2_1024 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 12))

statement ok
CREATE VIEW view_3_tab2_1024 AS SELECT pk FROM view_1_tab2_1024

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 12)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 12))
----
3
5
7
9

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_1024
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_1024
----
3
5
7
9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 12) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1024 UNION ALL SELECT pk, col0 FROM view_2_tab2_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 12) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1024 UNION SELECT pk, col0 FROM view_2_tab2_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 12) ) AS tab2_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE (col0 >= 12)
----
0
1
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab2_1024

statement ok
DROP VIEW view_2_tab2_1024

statement ok
DROP VIEW view_3_tab2_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1024') DROP VIEW view_1_tab3_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1024') DROP VIEW view_2_tab3_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1024') DROP VIEW view_3_tab3_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1024

statement ok
CREATE VIEW view_1_tab3_1024 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 12)

statement ok
CREATE VIEW view_2_tab3_1024 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 12))

statement ok
CREATE VIEW view_3_tab3_1024 AS SELECT pk FROM view_1_tab3_1024

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 12)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 12))
----
3
5
7
9

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_1024
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_1024
----
3
5
7
9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 12) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1024 UNION ALL SELECT pk, col0 FROM view_2_tab3_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 12) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1024 UNION SELECT pk, col0 FROM view_2_tab3_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 12) ) AS tab3_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE (col0 >= 12)
----
0
1
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab3_1024

statement ok
DROP VIEW view_2_tab3_1024

statement ok
DROP VIEW view_3_tab3_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1024') DROP VIEW view_1_tab4_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1024') DROP VIEW view_2_tab4_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1024') DROP VIEW view_3_tab4_1024

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1024

statement ok
CREATE VIEW view_1_tab4_1024 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 12)

statement ok
CREATE VIEW view_2_tab4_1024 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 12))

statement ok
CREATE VIEW view_3_tab4_1024 AS SELECT pk FROM view_1_tab4_1024

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 12)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 12))
----
3
5
7
9

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_1024
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_1024
----
3
5
7
9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 12) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1024 UNION ALL SELECT pk, col0 FROM view_2_tab4_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 12) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1024 UNION SELECT pk, col0 FROM view_2_tab4_1024
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 12) ) AS tab4_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_1024
----
0
1
2
4
5
6
8
9

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE (col0 >= 12)
----
0
1
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab4_1024

statement ok
DROP VIEW view_2_tab4_1024

statement ok
DROP VIEW view_3_tab4_1024

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1025') DROP VIEW view_1_tab0_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1025') DROP VIEW view_2_tab0_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1025') DROP VIEW view_3_tab0_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1025

statement ok
CREATE VIEW view_1_tab0_1025 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 88 OR col4 <= 84.5

statement ok
CREATE VIEW view_2_tab0_1025 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88 OR col4 <= 84.5)

statement ok
CREATE VIEW view_3_tab0_1025 AS SELECT pk FROM view_1_tab0_1025

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 88 OR col4 <= 84.5
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_1025
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 88 OR col4 <= 84.5 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1025 UNION ALL SELECT pk, col0 FROM view_2_tab0_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 88 OR col4 <= 84.5 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1025 UNION SELECT pk, col0 FROM view_2_tab0_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 88 OR col4 <= 84.5 ) AS tab0_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col3 <= 88 OR col4 <= 84.5
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1025

statement ok
DROP VIEW view_2_tab0_1025

statement ok
DROP VIEW view_3_tab0_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1025') DROP VIEW view_1_tab1_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1025') DROP VIEW view_2_tab1_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1025') DROP VIEW view_3_tab1_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1025

statement ok
CREATE VIEW view_1_tab1_1025 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 88 OR col4 <= 84.5

statement ok
CREATE VIEW view_2_tab1_1025 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88 OR col4 <= 84.5)

statement ok
CREATE VIEW view_3_tab1_1025 AS SELECT pk FROM view_1_tab1_1025

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 88 OR col4 <= 84.5
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_1025
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 88 OR col4 <= 84.5 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1025 UNION ALL SELECT pk, col0 FROM view_2_tab1_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 88 OR col4 <= 84.5 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1025 UNION SELECT pk, col0 FROM view_2_tab1_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 88 OR col4 <= 84.5 ) AS tab1_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col3 <= 88 OR col4 <= 84.5
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1025

statement ok
DROP VIEW view_2_tab1_1025

statement ok
DROP VIEW view_3_tab1_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1025') DROP VIEW view_1_tab2_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1025') DROP VIEW view_2_tab2_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1025') DROP VIEW view_3_tab2_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1025

statement ok
CREATE VIEW view_1_tab2_1025 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 88 OR col4 <= 84.5

statement ok
CREATE VIEW view_2_tab2_1025 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88 OR col4 <= 84.5)

statement ok
CREATE VIEW view_3_tab2_1025 AS SELECT pk FROM view_1_tab2_1025

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 88 OR col4 <= 84.5
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_1025
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 88 OR col4 <= 84.5 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1025 UNION ALL SELECT pk, col0 FROM view_2_tab2_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 88 OR col4 <= 84.5 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1025 UNION SELECT pk, col0 FROM view_2_tab2_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 88 OR col4 <= 84.5 ) AS tab2_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col3 <= 88 OR col4 <= 84.5
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1025

statement ok
DROP VIEW view_2_tab2_1025

statement ok
DROP VIEW view_3_tab2_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1025') DROP VIEW view_1_tab3_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1025') DROP VIEW view_2_tab3_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1025') DROP VIEW view_3_tab3_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1025

statement ok
CREATE VIEW view_1_tab3_1025 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 88 OR col4 <= 84.5

statement ok
CREATE VIEW view_2_tab3_1025 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88 OR col4 <= 84.5)

statement ok
CREATE VIEW view_3_tab3_1025 AS SELECT pk FROM view_1_tab3_1025

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 88 OR col4 <= 84.5
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_1025
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 88 OR col4 <= 84.5 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1025 UNION ALL SELECT pk, col0 FROM view_2_tab3_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 88 OR col4 <= 84.5 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1025 UNION SELECT pk, col0 FROM view_2_tab3_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 88 OR col4 <= 84.5 ) AS tab3_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col3 <= 88 OR col4 <= 84.5
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1025

statement ok
DROP VIEW view_2_tab3_1025

statement ok
DROP VIEW view_3_tab3_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1025') DROP VIEW view_1_tab4_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1025') DROP VIEW view_2_tab4_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1025') DROP VIEW view_3_tab4_1025

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1025

statement ok
CREATE VIEW view_1_tab4_1025 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 88 OR col4 <= 84.5

statement ok
CREATE VIEW view_2_tab4_1025 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88 OR col4 <= 84.5)

statement ok
CREATE VIEW view_3_tab4_1025 AS SELECT pk FROM view_1_tab4_1025

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 88 OR col4 <= 84.5
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_1025
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 88 OR col4 <= 84.5 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1025 UNION ALL SELECT pk, col0 FROM view_2_tab4_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 88 OR col4 <= 84.5 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88 OR col4 <= 84.5)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1025 UNION SELECT pk, col0 FROM view_2_tab4_1025
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 88 OR col4 <= 84.5 ) AS tab4_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_1025
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col3 <= 88 OR col4 <= 84.5
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1025

statement ok
DROP VIEW view_2_tab4_1025

statement ok
DROP VIEW view_3_tab4_1025

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1026') DROP VIEW view_1_tab0_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1026') DROP VIEW view_2_tab0_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1026') DROP VIEW view_3_tab0_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1026

statement ok
CREATE VIEW view_1_tab0_1026 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 44.51

statement ok
CREATE VIEW view_2_tab0_1026 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 44.51)

statement ok
CREATE VIEW view_3_tab0_1026 AS SELECT pk FROM view_1_tab0_1026

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 44.51
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 44.51)
----
0
71
3
5
4
92
5
97

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_1026
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_1026
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 44.51 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1026 UNION ALL SELECT pk, col0 FROM view_2_tab0_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 44.51 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1026 UNION SELECT pk, col0 FROM view_2_tab0_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 44.51 ) AS tab0_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE col1 <= 44.51
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1026

statement ok
DROP VIEW view_2_tab0_1026

statement ok
DROP VIEW view_3_tab0_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1026') DROP VIEW view_1_tab1_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1026') DROP VIEW view_2_tab1_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1026') DROP VIEW view_3_tab1_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1026

statement ok
CREATE VIEW view_1_tab1_1026 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 44.51

statement ok
CREATE VIEW view_2_tab1_1026 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 44.51)

statement ok
CREATE VIEW view_3_tab1_1026 AS SELECT pk FROM view_1_tab1_1026

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 44.51
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 44.51)
----
0
71
3
5
4
92
5
97

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_1026
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_1026
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 44.51 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1026 UNION ALL SELECT pk, col0 FROM view_2_tab1_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 44.51 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1026 UNION SELECT pk, col0 FROM view_2_tab1_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 44.51 ) AS tab1_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE col1 <= 44.51
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1026

statement ok
DROP VIEW view_2_tab1_1026

statement ok
DROP VIEW view_3_tab1_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1026') DROP VIEW view_1_tab2_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1026') DROP VIEW view_2_tab2_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1026') DROP VIEW view_3_tab2_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1026

statement ok
CREATE VIEW view_1_tab2_1026 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 44.51

statement ok
CREATE VIEW view_2_tab2_1026 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 44.51)

statement ok
CREATE VIEW view_3_tab2_1026 AS SELECT pk FROM view_1_tab2_1026

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 44.51
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 44.51)
----
0
71
3
5
4
92
5
97

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_1026
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_1026
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 44.51 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1026 UNION ALL SELECT pk, col0 FROM view_2_tab2_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 44.51 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1026 UNION SELECT pk, col0 FROM view_2_tab2_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 44.51 ) AS tab2_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE col1 <= 44.51
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1026

statement ok
DROP VIEW view_2_tab2_1026

statement ok
DROP VIEW view_3_tab2_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1026') DROP VIEW view_1_tab3_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1026') DROP VIEW view_2_tab3_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1026') DROP VIEW view_3_tab3_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1026

statement ok
CREATE VIEW view_1_tab3_1026 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 44.51

statement ok
CREATE VIEW view_2_tab3_1026 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 44.51)

statement ok
CREATE VIEW view_3_tab3_1026 AS SELECT pk FROM view_1_tab3_1026

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 44.51
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 44.51)
----
0
71
3
5
4
92
5
97

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_1026
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_1026
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 44.51 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1026 UNION ALL SELECT pk, col0 FROM view_2_tab3_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 44.51 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1026 UNION SELECT pk, col0 FROM view_2_tab3_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 44.51 ) AS tab3_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE col1 <= 44.51
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1026

statement ok
DROP VIEW view_2_tab3_1026

statement ok
DROP VIEW view_3_tab3_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1026') DROP VIEW view_1_tab4_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1026') DROP VIEW view_2_tab4_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1026') DROP VIEW view_3_tab4_1026

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1026

statement ok
CREATE VIEW view_1_tab4_1026 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 44.51

statement ok
CREATE VIEW view_2_tab4_1026 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 44.51)

statement ok
CREATE VIEW view_3_tab4_1026 AS SELECT pk FROM view_1_tab4_1026

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 44.51
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 44.51)
----
0
71
3
5
4
92
5
97

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_1026
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_1026
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 44.51 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1026 UNION ALL SELECT pk, col0 FROM view_2_tab4_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 44.51 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 44.51)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1026 UNION SELECT pk, col0 FROM view_2_tab4_1026
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 44.51 ) AS tab4_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_1026
----
1
2
6
7
8
9

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE col1 <= 44.51
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1026

statement ok
DROP VIEW view_2_tab4_1026

statement ok
DROP VIEW view_3_tab4_1026

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1027') DROP VIEW view_1_tab0_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1027') DROP VIEW view_2_tab0_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1027') DROP VIEW view_3_tab0_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1027

statement ok
CREATE VIEW view_1_tab0_1027 AS SELECT pk, col0 FROM tab0 WHERE (((col3 >= 84)))

statement ok
CREATE VIEW view_2_tab0_1027 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 84))))

statement ok
CREATE VIEW view_3_tab0_1027 AS SELECT pk FROM view_1_tab0_1027

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE (((col3 >= 84)))
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 84))))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_1027
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_1027
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 >= 84))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1027 UNION ALL SELECT pk, col0 FROM view_2_tab0_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 >= 84))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1027 UNION SELECT pk, col0 FROM view_2_tab0_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 >= 84))) ) AS tab0_1027
----
6

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_1027
----
6

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE (((col3 >= 84)))
----
6

statement ok
DROP VIEW view_1_tab0_1027

statement ok
DROP VIEW view_2_tab0_1027

statement ok
DROP VIEW view_3_tab0_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1027') DROP VIEW view_1_tab1_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1027') DROP VIEW view_2_tab1_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1027') DROP VIEW view_3_tab1_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1027

statement ok
CREATE VIEW view_1_tab1_1027 AS SELECT pk, col0 FROM tab1 WHERE (((col3 >= 84)))

statement ok
CREATE VIEW view_2_tab1_1027 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 84))))

statement ok
CREATE VIEW view_3_tab1_1027 AS SELECT pk FROM view_1_tab1_1027

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE (((col3 >= 84)))
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 84))))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_1027
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_1027
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 >= 84))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1027 UNION ALL SELECT pk, col0 FROM view_2_tab1_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 >= 84))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1027 UNION SELECT pk, col0 FROM view_2_tab1_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 >= 84))) ) AS tab1_1027
----
6

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_1027
----
6

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE (((col3 >= 84)))
----
6

statement ok
DROP VIEW view_1_tab1_1027

statement ok
DROP VIEW view_2_tab1_1027

statement ok
DROP VIEW view_3_tab1_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1027') DROP VIEW view_1_tab2_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1027') DROP VIEW view_2_tab2_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1027') DROP VIEW view_3_tab2_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1027

statement ok
CREATE VIEW view_1_tab2_1027 AS SELECT pk, col0 FROM tab2 WHERE (((col3 >= 84)))

statement ok
CREATE VIEW view_2_tab2_1027 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 84))))

statement ok
CREATE VIEW view_3_tab2_1027 AS SELECT pk FROM view_1_tab2_1027

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE (((col3 >= 84)))
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 84))))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_1027
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_1027
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 >= 84))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1027 UNION ALL SELECT pk, col0 FROM view_2_tab2_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 >= 84))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1027 UNION SELECT pk, col0 FROM view_2_tab2_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 >= 84))) ) AS tab2_1027
----
6

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_1027
----
6

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE (((col3 >= 84)))
----
6

statement ok
DROP VIEW view_1_tab2_1027

statement ok
DROP VIEW view_2_tab2_1027

statement ok
DROP VIEW view_3_tab2_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1027') DROP VIEW view_1_tab3_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1027') DROP VIEW view_2_tab3_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1027') DROP VIEW view_3_tab3_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1027

statement ok
CREATE VIEW view_1_tab3_1027 AS SELECT pk, col0 FROM tab3 WHERE (((col3 >= 84)))

statement ok
CREATE VIEW view_2_tab3_1027 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 84))))

statement ok
CREATE VIEW view_3_tab3_1027 AS SELECT pk FROM view_1_tab3_1027

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE (((col3 >= 84)))
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 84))))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_1027
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_1027
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 >= 84))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1027 UNION ALL SELECT pk, col0 FROM view_2_tab3_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 >= 84))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1027 UNION SELECT pk, col0 FROM view_2_tab3_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 >= 84))) ) AS tab3_1027
----
6

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_1027
----
6

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE (((col3 >= 84)))
----
6

statement ok
DROP VIEW view_1_tab3_1027

statement ok
DROP VIEW view_2_tab3_1027

statement ok
DROP VIEW view_3_tab3_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1027') DROP VIEW view_1_tab4_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1027') DROP VIEW view_2_tab4_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1027') DROP VIEW view_3_tab4_1027

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1027

statement ok
CREATE VIEW view_1_tab4_1027 AS SELECT pk, col0 FROM tab4 WHERE (((col3 >= 84)))

statement ok
CREATE VIEW view_2_tab4_1027 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 84))))

statement ok
CREATE VIEW view_3_tab4_1027 AS SELECT pk FROM view_1_tab4_1027

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE (((col3 >= 84)))
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 84))))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_1027
----
6
36

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_1027
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 >= 84))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1027 UNION ALL SELECT pk, col0 FROM view_2_tab4_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 >= 84))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 84))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1027 UNION SELECT pk, col0 FROM view_2_tab4_1027
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 >= 84))) ) AS tab4_1027
----
6

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_1027
----
6

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE (((col3 >= 84)))
----
6

statement ok
DROP VIEW view_1_tab4_1027

statement ok
DROP VIEW view_2_tab4_1027

statement ok
DROP VIEW view_3_tab4_1027

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1028') DROP VIEW view_1_tab0_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1028') DROP VIEW view_2_tab0_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1028') DROP VIEW view_3_tab0_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1028

statement ok
CREATE VIEW view_1_tab0_1028 AS SELECT pk, col0 FROM tab0 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)

statement ok
CREATE VIEW view_2_tab0_1028 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))

statement ok
CREATE VIEW view_3_tab0_1028 AS SELECT pk FROM view_1_tab0_1028

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_1028
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1028 UNION ALL SELECT pk, col0 FROM view_2_tab0_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1028 UNION SELECT pk, col0 FROM view_2_tab0_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) ) AS tab0_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1028

statement ok
DROP VIEW view_2_tab0_1028

statement ok
DROP VIEW view_3_tab0_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1028') DROP VIEW view_1_tab1_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1028') DROP VIEW view_2_tab1_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1028') DROP VIEW view_3_tab1_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1028

statement ok
CREATE VIEW view_1_tab1_1028 AS SELECT pk, col0 FROM tab1 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)

statement ok
CREATE VIEW view_2_tab1_1028 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))

statement ok
CREATE VIEW view_3_tab1_1028 AS SELECT pk FROM view_1_tab1_1028

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_1028
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1028 UNION ALL SELECT pk, col0 FROM view_2_tab1_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1028 UNION SELECT pk, col0 FROM view_2_tab1_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) ) AS tab1_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1028

statement ok
DROP VIEW view_2_tab1_1028

statement ok
DROP VIEW view_3_tab1_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1028') DROP VIEW view_1_tab2_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1028') DROP VIEW view_2_tab2_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1028') DROP VIEW view_3_tab2_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1028

statement ok
CREATE VIEW view_1_tab2_1028 AS SELECT pk, col0 FROM tab2 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)

statement ok
CREATE VIEW view_2_tab2_1028 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))

statement ok
CREATE VIEW view_3_tab2_1028 AS SELECT pk FROM view_1_tab2_1028

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_1028
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1028 UNION ALL SELECT pk, col0 FROM view_2_tab2_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1028 UNION SELECT pk, col0 FROM view_2_tab2_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) ) AS tab2_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1028

statement ok
DROP VIEW view_2_tab2_1028

statement ok
DROP VIEW view_3_tab2_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1028') DROP VIEW view_1_tab3_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1028') DROP VIEW view_2_tab3_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1028') DROP VIEW view_3_tab3_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1028

statement ok
CREATE VIEW view_1_tab3_1028 AS SELECT pk, col0 FROM tab3 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)

statement ok
CREATE VIEW view_2_tab3_1028 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))

statement ok
CREATE VIEW view_3_tab3_1028 AS SELECT pk FROM view_1_tab3_1028

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_1028
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1028 UNION ALL SELECT pk, col0 FROM view_2_tab3_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1028 UNION SELECT pk, col0 FROM view_2_tab3_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) ) AS tab3_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1028

statement ok
DROP VIEW view_2_tab3_1028

statement ok
DROP VIEW view_3_tab3_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1028') DROP VIEW view_1_tab4_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1028') DROP VIEW view_2_tab4_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1028') DROP VIEW view_3_tab4_1028

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1028

statement ok
CREATE VIEW view_1_tab4_1028 AS SELECT pk, col0 FROM tab4 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)

statement ok
CREATE VIEW view_2_tab4_1028 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))

statement ok
CREATE VIEW view_3_tab4_1028 AS SELECT pk FROM view_1_tab4_1028

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_1028
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1028 UNION ALL SELECT pk, col0 FROM view_2_tab4_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1028 UNION SELECT pk, col0 FROM view_2_tab4_1028
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12) ) AS tab4_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_1028
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE (((((col4 < 70.55)) OR col3 >= 41 AND col4 = 70.71 OR col3 >= 39 AND col0 >= 8 AND col1 < 43.93 AND (((((col0 < 93)) AND col3 = 36 AND col3 > 24 AND (col4 > 74.51) OR col1 > 72.82 OR col1 > 67.84 OR ((col0 IN (78,80,12))) AND col4 > 29.51 AND col0 < 5 OR (col3 >= 54) OR col4 < 89.52) AND col0 = 30)) OR ((col0 >= 36)) AND (col1 <= 7.92) OR col3 > 41) OR col1 >= 78.66 AND col1 > 89.24) OR (((col1 > 79.73 AND col0 < 3 OR (col3 < 78 OR (col0 <= 68 AND col0 >= 11))))) OR (col3 BETWEEN 32 AND 47 OR col0 >= 35 AND col3 < 38) AND col3 >= 91 AND col0 < 12)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1028

statement ok
DROP VIEW view_2_tab4_1028

statement ok
DROP VIEW view_3_tab4_1028

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1029') DROP VIEW view_1_tab0_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1029') DROP VIEW view_2_tab0_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1029') DROP VIEW view_3_tab0_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1029

statement ok
CREATE VIEW view_1_tab0_1029 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 27)

statement ok
CREATE VIEW view_2_tab0_1029 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 27))

statement ok
CREATE VIEW view_3_tab0_1029 AS SELECT pk FROM view_1_tab0_1029

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 27)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 27))
----
3
5
7
9
8
14

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_1029
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_1029
----
3
5
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 27) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1029 UNION ALL SELECT pk, col0 FROM view_2_tab0_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 27) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1029 UNION SELECT pk, col0 FROM view_2_tab0_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 27) ) AS tab0_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE (col0 >= 27)
----
0
1
2
4
5
6
9

statement ok
DROP VIEW view_1_tab0_1029

statement ok
DROP VIEW view_2_tab0_1029

statement ok
DROP VIEW view_3_tab0_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1029') DROP VIEW view_1_tab1_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1029') DROP VIEW view_2_tab1_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1029') DROP VIEW view_3_tab1_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1029

statement ok
CREATE VIEW view_1_tab1_1029 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 27)

statement ok
CREATE VIEW view_2_tab1_1029 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 27))

statement ok
CREATE VIEW view_3_tab1_1029 AS SELECT pk FROM view_1_tab1_1029

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 27)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 27))
----
3
5
7
9
8
14

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_1029
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_1029
----
3
5
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 27) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1029 UNION ALL SELECT pk, col0 FROM view_2_tab1_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 27) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1029 UNION SELECT pk, col0 FROM view_2_tab1_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 27) ) AS tab1_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE (col0 >= 27)
----
0
1
2
4
5
6
9

statement ok
DROP VIEW view_1_tab1_1029

statement ok
DROP VIEW view_2_tab1_1029

statement ok
DROP VIEW view_3_tab1_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1029') DROP VIEW view_1_tab2_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1029') DROP VIEW view_2_tab2_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1029') DROP VIEW view_3_tab2_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1029

statement ok
CREATE VIEW view_1_tab2_1029 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 27)

statement ok
CREATE VIEW view_2_tab2_1029 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 27))

statement ok
CREATE VIEW view_3_tab2_1029 AS SELECT pk FROM view_1_tab2_1029

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 27)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 27))
----
3
5
7
9
8
14

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_1029
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_1029
----
3
5
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 27) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1029 UNION ALL SELECT pk, col0 FROM view_2_tab2_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 27) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1029 UNION SELECT pk, col0 FROM view_2_tab2_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 27) ) AS tab2_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE (col0 >= 27)
----
0
1
2
4
5
6
9

statement ok
DROP VIEW view_1_tab2_1029

statement ok
DROP VIEW view_2_tab2_1029

statement ok
DROP VIEW view_3_tab2_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1029') DROP VIEW view_1_tab3_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1029') DROP VIEW view_2_tab3_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1029') DROP VIEW view_3_tab3_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1029

statement ok
CREATE VIEW view_1_tab3_1029 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 27)

statement ok
CREATE VIEW view_2_tab3_1029 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 27))

statement ok
CREATE VIEW view_3_tab3_1029 AS SELECT pk FROM view_1_tab3_1029

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 27)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 27))
----
3
5
7
9
8
14

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_1029
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_1029
----
3
5
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 27) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1029 UNION ALL SELECT pk, col0 FROM view_2_tab3_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 27) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1029 UNION SELECT pk, col0 FROM view_2_tab3_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 27) ) AS tab3_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE (col0 >= 27)
----
0
1
2
4
5
6
9

statement ok
DROP VIEW view_1_tab3_1029

statement ok
DROP VIEW view_2_tab3_1029

statement ok
DROP VIEW view_3_tab3_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1029') DROP VIEW view_1_tab4_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1029') DROP VIEW view_2_tab4_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1029') DROP VIEW view_3_tab4_1029

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1029

statement ok
CREATE VIEW view_1_tab4_1029 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 27)

statement ok
CREATE VIEW view_2_tab4_1029 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 27))

statement ok
CREATE VIEW view_3_tab4_1029 AS SELECT pk FROM view_1_tab4_1029

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 27)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 27))
----
3
5
7
9
8
14

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_1029
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_1029
----
3
5
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 27) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1029 UNION ALL SELECT pk, col0 FROM view_2_tab4_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 27) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1029 UNION SELECT pk, col0 FROM view_2_tab4_1029
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 27) ) AS tab4_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_1029
----
0
1
2
4
5
6
9

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE (col0 >= 27)
----
0
1
2
4
5
6
9

statement ok
DROP VIEW view_1_tab4_1029

statement ok
DROP VIEW view_2_tab4_1029

statement ok
DROP VIEW view_3_tab4_1029

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1030') DROP VIEW view_1_tab0_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1030') DROP VIEW view_2_tab0_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1030') DROP VIEW view_3_tab0_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1030

statement ok
CREATE VIEW view_1_tab0_1030 AS SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))

statement ok
CREATE VIEW view_2_tab0_1030 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))

statement ok
CREATE VIEW view_3_tab0_1030 AS SELECT pk FROM view_1_tab0_1030

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_1030
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_1030
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1030 UNION ALL SELECT pk, col0 FROM view_2_tab0_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1030 UNION SELECT pk, col0 FROM view_2_tab0_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) ) AS tab0_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1030

statement ok
DROP VIEW view_2_tab0_1030

statement ok
DROP VIEW view_3_tab0_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1030') DROP VIEW view_1_tab1_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1030') DROP VIEW view_2_tab1_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1030') DROP VIEW view_3_tab1_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1030

statement ok
CREATE VIEW view_1_tab1_1030 AS SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))

statement ok
CREATE VIEW view_2_tab1_1030 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))

statement ok
CREATE VIEW view_3_tab1_1030 AS SELECT pk FROM view_1_tab1_1030

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_1030
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_1030
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1030 UNION ALL SELECT pk, col0 FROM view_2_tab1_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1030 UNION SELECT pk, col0 FROM view_2_tab1_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) ) AS tab1_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1030

statement ok
DROP VIEW view_2_tab1_1030

statement ok
DROP VIEW view_3_tab1_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1030') DROP VIEW view_1_tab2_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1030') DROP VIEW view_2_tab2_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1030') DROP VIEW view_3_tab2_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1030

statement ok
CREATE VIEW view_1_tab2_1030 AS SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))

statement ok
CREATE VIEW view_2_tab2_1030 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))

statement ok
CREATE VIEW view_3_tab2_1030 AS SELECT pk FROM view_1_tab2_1030

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_1030
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_1030
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1030 UNION ALL SELECT pk, col0 FROM view_2_tab2_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1030 UNION SELECT pk, col0 FROM view_2_tab2_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) ) AS tab2_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1030

statement ok
DROP VIEW view_2_tab2_1030

statement ok
DROP VIEW view_3_tab2_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1030') DROP VIEW view_1_tab3_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1030') DROP VIEW view_2_tab3_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1030') DROP VIEW view_3_tab3_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1030

statement ok
CREATE VIEW view_1_tab3_1030 AS SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))

statement ok
CREATE VIEW view_2_tab3_1030 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))

statement ok
CREATE VIEW view_3_tab3_1030 AS SELECT pk FROM view_1_tab3_1030

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_1030
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_1030
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1030 UNION ALL SELECT pk, col0 FROM view_2_tab3_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1030 UNION SELECT pk, col0 FROM view_2_tab3_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) ) AS tab3_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1030

statement ok
DROP VIEW view_2_tab3_1030

statement ok
DROP VIEW view_3_tab3_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1030') DROP VIEW view_1_tab4_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1030') DROP VIEW view_2_tab4_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1030') DROP VIEW view_3_tab4_1030

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1030

statement ok
CREATE VIEW view_1_tab4_1030 AS SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))

statement ok
CREATE VIEW view_2_tab4_1030 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))

statement ok
CREATE VIEW view_3_tab4_1030 AS SELECT pk FROM view_1_tab4_1030

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_1030
----
6
36
7
9
8
14
9
56

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_1030
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1030 UNION ALL SELECT pk, col0 FROM view_2_tab4_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1030 UNION SELECT pk, col0 FROM view_2_tab4_1030
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77)) ) AS tab4_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_1030
----
6
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE ((col1 IS NULL AND col1 IN (54.43,78.86,33.15,51.13) AND ((col0 >= 7) AND (col0 < 67)) AND ((col4 >= 36.45)) AND col3 IS NULL OR ((col0 < 97)) AND col1 < 17.77))
----
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1030

statement ok
DROP VIEW view_2_tab4_1030

statement ok
DROP VIEW view_3_tab4_1030

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1031') DROP VIEW view_1_tab0_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1031') DROP VIEW view_2_tab0_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1031') DROP VIEW view_3_tab0_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1031

statement ok
CREATE VIEW view_1_tab0_1031 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98

statement ok
CREATE VIEW view_2_tab0_1031 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)

statement ok
CREATE VIEW view_3_tab0_1031 AS SELECT pk FROM view_1_tab0_1031

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_1031
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_1031
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1031 UNION ALL SELECT pk, col0 FROM view_2_tab0_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1031 UNION SELECT pk, col0 FROM view_2_tab0_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 ) AS tab0_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
1
3
6
7
9

statement ok
DROP VIEW view_1_tab0_1031

statement ok
DROP VIEW view_2_tab0_1031

statement ok
DROP VIEW view_3_tab0_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1031') DROP VIEW view_1_tab1_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1031') DROP VIEW view_2_tab1_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1031') DROP VIEW view_3_tab1_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1031

statement ok
CREATE VIEW view_1_tab1_1031 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98

statement ok
CREATE VIEW view_2_tab1_1031 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)

statement ok
CREATE VIEW view_3_tab1_1031 AS SELECT pk FROM view_1_tab1_1031

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_1031
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_1031
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1031 UNION ALL SELECT pk, col0 FROM view_2_tab1_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1031 UNION SELECT pk, col0 FROM view_2_tab1_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 ) AS tab1_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
1
3
6
7
9

statement ok
DROP VIEW view_1_tab1_1031

statement ok
DROP VIEW view_2_tab1_1031

statement ok
DROP VIEW view_3_tab1_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1031') DROP VIEW view_1_tab2_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1031') DROP VIEW view_2_tab2_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1031') DROP VIEW view_3_tab2_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1031

statement ok
CREATE VIEW view_1_tab2_1031 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98

statement ok
CREATE VIEW view_2_tab2_1031 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)

statement ok
CREATE VIEW view_3_tab2_1031 AS SELECT pk FROM view_1_tab2_1031

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_1031
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_1031
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1031 UNION ALL SELECT pk, col0 FROM view_2_tab2_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1031 UNION SELECT pk, col0 FROM view_2_tab2_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 ) AS tab2_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
1
3
6
7
9

statement ok
DROP VIEW view_1_tab2_1031

statement ok
DROP VIEW view_2_tab2_1031

statement ok
DROP VIEW view_3_tab2_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1031') DROP VIEW view_1_tab3_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1031') DROP VIEW view_2_tab3_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1031') DROP VIEW view_3_tab3_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1031

statement ok
CREATE VIEW view_1_tab3_1031 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98

statement ok
CREATE VIEW view_2_tab3_1031 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)

statement ok
CREATE VIEW view_3_tab3_1031 AS SELECT pk FROM view_1_tab3_1031

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_1031
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_1031
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1031 UNION ALL SELECT pk, col0 FROM view_2_tab3_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1031 UNION SELECT pk, col0 FROM view_2_tab3_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 ) AS tab3_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
1
3
6
7
9

statement ok
DROP VIEW view_1_tab3_1031

statement ok
DROP VIEW view_2_tab3_1031

statement ok
DROP VIEW view_3_tab3_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1031') DROP VIEW view_1_tab4_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1031') DROP VIEW view_2_tab4_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1031') DROP VIEW view_3_tab4_1031

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1031

statement ok
CREATE VIEW view_1_tab4_1031 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98

statement ok
CREATE VIEW view_2_tab4_1031 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)

statement ok
CREATE VIEW view_3_tab4_1031 AS SELECT pk FROM view_1_tab4_1031

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_1031
----
10 values hashing to 2f60ffa7389a63468659c7340277ffca

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_1031
----
10 values hashing to f81e2381a5bc852d1592e5d8d4fcad7c

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1031 UNION ALL SELECT pk, col0 FROM view_2_tab4_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 78 AND col3 BETWEEN 8 AND 98)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1031 UNION SELECT pk, col0 FROM view_2_tab4_1031
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98 ) AS tab4_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_1031
----
1
3
6
7
9

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col0 <= 78 AND col3 BETWEEN 8 AND 98
----
1
3
6
7
9

statement ok
DROP VIEW view_1_tab4_1031

statement ok
DROP VIEW view_2_tab4_1031

statement ok
DROP VIEW view_3_tab4_1031

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1032') DROP VIEW view_1_tab0_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1032') DROP VIEW view_2_tab0_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1032') DROP VIEW view_3_tab0_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1032

statement ok
CREATE VIEW view_1_tab0_1032 AS SELECT pk, col0 FROM tab0 WHERE col4 <= 10.93

statement ok
CREATE VIEW view_2_tab0_1032 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 10.93)

statement ok
CREATE VIEW view_3_tab0_1032 AS SELECT pk FROM view_1_tab0_1032

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE col4 <= 10.93
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 10.93)
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_1032
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_1032
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 10.93 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1032 UNION ALL SELECT pk, col0 FROM view_2_tab0_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 10.93 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1032 UNION SELECT pk, col0 FROM view_2_tab0_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 <= 10.93 ) AS tab0_1032
----
0
6

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_1032
----
0
6

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE col4 <= 10.93
----
0
6

statement ok
DROP VIEW view_1_tab0_1032

statement ok
DROP VIEW view_2_tab0_1032

statement ok
DROP VIEW view_3_tab0_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1032') DROP VIEW view_1_tab1_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1032') DROP VIEW view_2_tab1_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1032') DROP VIEW view_3_tab1_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1032

statement ok
CREATE VIEW view_1_tab1_1032 AS SELECT pk, col0 FROM tab1 WHERE col4 <= 10.93

statement ok
CREATE VIEW view_2_tab1_1032 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 10.93)

statement ok
CREATE VIEW view_3_tab1_1032 AS SELECT pk FROM view_1_tab1_1032

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE col4 <= 10.93
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 10.93)
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_1032
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_1032
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 10.93 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1032 UNION ALL SELECT pk, col0 FROM view_2_tab1_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 10.93 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1032 UNION SELECT pk, col0 FROM view_2_tab1_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 <= 10.93 ) AS tab1_1032
----
0
6

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_1032
----
0
6

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE col4 <= 10.93
----
0
6

statement ok
DROP VIEW view_1_tab1_1032

statement ok
DROP VIEW view_2_tab1_1032

statement ok
DROP VIEW view_3_tab1_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1032') DROP VIEW view_1_tab2_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1032') DROP VIEW view_2_tab2_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1032') DROP VIEW view_3_tab2_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1032

statement ok
CREATE VIEW view_1_tab2_1032 AS SELECT pk, col0 FROM tab2 WHERE col4 <= 10.93

statement ok
CREATE VIEW view_2_tab2_1032 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 10.93)

statement ok
CREATE VIEW view_3_tab2_1032 AS SELECT pk FROM view_1_tab2_1032

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE col4 <= 10.93
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 10.93)
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_1032
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_1032
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 10.93 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1032 UNION ALL SELECT pk, col0 FROM view_2_tab2_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 10.93 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1032 UNION SELECT pk, col0 FROM view_2_tab2_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 <= 10.93 ) AS tab2_1032
----
0
6

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_1032
----
0
6

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE col4 <= 10.93
----
0
6

statement ok
DROP VIEW view_1_tab2_1032

statement ok
DROP VIEW view_2_tab2_1032

statement ok
DROP VIEW view_3_tab2_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1032') DROP VIEW view_1_tab3_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1032') DROP VIEW view_2_tab3_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1032') DROP VIEW view_3_tab3_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1032

statement ok
CREATE VIEW view_1_tab3_1032 AS SELECT pk, col0 FROM tab3 WHERE col4 <= 10.93

statement ok
CREATE VIEW view_2_tab3_1032 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 10.93)

statement ok
CREATE VIEW view_3_tab3_1032 AS SELECT pk FROM view_1_tab3_1032

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE col4 <= 10.93
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 10.93)
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_1032
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_1032
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 10.93 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1032 UNION ALL SELECT pk, col0 FROM view_2_tab3_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 10.93 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1032 UNION SELECT pk, col0 FROM view_2_tab3_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 <= 10.93 ) AS tab3_1032
----
0
6

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_1032
----
0
6

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE col4 <= 10.93
----
0
6

statement ok
DROP VIEW view_1_tab3_1032

statement ok
DROP VIEW view_2_tab3_1032

statement ok
DROP VIEW view_3_tab3_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1032') DROP VIEW view_1_tab4_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1032') DROP VIEW view_2_tab4_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1032') DROP VIEW view_3_tab4_1032

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1032

statement ok
CREATE VIEW view_1_tab4_1032 AS SELECT pk, col0 FROM tab4 WHERE col4 <= 10.93

statement ok
CREATE VIEW view_2_tab4_1032 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 10.93)

statement ok
CREATE VIEW view_3_tab4_1032 AS SELECT pk FROM view_1_tab4_1032

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE col4 <= 10.93
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 10.93)
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_1032
----
0
71
6
36

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_1032
----
16 values hashing to d992ad23704fd2aacd5870d16f7a6f03

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 10.93 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1032 UNION ALL SELECT pk, col0 FROM view_2_tab4_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 10.93 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 10.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1032 UNION SELECT pk, col0 FROM view_2_tab4_1032
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 <= 10.93 ) AS tab4_1032
----
0
6

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_1032
----
0
6

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE col4 <= 10.93
----
0
6

statement ok
DROP VIEW view_1_tab4_1032

statement ok
DROP VIEW view_2_tab4_1032

statement ok
DROP VIEW view_3_tab4_1032

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1033') DROP VIEW view_1_tab0_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1033') DROP VIEW view_2_tab0_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1033') DROP VIEW view_3_tab0_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1033

statement ok
CREATE VIEW view_1_tab0_1033 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 74.47

statement ok
CREATE VIEW view_2_tab0_1033 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 74.47)

statement ok
CREATE VIEW view_3_tab0_1033 AS SELECT pk FROM view_1_tab0_1033

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 74.47
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 74.47)
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_1033
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_1033
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 74.47 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1033 UNION ALL SELECT pk, col0 FROM view_2_tab0_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 74.47 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1033 UNION SELECT pk, col0 FROM view_2_tab0_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 74.47 ) AS tab0_1033
----
3

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_1033
----
3

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE col4 >= 74.47
----
3

statement ok
DROP VIEW view_1_tab0_1033

statement ok
DROP VIEW view_2_tab0_1033

statement ok
DROP VIEW view_3_tab0_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1033') DROP VIEW view_1_tab1_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1033') DROP VIEW view_2_tab1_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1033') DROP VIEW view_3_tab1_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1033

statement ok
CREATE VIEW view_1_tab1_1033 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 74.47

statement ok
CREATE VIEW view_2_tab1_1033 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 74.47)

statement ok
CREATE VIEW view_3_tab1_1033 AS SELECT pk FROM view_1_tab1_1033

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 74.47
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 74.47)
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_1033
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_1033
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 74.47 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1033 UNION ALL SELECT pk, col0 FROM view_2_tab1_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 74.47 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1033 UNION SELECT pk, col0 FROM view_2_tab1_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 74.47 ) AS tab1_1033
----
3

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_1033
----
3

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE col4 >= 74.47
----
3

statement ok
DROP VIEW view_1_tab1_1033

statement ok
DROP VIEW view_2_tab1_1033

statement ok
DROP VIEW view_3_tab1_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1033') DROP VIEW view_1_tab2_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1033') DROP VIEW view_2_tab2_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1033') DROP VIEW view_3_tab2_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1033

statement ok
CREATE VIEW view_1_tab2_1033 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 74.47

statement ok
CREATE VIEW view_2_tab2_1033 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 74.47)

statement ok
CREATE VIEW view_3_tab2_1033 AS SELECT pk FROM view_1_tab2_1033

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 74.47
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 74.47)
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_1033
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_1033
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 74.47 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1033 UNION ALL SELECT pk, col0 FROM view_2_tab2_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 74.47 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1033 UNION SELECT pk, col0 FROM view_2_tab2_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 74.47 ) AS tab2_1033
----
3

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_1033
----
3

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE col4 >= 74.47
----
3

statement ok
DROP VIEW view_1_tab2_1033

statement ok
DROP VIEW view_2_tab2_1033

statement ok
DROP VIEW view_3_tab2_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1033') DROP VIEW view_1_tab3_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1033') DROP VIEW view_2_tab3_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1033') DROP VIEW view_3_tab3_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1033

statement ok
CREATE VIEW view_1_tab3_1033 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 74.47

statement ok
CREATE VIEW view_2_tab3_1033 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 74.47)

statement ok
CREATE VIEW view_3_tab3_1033 AS SELECT pk FROM view_1_tab3_1033

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 74.47
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 74.47)
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_1033
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_1033
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 74.47 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1033 UNION ALL SELECT pk, col0 FROM view_2_tab3_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 74.47 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1033 UNION SELECT pk, col0 FROM view_2_tab3_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 74.47 ) AS tab3_1033
----
3

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_1033
----
3

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE col4 >= 74.47
----
3

statement ok
DROP VIEW view_1_tab3_1033

statement ok
DROP VIEW view_2_tab3_1033

statement ok
DROP VIEW view_3_tab3_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1033') DROP VIEW view_1_tab4_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1033') DROP VIEW view_2_tab4_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1033') DROP VIEW view_3_tab4_1033

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1033

statement ok
CREATE VIEW view_1_tab4_1033 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 74.47

statement ok
CREATE VIEW view_2_tab4_1033 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 74.47)

statement ok
CREATE VIEW view_3_tab4_1033 AS SELECT pk FROM view_1_tab4_1033

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 74.47
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 74.47)
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_1033
----
3
5

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_1033
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 74.47 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1033 UNION ALL SELECT pk, col0 FROM view_2_tab4_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 74.47 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 74.47)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1033 UNION SELECT pk, col0 FROM view_2_tab4_1033
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 74.47 ) AS tab4_1033
----
3

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_1033
----
3

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE col4 >= 74.47
----
3

statement ok
DROP VIEW view_1_tab4_1033

statement ok
DROP VIEW view_2_tab4_1033

statement ok
DROP VIEW view_3_tab4_1033

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1035') DROP VIEW view_1_tab0_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1035') DROP VIEW view_2_tab0_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1035') DROP VIEW view_3_tab0_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1035

statement ok
CREATE VIEW view_1_tab0_1035 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 14

statement ok
CREATE VIEW view_2_tab0_1035 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 14)

statement ok
CREATE VIEW view_3_tab0_1035 AS SELECT pk FROM view_1_tab0_1035

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_1035
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_1035
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 14 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1035 UNION ALL SELECT pk, col0 FROM view_2_tab0_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 14 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1035 UNION SELECT pk, col0 FROM view_2_tab0_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 14 ) AS tab0_1035
----
3
7
8

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_1035
----
3
7
8

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab0_1035

statement ok
DROP VIEW view_2_tab0_1035

statement ok
DROP VIEW view_3_tab0_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1035') DROP VIEW view_1_tab1_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1035') DROP VIEW view_2_tab1_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1035') DROP VIEW view_3_tab1_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1035

statement ok
CREATE VIEW view_1_tab1_1035 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 14

statement ok
CREATE VIEW view_2_tab1_1035 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 14)

statement ok
CREATE VIEW view_3_tab1_1035 AS SELECT pk FROM view_1_tab1_1035

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_1035
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_1035
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 14 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1035 UNION ALL SELECT pk, col0 FROM view_2_tab1_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 14 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1035 UNION SELECT pk, col0 FROM view_2_tab1_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 14 ) AS tab1_1035
----
3
7
8

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_1035
----
3
7
8

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab1_1035

statement ok
DROP VIEW view_2_tab1_1035

statement ok
DROP VIEW view_3_tab1_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1035') DROP VIEW view_1_tab2_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1035') DROP VIEW view_2_tab2_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1035') DROP VIEW view_3_tab2_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1035

statement ok
CREATE VIEW view_1_tab2_1035 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 14

statement ok
CREATE VIEW view_2_tab2_1035 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 14)

statement ok
CREATE VIEW view_3_tab2_1035 AS SELECT pk FROM view_1_tab2_1035

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_1035
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_1035
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 14 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1035 UNION ALL SELECT pk, col0 FROM view_2_tab2_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 14 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1035 UNION SELECT pk, col0 FROM view_2_tab2_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 14 ) AS tab2_1035
----
3
7
8

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_1035
----
3
7
8

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab2_1035

statement ok
DROP VIEW view_2_tab2_1035

statement ok
DROP VIEW view_3_tab2_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1035') DROP VIEW view_1_tab3_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1035') DROP VIEW view_2_tab3_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1035') DROP VIEW view_3_tab3_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1035

statement ok
CREATE VIEW view_1_tab3_1035 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 14

statement ok
CREATE VIEW view_2_tab3_1035 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 14)

statement ok
CREATE VIEW view_3_tab3_1035 AS SELECT pk FROM view_1_tab3_1035

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_1035
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_1035
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 14 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1035 UNION ALL SELECT pk, col0 FROM view_2_tab3_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 14 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1035 UNION SELECT pk, col0 FROM view_2_tab3_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 14 ) AS tab3_1035
----
3
7
8

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_1035
----
3
7
8

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab3_1035

statement ok
DROP VIEW view_2_tab3_1035

statement ok
DROP VIEW view_3_tab3_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1035') DROP VIEW view_1_tab4_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1035') DROP VIEW view_2_tab4_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1035') DROP VIEW view_3_tab4_1035

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1035

statement ok
CREATE VIEW view_1_tab4_1035 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 14

statement ok
CREATE VIEW view_2_tab4_1035 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 14)

statement ok
CREATE VIEW view_3_tab4_1035 AS SELECT pk FROM view_1_tab4_1035

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_1035
----
3
5
7
9
8
14

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_1035
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 14 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1035 UNION ALL SELECT pk, col0 FROM view_2_tab4_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 14 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1035 UNION SELECT pk, col0 FROM view_2_tab4_1035
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 14 ) AS tab4_1035
----
3
7
8

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_1035
----
3
7
8

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab4_1035

statement ok
DROP VIEW view_2_tab4_1035

statement ok
DROP VIEW view_3_tab4_1035

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1036') DROP VIEW view_1_tab0_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1036') DROP VIEW view_2_tab0_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1036') DROP VIEW view_3_tab0_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1036

statement ok
CREATE VIEW view_1_tab0_1036 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)

statement ok
CREATE VIEW view_2_tab0_1036 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))

statement ok
CREATE VIEW view_3_tab0_1036 AS SELECT pk FROM view_1_tab0_1036

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
0
71
8
14

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_1036
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_1036
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1036 UNION ALL SELECT pk, col0 FROM view_2_tab0_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1036 UNION SELECT pk, col0 FROM view_2_tab0_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) ) AS tab0_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab0_1036

statement ok
DROP VIEW view_2_tab0_1036

statement ok
DROP VIEW view_3_tab0_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1036') DROP VIEW view_1_tab1_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1036') DROP VIEW view_2_tab1_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1036') DROP VIEW view_3_tab1_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1036

statement ok
CREATE VIEW view_1_tab1_1036 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)

statement ok
CREATE VIEW view_2_tab1_1036 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))

statement ok
CREATE VIEW view_3_tab1_1036 AS SELECT pk FROM view_1_tab1_1036

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
0
71
8
14

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_1036
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_1036
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1036 UNION ALL SELECT pk, col0 FROM view_2_tab1_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1036 UNION SELECT pk, col0 FROM view_2_tab1_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) ) AS tab1_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab1_1036

statement ok
DROP VIEW view_2_tab1_1036

statement ok
DROP VIEW view_3_tab1_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1036') DROP VIEW view_1_tab2_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1036') DROP VIEW view_2_tab2_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1036') DROP VIEW view_3_tab2_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1036

statement ok
CREATE VIEW view_1_tab2_1036 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)

statement ok
CREATE VIEW view_2_tab2_1036 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))

statement ok
CREATE VIEW view_3_tab2_1036 AS SELECT pk FROM view_1_tab2_1036

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
0
71
8
14

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_1036
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_1036
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1036 UNION ALL SELECT pk, col0 FROM view_2_tab2_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1036 UNION SELECT pk, col0 FROM view_2_tab2_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) ) AS tab2_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab2_1036

statement ok
DROP VIEW view_2_tab2_1036

statement ok
DROP VIEW view_3_tab2_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1036') DROP VIEW view_1_tab3_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1036') DROP VIEW view_2_tab3_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1036') DROP VIEW view_3_tab3_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1036

statement ok
CREATE VIEW view_1_tab3_1036 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)

statement ok
CREATE VIEW view_2_tab3_1036 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))

statement ok
CREATE VIEW view_3_tab3_1036 AS SELECT pk FROM view_1_tab3_1036

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
0
71
8
14

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_1036
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_1036
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1036 UNION ALL SELECT pk, col0 FROM view_2_tab3_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1036 UNION SELECT pk, col0 FROM view_2_tab3_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) ) AS tab3_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab3_1036

statement ok
DROP VIEW view_2_tab3_1036

statement ok
DROP VIEW view_3_tab3_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1036') DROP VIEW view_1_tab4_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1036') DROP VIEW view_2_tab4_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1036') DROP VIEW view_3_tab4_1036

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1036

statement ok
CREATE VIEW view_1_tab4_1036 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)

statement ok
CREATE VIEW view_2_tab4_1036 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))

statement ok
CREATE VIEW view_3_tab4_1036 AS SELECT pk FROM view_1_tab4_1036

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
0
71
8
14

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_1036
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_1036
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1036 UNION ALL SELECT pk, col0 FROM view_2_tab4_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1036 UNION SELECT pk, col0 FROM view_2_tab4_1036
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80) ) AS tab4_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_1036
----
1
2
3
4
5
6
7
9

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE col3 >= 19 OR col4 >= 22.98 OR (col3 >= 80)
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab4_1036

statement ok
DROP VIEW view_2_tab4_1036

statement ok
DROP VIEW view_3_tab4_1036

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1037') DROP VIEW view_1_tab0_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1037') DROP VIEW view_2_tab0_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1037') DROP VIEW view_3_tab0_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1037

statement ok
CREATE VIEW view_1_tab0_1037 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 78

statement ok
CREATE VIEW view_2_tab0_1037 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 78)

statement ok
CREATE VIEW view_3_tab0_1037 AS SELECT pk FROM view_1_tab0_1037

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 78
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 78)
----
6
36

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_1037
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_1037
----
6
36

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 78 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1037 UNION ALL SELECT pk, col0 FROM view_2_tab0_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 78 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1037 UNION SELECT pk, col0 FROM view_2_tab0_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 78 ) AS tab0_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col3 <= 78
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_1037

statement ok
DROP VIEW view_2_tab0_1037

statement ok
DROP VIEW view_3_tab0_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1037') DROP VIEW view_1_tab1_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1037') DROP VIEW view_2_tab1_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1037') DROP VIEW view_3_tab1_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1037

statement ok
CREATE VIEW view_1_tab1_1037 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 78

statement ok
CREATE VIEW view_2_tab1_1037 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 78)

statement ok
CREATE VIEW view_3_tab1_1037 AS SELECT pk FROM view_1_tab1_1037

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 78
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 78)
----
6
36

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_1037
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_1037
----
6
36

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 78 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1037 UNION ALL SELECT pk, col0 FROM view_2_tab1_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 78 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1037 UNION SELECT pk, col0 FROM view_2_tab1_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 78 ) AS tab1_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col3 <= 78
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_1037

statement ok
DROP VIEW view_2_tab1_1037

statement ok
DROP VIEW view_3_tab1_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1037') DROP VIEW view_1_tab2_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1037') DROP VIEW view_2_tab2_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1037') DROP VIEW view_3_tab2_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1037

statement ok
CREATE VIEW view_1_tab2_1037 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 78

statement ok
CREATE VIEW view_2_tab2_1037 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 78)

statement ok
CREATE VIEW view_3_tab2_1037 AS SELECT pk FROM view_1_tab2_1037

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 78
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 78)
----
6
36

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_1037
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_1037
----
6
36

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 78 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1037 UNION ALL SELECT pk, col0 FROM view_2_tab2_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 78 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1037 UNION SELECT pk, col0 FROM view_2_tab2_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 78 ) AS tab2_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col3 <= 78
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_1037

statement ok
DROP VIEW view_2_tab2_1037

statement ok
DROP VIEW view_3_tab2_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1037') DROP VIEW view_1_tab3_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1037') DROP VIEW view_2_tab3_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1037') DROP VIEW view_3_tab3_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1037

statement ok
CREATE VIEW view_1_tab3_1037 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 78

statement ok
CREATE VIEW view_2_tab3_1037 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 78)

statement ok
CREATE VIEW view_3_tab3_1037 AS SELECT pk FROM view_1_tab3_1037

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 78
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 78)
----
6
36

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_1037
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_1037
----
6
36

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 78 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1037 UNION ALL SELECT pk, col0 FROM view_2_tab3_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 78 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1037 UNION SELECT pk, col0 FROM view_2_tab3_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 78 ) AS tab3_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col3 <= 78
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_1037

statement ok
DROP VIEW view_2_tab3_1037

statement ok
DROP VIEW view_3_tab3_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1037') DROP VIEW view_1_tab4_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1037') DROP VIEW view_2_tab4_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1037') DROP VIEW view_3_tab4_1037

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1037

statement ok
CREATE VIEW view_1_tab4_1037 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 78

statement ok
CREATE VIEW view_2_tab4_1037 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 78)

statement ok
CREATE VIEW view_3_tab4_1037 AS SELECT pk FROM view_1_tab4_1037

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 78
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 78)
----
6
36

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_1037
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_1037
----
6
36

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 78 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1037 UNION ALL SELECT pk, col0 FROM view_2_tab4_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 78 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1037 UNION SELECT pk, col0 FROM view_2_tab4_1037
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 78 ) AS tab4_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_1037
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col3 <= 78
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_1037

statement ok
DROP VIEW view_2_tab4_1037

statement ok
DROP VIEW view_3_tab4_1037

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1038') DROP VIEW view_1_tab0_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1038') DROP VIEW view_2_tab0_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1038') DROP VIEW view_3_tab0_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1038

statement ok
CREATE VIEW view_1_tab0_1038 AS SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))

statement ok
CREATE VIEW view_2_tab0_1038 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))

statement ok
CREATE VIEW view_3_tab0_1038 AS SELECT pk FROM view_1_tab0_1038

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_1038
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_1038
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1038 UNION ALL SELECT pk, col0 FROM view_2_tab0_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1038 UNION SELECT pk, col0 FROM view_2_tab0_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) ) AS tab0_1038
----
6

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_1038
----
6

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6

statement ok
DROP VIEW view_1_tab0_1038

statement ok
DROP VIEW view_2_tab0_1038

statement ok
DROP VIEW view_3_tab0_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1038') DROP VIEW view_1_tab1_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1038') DROP VIEW view_2_tab1_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1038') DROP VIEW view_3_tab1_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1038

statement ok
CREATE VIEW view_1_tab1_1038 AS SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))

statement ok
CREATE VIEW view_2_tab1_1038 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))

statement ok
CREATE VIEW view_3_tab1_1038 AS SELECT pk FROM view_1_tab1_1038

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_1038
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_1038
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1038 UNION ALL SELECT pk, col0 FROM view_2_tab1_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1038 UNION SELECT pk, col0 FROM view_2_tab1_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) ) AS tab1_1038
----
6

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_1038
----
6

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6

statement ok
DROP VIEW view_1_tab1_1038

statement ok
DROP VIEW view_2_tab1_1038

statement ok
DROP VIEW view_3_tab1_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1038') DROP VIEW view_1_tab2_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1038') DROP VIEW view_2_tab2_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1038') DROP VIEW view_3_tab2_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1038

statement ok
CREATE VIEW view_1_tab2_1038 AS SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))

statement ok
CREATE VIEW view_2_tab2_1038 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))

statement ok
CREATE VIEW view_3_tab2_1038 AS SELECT pk FROM view_1_tab2_1038

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_1038
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_1038
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1038 UNION ALL SELECT pk, col0 FROM view_2_tab2_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1038 UNION SELECT pk, col0 FROM view_2_tab2_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) ) AS tab2_1038
----
6

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_1038
----
6

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6

statement ok
DROP VIEW view_1_tab2_1038

statement ok
DROP VIEW view_2_tab2_1038

statement ok
DROP VIEW view_3_tab2_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1038') DROP VIEW view_1_tab3_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1038') DROP VIEW view_2_tab3_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1038') DROP VIEW view_3_tab3_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1038

statement ok
CREATE VIEW view_1_tab3_1038 AS SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))

statement ok
CREATE VIEW view_2_tab3_1038 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))

statement ok
CREATE VIEW view_3_tab3_1038 AS SELECT pk FROM view_1_tab3_1038

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_1038
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_1038
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1038 UNION ALL SELECT pk, col0 FROM view_2_tab3_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1038 UNION SELECT pk, col0 FROM view_2_tab3_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) ) AS tab3_1038
----
6

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_1038
----
6

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6

statement ok
DROP VIEW view_1_tab3_1038

statement ok
DROP VIEW view_2_tab3_1038

statement ok
DROP VIEW view_3_tab3_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1038') DROP VIEW view_1_tab4_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1038') DROP VIEW view_2_tab4_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1038') DROP VIEW view_3_tab4_1038

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1038

statement ok
CREATE VIEW view_1_tab4_1038 AS SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))

statement ok
CREATE VIEW view_2_tab4_1038 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))

statement ok
CREATE VIEW view_3_tab4_1038 AS SELECT pk FROM view_1_tab4_1038

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_1038
----
6
36

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_1038
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1038 UNION ALL SELECT pk, col0 FROM view_2_tab4_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL) AND col3 > 51 OR col3 >= 87)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1038 UNION SELECT pk, col0 FROM view_2_tab4_1038
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87)) ) AS tab4_1038
----
6

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_1038
----
6

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE (((col3 IS NULL) AND col3 > 51 OR col3 >= 87))
----
6

statement ok
DROP VIEW view_1_tab4_1038

statement ok
DROP VIEW view_2_tab4_1038

statement ok
DROP VIEW view_3_tab4_1038

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1039') DROP VIEW view_1_tab0_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1039') DROP VIEW view_2_tab0_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1039') DROP VIEW view_3_tab0_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1039

statement ok
CREATE VIEW view_1_tab0_1039 AS SELECT pk, col0 FROM tab0 WHERE col4 = 51.56

statement ok
CREATE VIEW view_2_tab0_1039 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 51.56)

statement ok
CREATE VIEW view_3_tab0_1039 AS SELECT pk FROM view_1_tab0_1039

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE col4 = 51.56
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_1039
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 51.56 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1039 UNION ALL SELECT pk, col0 FROM view_2_tab0_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 51.56 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1039 UNION SELECT pk, col0 FROM view_2_tab0_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 = 51.56 ) AS tab0_1039
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_1039
----

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE col4 = 51.56
----

statement ok
DROP VIEW view_1_tab0_1039

statement ok
DROP VIEW view_2_tab0_1039

statement ok
DROP VIEW view_3_tab0_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1039') DROP VIEW view_1_tab1_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1039') DROP VIEW view_2_tab1_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1039') DROP VIEW view_3_tab1_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1039

statement ok
CREATE VIEW view_1_tab1_1039 AS SELECT pk, col0 FROM tab1 WHERE col4 = 51.56

statement ok
CREATE VIEW view_2_tab1_1039 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 51.56)

statement ok
CREATE VIEW view_3_tab1_1039 AS SELECT pk FROM view_1_tab1_1039

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE col4 = 51.56
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_1039
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 51.56 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1039 UNION ALL SELECT pk, col0 FROM view_2_tab1_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 51.56 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1039 UNION SELECT pk, col0 FROM view_2_tab1_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 = 51.56 ) AS tab1_1039
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_1039
----

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE col4 = 51.56
----

statement ok
DROP VIEW view_1_tab1_1039

statement ok
DROP VIEW view_2_tab1_1039

statement ok
DROP VIEW view_3_tab1_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1039') DROP VIEW view_1_tab2_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1039') DROP VIEW view_2_tab2_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1039') DROP VIEW view_3_tab2_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1039

statement ok
CREATE VIEW view_1_tab2_1039 AS SELECT pk, col0 FROM tab2 WHERE col4 = 51.56

statement ok
CREATE VIEW view_2_tab2_1039 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 51.56)

statement ok
CREATE VIEW view_3_tab2_1039 AS SELECT pk FROM view_1_tab2_1039

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE col4 = 51.56
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_1039
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 51.56 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1039 UNION ALL SELECT pk, col0 FROM view_2_tab2_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 51.56 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1039 UNION SELECT pk, col0 FROM view_2_tab2_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 = 51.56 ) AS tab2_1039
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_1039
----

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE col4 = 51.56
----

statement ok
DROP VIEW view_1_tab2_1039

statement ok
DROP VIEW view_2_tab2_1039

statement ok
DROP VIEW view_3_tab2_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1039') DROP VIEW view_1_tab3_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1039') DROP VIEW view_2_tab3_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1039') DROP VIEW view_3_tab3_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1039

statement ok
CREATE VIEW view_1_tab3_1039 AS SELECT pk, col0 FROM tab3 WHERE col4 = 51.56

statement ok
CREATE VIEW view_2_tab3_1039 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 51.56)

statement ok
CREATE VIEW view_3_tab3_1039 AS SELECT pk FROM view_1_tab3_1039

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE col4 = 51.56
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_1039
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 51.56 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1039 UNION ALL SELECT pk, col0 FROM view_2_tab3_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 51.56 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1039 UNION SELECT pk, col0 FROM view_2_tab3_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 = 51.56 ) AS tab3_1039
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_1039
----

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE col4 = 51.56
----

statement ok
DROP VIEW view_1_tab3_1039

statement ok
DROP VIEW view_2_tab3_1039

statement ok
DROP VIEW view_3_tab3_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1039') DROP VIEW view_1_tab4_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1039') DROP VIEW view_2_tab4_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1039') DROP VIEW view_3_tab4_1039

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1039

statement ok
CREATE VIEW view_1_tab4_1039 AS SELECT pk, col0 FROM tab4 WHERE col4 = 51.56

statement ok
CREATE VIEW view_2_tab4_1039 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 51.56)

statement ok
CREATE VIEW view_3_tab4_1039 AS SELECT pk FROM view_1_tab4_1039

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE col4 = 51.56
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_1039
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 51.56 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1039 UNION ALL SELECT pk, col0 FROM view_2_tab4_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 51.56 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 51.56)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1039 UNION SELECT pk, col0 FROM view_2_tab4_1039
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 = 51.56 ) AS tab4_1039
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_1039
----

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE col4 = 51.56
----

statement ok
DROP VIEW view_1_tab4_1039

statement ok
DROP VIEW view_2_tab4_1039

statement ok
DROP VIEW view_3_tab4_1039

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1040') DROP VIEW view_1_tab0_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1040') DROP VIEW view_2_tab0_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1040') DROP VIEW view_3_tab0_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1040

statement ok
CREATE VIEW view_1_tab0_1040 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 91)

statement ok
CREATE VIEW view_2_tab0_1040 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91))

statement ok
CREATE VIEW view_3_tab0_1040 AS SELECT pk FROM view_1_tab0_1040

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 91)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_1040
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1040 UNION ALL SELECT pk, col0 FROM view_2_tab0_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1040 UNION SELECT pk, col0 FROM view_2_tab0_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) ) AS tab0_1040
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_1040
----

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE (col3 >= 91)
----

statement ok
DROP VIEW view_1_tab0_1040

statement ok
DROP VIEW view_2_tab0_1040

statement ok
DROP VIEW view_3_tab0_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1040') DROP VIEW view_1_tab1_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1040') DROP VIEW view_2_tab1_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1040') DROP VIEW view_3_tab1_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1040

statement ok
CREATE VIEW view_1_tab1_1040 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 91)

statement ok
CREATE VIEW view_2_tab1_1040 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91))

statement ok
CREATE VIEW view_3_tab1_1040 AS SELECT pk FROM view_1_tab1_1040

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 91)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_1040
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1040 UNION ALL SELECT pk, col0 FROM view_2_tab1_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1040 UNION SELECT pk, col0 FROM view_2_tab1_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) ) AS tab1_1040
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_1040
----

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE (col3 >= 91)
----

statement ok
DROP VIEW view_1_tab1_1040

statement ok
DROP VIEW view_2_tab1_1040

statement ok
DROP VIEW view_3_tab1_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1040') DROP VIEW view_1_tab2_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1040') DROP VIEW view_2_tab2_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1040') DROP VIEW view_3_tab2_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1040

statement ok
CREATE VIEW view_1_tab2_1040 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 91)

statement ok
CREATE VIEW view_2_tab2_1040 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91))

statement ok
CREATE VIEW view_3_tab2_1040 AS SELECT pk FROM view_1_tab2_1040

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 91)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_1040
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1040 UNION ALL SELECT pk, col0 FROM view_2_tab2_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1040 UNION SELECT pk, col0 FROM view_2_tab2_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) ) AS tab2_1040
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_1040
----

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE (col3 >= 91)
----

statement ok
DROP VIEW view_1_tab2_1040

statement ok
DROP VIEW view_2_tab2_1040

statement ok
DROP VIEW view_3_tab2_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1040') DROP VIEW view_1_tab3_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1040') DROP VIEW view_2_tab3_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1040') DROP VIEW view_3_tab3_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1040

statement ok
CREATE VIEW view_1_tab3_1040 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 91)

statement ok
CREATE VIEW view_2_tab3_1040 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91))

statement ok
CREATE VIEW view_3_tab3_1040 AS SELECT pk FROM view_1_tab3_1040

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 91)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_1040
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1040 UNION ALL SELECT pk, col0 FROM view_2_tab3_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1040 UNION SELECT pk, col0 FROM view_2_tab3_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) ) AS tab3_1040
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_1040
----

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE (col3 >= 91)
----

statement ok
DROP VIEW view_1_tab3_1040

statement ok
DROP VIEW view_2_tab3_1040

statement ok
DROP VIEW view_3_tab3_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1040') DROP VIEW view_1_tab4_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1040') DROP VIEW view_2_tab4_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1040') DROP VIEW view_3_tab4_1040

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1040

statement ok
CREATE VIEW view_1_tab4_1040 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 91)

statement ok
CREATE VIEW view_2_tab4_1040 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91))

statement ok
CREATE VIEW view_3_tab4_1040 AS SELECT pk FROM view_1_tab4_1040

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 91)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_1040
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1040 UNION ALL SELECT pk, col0 FROM view_2_tab4_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1040 UNION SELECT pk, col0 FROM view_2_tab4_1040
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) ) AS tab4_1040
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_1040
----

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE (col3 >= 91)
----

statement ok
DROP VIEW view_1_tab4_1040

statement ok
DROP VIEW view_2_tab4_1040

statement ok
DROP VIEW view_3_tab4_1040

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1041') DROP VIEW view_1_tab0_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1041') DROP VIEW view_2_tab0_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1041') DROP VIEW view_3_tab0_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1041

statement ok
CREATE VIEW view_1_tab0_1041 AS SELECT pk, col0 FROM tab0 WHERE ((col4 <= 6.77) AND col3 > 79)

statement ok
CREATE VIEW view_2_tab0_1041 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 6.77) AND col3 > 79))

statement ok
CREATE VIEW view_3_tab0_1041 AS SELECT pk FROM view_1_tab0_1041

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 6.77) AND col3 > 79)
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_1041
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 6.77) AND col3 > 79) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1041 UNION ALL SELECT pk, col0 FROM view_2_tab0_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 6.77) AND col3 > 79) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1041 UNION SELECT pk, col0 FROM view_2_tab0_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 <= 6.77) AND col3 > 79) ) AS tab0_1041
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_1041
----

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE ((col4 <= 6.77) AND col3 > 79)
----

statement ok
DROP VIEW view_1_tab0_1041

statement ok
DROP VIEW view_2_tab0_1041

statement ok
DROP VIEW view_3_tab0_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1041') DROP VIEW view_1_tab1_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1041') DROP VIEW view_2_tab1_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1041') DROP VIEW view_3_tab1_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1041

statement ok
CREATE VIEW view_1_tab1_1041 AS SELECT pk, col0 FROM tab1 WHERE ((col4 <= 6.77) AND col3 > 79)

statement ok
CREATE VIEW view_2_tab1_1041 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 6.77) AND col3 > 79))

statement ok
CREATE VIEW view_3_tab1_1041 AS SELECT pk FROM view_1_tab1_1041

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 6.77) AND col3 > 79)
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_1041
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 6.77) AND col3 > 79) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1041 UNION ALL SELECT pk, col0 FROM view_2_tab1_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 6.77) AND col3 > 79) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1041 UNION SELECT pk, col0 FROM view_2_tab1_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 <= 6.77) AND col3 > 79) ) AS tab1_1041
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_1041
----

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE ((col4 <= 6.77) AND col3 > 79)
----

statement ok
DROP VIEW view_1_tab1_1041

statement ok
DROP VIEW view_2_tab1_1041

statement ok
DROP VIEW view_3_tab1_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1041') DROP VIEW view_1_tab2_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1041') DROP VIEW view_2_tab2_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1041') DROP VIEW view_3_tab2_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1041

statement ok
CREATE VIEW view_1_tab2_1041 AS SELECT pk, col0 FROM tab2 WHERE ((col4 <= 6.77) AND col3 > 79)

statement ok
CREATE VIEW view_2_tab2_1041 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 6.77) AND col3 > 79))

statement ok
CREATE VIEW view_3_tab2_1041 AS SELECT pk FROM view_1_tab2_1041

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 6.77) AND col3 > 79)
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_1041
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 6.77) AND col3 > 79) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1041 UNION ALL SELECT pk, col0 FROM view_2_tab2_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 6.77) AND col3 > 79) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1041 UNION SELECT pk, col0 FROM view_2_tab2_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 <= 6.77) AND col3 > 79) ) AS tab2_1041
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_1041
----

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE ((col4 <= 6.77) AND col3 > 79)
----

statement ok
DROP VIEW view_1_tab2_1041

statement ok
DROP VIEW view_2_tab2_1041

statement ok
DROP VIEW view_3_tab2_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1041') DROP VIEW view_1_tab3_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1041') DROP VIEW view_2_tab3_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1041') DROP VIEW view_3_tab3_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1041

statement ok
CREATE VIEW view_1_tab3_1041 AS SELECT pk, col0 FROM tab3 WHERE ((col4 <= 6.77) AND col3 > 79)

statement ok
CREATE VIEW view_2_tab3_1041 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 6.77) AND col3 > 79))

statement ok
CREATE VIEW view_3_tab3_1041 AS SELECT pk FROM view_1_tab3_1041

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 6.77) AND col3 > 79)
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_1041
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 6.77) AND col3 > 79) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1041 UNION ALL SELECT pk, col0 FROM view_2_tab3_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 6.77) AND col3 > 79) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1041 UNION SELECT pk, col0 FROM view_2_tab3_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 <= 6.77) AND col3 > 79) ) AS tab3_1041
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_1041
----

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE ((col4 <= 6.77) AND col3 > 79)
----

statement ok
DROP VIEW view_1_tab3_1041

statement ok
DROP VIEW view_2_tab3_1041

statement ok
DROP VIEW view_3_tab3_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1041') DROP VIEW view_1_tab4_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1041') DROP VIEW view_2_tab4_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1041') DROP VIEW view_3_tab4_1041

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1041

statement ok
CREATE VIEW view_1_tab4_1041 AS SELECT pk, col0 FROM tab4 WHERE ((col4 <= 6.77) AND col3 > 79)

statement ok
CREATE VIEW view_2_tab4_1041 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 6.77) AND col3 > 79))

statement ok
CREATE VIEW view_3_tab4_1041 AS SELECT pk FROM view_1_tab4_1041

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 6.77) AND col3 > 79)
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_1041
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 6.77) AND col3 > 79) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1041 UNION ALL SELECT pk, col0 FROM view_2_tab4_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 6.77) AND col3 > 79) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 6.77) AND col3 > 79))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1041 UNION SELECT pk, col0 FROM view_2_tab4_1041
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 <= 6.77) AND col3 > 79) ) AS tab4_1041
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_1041
----

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE ((col4 <= 6.77) AND col3 > 79)
----

statement ok
DROP VIEW view_1_tab4_1041

statement ok
DROP VIEW view_2_tab4_1041

statement ok
DROP VIEW view_3_tab4_1041

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1042') DROP VIEW view_1_tab0_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1042') DROP VIEW view_2_tab0_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1042') DROP VIEW view_3_tab0_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1042

statement ok
CREATE VIEW view_1_tab0_1042 AS SELECT pk, col0 FROM tab0 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59

statement ok
CREATE VIEW view_2_tab0_1042 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)

statement ok
CREATE VIEW view_3_tab0_1042 AS SELECT pk FROM view_1_tab0_1042

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
3
5

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_1042
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_1042
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1042 UNION ALL SELECT pk, col0 FROM view_2_tab0_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1042 UNION SELECT pk, col0 FROM view_2_tab0_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 ) AS tab0_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab0 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_1042

statement ok
DROP VIEW view_2_tab0_1042

statement ok
DROP VIEW view_3_tab0_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1042') DROP VIEW view_1_tab1_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1042') DROP VIEW view_2_tab1_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1042') DROP VIEW view_3_tab1_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1042

statement ok
CREATE VIEW view_1_tab1_1042 AS SELECT pk, col0 FROM tab1 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59

statement ok
CREATE VIEW view_2_tab1_1042 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)

statement ok
CREATE VIEW view_3_tab1_1042 AS SELECT pk FROM view_1_tab1_1042

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
3
5

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_1042
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_1042
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1042 UNION ALL SELECT pk, col0 FROM view_2_tab1_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1042 UNION SELECT pk, col0 FROM view_2_tab1_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 ) AS tab1_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab1 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_1042

statement ok
DROP VIEW view_2_tab1_1042

statement ok
DROP VIEW view_3_tab1_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1042') DROP VIEW view_1_tab2_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1042') DROP VIEW view_2_tab2_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1042') DROP VIEW view_3_tab2_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1042

statement ok
CREATE VIEW view_1_tab2_1042 AS SELECT pk, col0 FROM tab2 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59

statement ok
CREATE VIEW view_2_tab2_1042 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)

statement ok
CREATE VIEW view_3_tab2_1042 AS SELECT pk FROM view_1_tab2_1042

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
3
5

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_1042
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_1042
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1042 UNION ALL SELECT pk, col0 FROM view_2_tab2_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1042 UNION SELECT pk, col0 FROM view_2_tab2_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 ) AS tab2_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab2 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_1042

statement ok
DROP VIEW view_2_tab2_1042

statement ok
DROP VIEW view_3_tab2_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1042') DROP VIEW view_1_tab3_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1042') DROP VIEW view_2_tab3_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1042') DROP VIEW view_3_tab3_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1042

statement ok
CREATE VIEW view_1_tab3_1042 AS SELECT pk, col0 FROM tab3 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59

statement ok
CREATE VIEW view_2_tab3_1042 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)

statement ok
CREATE VIEW view_3_tab3_1042 AS SELECT pk FROM view_1_tab3_1042

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
3
5

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_1042
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_1042
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1042 UNION ALL SELECT pk, col0 FROM view_2_tab3_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1042 UNION SELECT pk, col0 FROM view_2_tab3_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 ) AS tab3_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab3 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_1042

statement ok
DROP VIEW view_2_tab3_1042

statement ok
DROP VIEW view_3_tab3_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1042') DROP VIEW view_1_tab4_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1042') DROP VIEW view_2_tab4_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1042') DROP VIEW view_3_tab4_1042

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1042

statement ok
CREATE VIEW view_1_tab4_1042 AS SELECT pk, col0 FROM tab4 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59

statement ok
CREATE VIEW view_2_tab4_1042 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)

statement ok
CREATE VIEW view_3_tab4_1042 AS SELECT pk FROM view_1_tab4_1042

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
3
5

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_1042
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_1042
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1042 UNION ALL SELECT pk, col0 FROM view_2_tab4_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1042 UNION SELECT pk, col0 FROM view_2_tab4_1042
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59 ) AS tab4_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_1042
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE ((col0 > 16 OR ((col0 < 9 OR col3 IN (SELECT col0 FROM tab4 WHERE (col0 < 94) AND col0 <= 61))) AND col3 = 18 OR col3 < 55 AND col3 IN (76,76) OR col3 >= 86 AND ((((((col0 < 9)))) AND col0 = 70 OR col1 IS NULL) AND (col3 IN (31,92,0))))) AND col1 > 29.45 OR col4 < 19.59
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_1042

statement ok
DROP VIEW view_2_tab4_1042

statement ok
DROP VIEW view_3_tab4_1042

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1044') DROP VIEW view_1_tab0_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1044') DROP VIEW view_2_tab0_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1044') DROP VIEW view_3_tab0_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1044

statement ok
CREATE VIEW view_1_tab0_1044 AS SELECT pk, col0 FROM tab0 WHERE col1 > 21.41

statement ok
CREATE VIEW view_2_tab0_1044 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 21.41)

statement ok
CREATE VIEW view_3_tab0_1044 AS SELECT pk FROM view_1_tab0_1044

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE col1 > 21.41
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 21.41)
----
6
36
7
9
8
14
9
56

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_1044
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_1044
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 21.41 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1044 UNION ALL SELECT pk, col0 FROM view_2_tab0_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 21.41 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1044 UNION SELECT pk, col0 FROM view_2_tab0_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 21.41 ) AS tab0_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE col1 > 21.41
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab0_1044

statement ok
DROP VIEW view_2_tab0_1044

statement ok
DROP VIEW view_3_tab0_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1044') DROP VIEW view_1_tab1_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1044') DROP VIEW view_2_tab1_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1044') DROP VIEW view_3_tab1_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1044

statement ok
CREATE VIEW view_1_tab1_1044 AS SELECT pk, col0 FROM tab1 WHERE col1 > 21.41

statement ok
CREATE VIEW view_2_tab1_1044 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 21.41)

statement ok
CREATE VIEW view_3_tab1_1044 AS SELECT pk FROM view_1_tab1_1044

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE col1 > 21.41
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 21.41)
----
6
36
7
9
8
14
9
56

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_1044
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_1044
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 21.41 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1044 UNION ALL SELECT pk, col0 FROM view_2_tab1_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 21.41 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1044 UNION SELECT pk, col0 FROM view_2_tab1_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 21.41 ) AS tab1_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE col1 > 21.41
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab1_1044

statement ok
DROP VIEW view_2_tab1_1044

statement ok
DROP VIEW view_3_tab1_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1044') DROP VIEW view_1_tab2_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1044') DROP VIEW view_2_tab2_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1044') DROP VIEW view_3_tab2_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1044

statement ok
CREATE VIEW view_1_tab2_1044 AS SELECT pk, col0 FROM tab2 WHERE col1 > 21.41

statement ok
CREATE VIEW view_2_tab2_1044 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 21.41)

statement ok
CREATE VIEW view_3_tab2_1044 AS SELECT pk FROM view_1_tab2_1044

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE col1 > 21.41
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 21.41)
----
6
36
7
9
8
14
9
56

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_1044
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_1044
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 21.41 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1044 UNION ALL SELECT pk, col0 FROM view_2_tab2_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 21.41 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1044 UNION SELECT pk, col0 FROM view_2_tab2_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 21.41 ) AS tab2_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE col1 > 21.41
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab2_1044

statement ok
DROP VIEW view_2_tab2_1044

statement ok
DROP VIEW view_3_tab2_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1044') DROP VIEW view_1_tab3_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1044') DROP VIEW view_2_tab3_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1044') DROP VIEW view_3_tab3_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1044

statement ok
CREATE VIEW view_1_tab3_1044 AS SELECT pk, col0 FROM tab3 WHERE col1 > 21.41

statement ok
CREATE VIEW view_2_tab3_1044 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 21.41)

statement ok
CREATE VIEW view_3_tab3_1044 AS SELECT pk FROM view_1_tab3_1044

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE col1 > 21.41
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 21.41)
----
6
36
7
9
8
14
9
56

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_1044
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_1044
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 21.41 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1044 UNION ALL SELECT pk, col0 FROM view_2_tab3_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 21.41 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1044 UNION SELECT pk, col0 FROM view_2_tab3_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 21.41 ) AS tab3_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE col1 > 21.41
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab3_1044

statement ok
DROP VIEW view_2_tab3_1044

statement ok
DROP VIEW view_3_tab3_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1044') DROP VIEW view_1_tab4_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1044') DROP VIEW view_2_tab4_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1044') DROP VIEW view_3_tab4_1044

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1044

statement ok
CREATE VIEW view_1_tab4_1044 AS SELECT pk, col0 FROM tab4 WHERE col1 > 21.41

statement ok
CREATE VIEW view_2_tab4_1044 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 21.41)

statement ok
CREATE VIEW view_3_tab4_1044 AS SELECT pk FROM view_1_tab4_1044

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE col1 > 21.41
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 21.41)
----
6
36
7
9
8
14
9
56

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_1044
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_1044
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 21.41 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1044 UNION ALL SELECT pk, col0 FROM view_2_tab4_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 21.41 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 21.41)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1044 UNION SELECT pk, col0 FROM view_2_tab4_1044
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 21.41 ) AS tab4_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_1044
----
0
1
2
3
4
5

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE col1 > 21.41
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab4_1044

statement ok
DROP VIEW view_2_tab4_1044

statement ok
DROP VIEW view_3_tab4_1044

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1045') DROP VIEW view_1_tab0_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1045') DROP VIEW view_2_tab0_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1045') DROP VIEW view_3_tab0_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1045

statement ok
CREATE VIEW view_1_tab0_1045 AS SELECT pk, col0 FROM tab0 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74

statement ok
CREATE VIEW view_2_tab0_1045 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)

statement ok
CREATE VIEW view_3_tab0_1045 AS SELECT pk FROM view_1_tab0_1045

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_1045
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_1045
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1045 UNION ALL SELECT pk, col0 FROM view_2_tab0_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1045 UNION SELECT pk, col0 FROM view_2_tab0_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 ) AS tab0_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
3
4
5

statement ok
DROP VIEW view_1_tab0_1045

statement ok
DROP VIEW view_2_tab0_1045

statement ok
DROP VIEW view_3_tab0_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1045') DROP VIEW view_1_tab1_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1045') DROP VIEW view_2_tab1_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1045') DROP VIEW view_3_tab1_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1045

statement ok
CREATE VIEW view_1_tab1_1045 AS SELECT pk, col0 FROM tab1 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74

statement ok
CREATE VIEW view_2_tab1_1045 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)

statement ok
CREATE VIEW view_3_tab1_1045 AS SELECT pk FROM view_1_tab1_1045

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_1045
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_1045
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1045 UNION ALL SELECT pk, col0 FROM view_2_tab1_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1045 UNION SELECT pk, col0 FROM view_2_tab1_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 ) AS tab1_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
3
4
5

statement ok
DROP VIEW view_1_tab1_1045

statement ok
DROP VIEW view_2_tab1_1045

statement ok
DROP VIEW view_3_tab1_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1045') DROP VIEW view_1_tab2_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1045') DROP VIEW view_2_tab2_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1045') DROP VIEW view_3_tab2_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1045

statement ok
CREATE VIEW view_1_tab2_1045 AS SELECT pk, col0 FROM tab2 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74

statement ok
CREATE VIEW view_2_tab2_1045 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)

statement ok
CREATE VIEW view_3_tab2_1045 AS SELECT pk FROM view_1_tab2_1045

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_1045
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_1045
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1045 UNION ALL SELECT pk, col0 FROM view_2_tab2_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1045 UNION SELECT pk, col0 FROM view_2_tab2_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 ) AS tab2_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
3
4
5

statement ok
DROP VIEW view_1_tab2_1045

statement ok
DROP VIEW view_2_tab2_1045

statement ok
DROP VIEW view_3_tab2_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1045') DROP VIEW view_1_tab3_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1045') DROP VIEW view_2_tab3_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1045') DROP VIEW view_3_tab3_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1045

statement ok
CREATE VIEW view_1_tab3_1045 AS SELECT pk, col0 FROM tab3 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74

statement ok
CREATE VIEW view_2_tab3_1045 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)

statement ok
CREATE VIEW view_3_tab3_1045 AS SELECT pk FROM view_1_tab3_1045

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_1045
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_1045
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1045 UNION ALL SELECT pk, col0 FROM view_2_tab3_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1045 UNION SELECT pk, col0 FROM view_2_tab3_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 ) AS tab3_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
3
4
5

statement ok
DROP VIEW view_1_tab3_1045

statement ok
DROP VIEW view_2_tab3_1045

statement ok
DROP VIEW view_3_tab3_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1045') DROP VIEW view_1_tab4_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1045') DROP VIEW view_2_tab4_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1045') DROP VIEW view_3_tab4_1045

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1045

statement ok
CREATE VIEW view_1_tab4_1045 AS SELECT pk, col0 FROM tab4 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74

statement ok
CREATE VIEW view_2_tab4_1045 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)

statement ok
CREATE VIEW view_3_tab4_1045 AS SELECT pk FROM view_1_tab4_1045

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_1045
----
0
71
3
5
4
92
5
97

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_1045
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1045 UNION ALL SELECT pk, col0 FROM view_2_tab4_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 61.10 OR col4 > 87.57 AND col0 > 74)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1045 UNION SELECT pk, col0 FROM view_2_tab4_1045
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74 ) AS tab4_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_1045
----
0
3
4
5

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col1 >= 61.10 OR col4 > 87.57 AND col0 > 74
----
0
3
4
5

statement ok
DROP VIEW view_1_tab4_1045

statement ok
DROP VIEW view_2_tab4_1045

statement ok
DROP VIEW view_3_tab4_1045

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1046') DROP VIEW view_1_tab0_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1046') DROP VIEW view_2_tab0_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1046') DROP VIEW view_3_tab0_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1046

statement ok
CREATE VIEW view_1_tab0_1046 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 33.44 AND (col4 > 52.40)

statement ok
CREATE VIEW view_2_tab0_1046 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))

statement ok
CREATE VIEW view_3_tab0_1046 AS SELECT pk FROM view_1_tab0_1046

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_1046
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_1046
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1046 UNION ALL SELECT pk, col0 FROM view_2_tab0_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1046 UNION SELECT pk, col0 FROM view_2_tab0_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 33.44 AND (col4 > 52.40) ) AS tab0_1046
----
2
3
5

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_1046
----
2
3
5

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
3
5

statement ok
DROP VIEW view_1_tab0_1046

statement ok
DROP VIEW view_2_tab0_1046

statement ok
DROP VIEW view_3_tab0_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1046') DROP VIEW view_1_tab1_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1046') DROP VIEW view_2_tab1_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1046') DROP VIEW view_3_tab1_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1046

statement ok
CREATE VIEW view_1_tab1_1046 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 33.44 AND (col4 > 52.40)

statement ok
CREATE VIEW view_2_tab1_1046 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))

statement ok
CREATE VIEW view_3_tab1_1046 AS SELECT pk FROM view_1_tab1_1046

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_1046
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_1046
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1046 UNION ALL SELECT pk, col0 FROM view_2_tab1_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1046 UNION SELECT pk, col0 FROM view_2_tab1_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 33.44 AND (col4 > 52.40) ) AS tab1_1046
----
2
3
5

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_1046
----
2
3
5

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
3
5

statement ok
DROP VIEW view_1_tab1_1046

statement ok
DROP VIEW view_2_tab1_1046

statement ok
DROP VIEW view_3_tab1_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1046') DROP VIEW view_1_tab2_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1046') DROP VIEW view_2_tab2_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1046') DROP VIEW view_3_tab2_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1046

statement ok
CREATE VIEW view_1_tab2_1046 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 33.44 AND (col4 > 52.40)

statement ok
CREATE VIEW view_2_tab2_1046 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))

statement ok
CREATE VIEW view_3_tab2_1046 AS SELECT pk FROM view_1_tab2_1046

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_1046
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_1046
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1046 UNION ALL SELECT pk, col0 FROM view_2_tab2_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1046 UNION SELECT pk, col0 FROM view_2_tab2_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 33.44 AND (col4 > 52.40) ) AS tab2_1046
----
2
3
5

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_1046
----
2
3
5

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
3
5

statement ok
DROP VIEW view_1_tab2_1046

statement ok
DROP VIEW view_2_tab2_1046

statement ok
DROP VIEW view_3_tab2_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1046') DROP VIEW view_1_tab3_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1046') DROP VIEW view_2_tab3_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1046') DROP VIEW view_3_tab3_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1046

statement ok
CREATE VIEW view_1_tab3_1046 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 33.44 AND (col4 > 52.40)

statement ok
CREATE VIEW view_2_tab3_1046 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))

statement ok
CREATE VIEW view_3_tab3_1046 AS SELECT pk FROM view_1_tab3_1046

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_1046
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_1046
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1046 UNION ALL SELECT pk, col0 FROM view_2_tab3_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1046 UNION SELECT pk, col0 FROM view_2_tab3_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 33.44 AND (col4 > 52.40) ) AS tab3_1046
----
2
3
5

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_1046
----
2
3
5

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
3
5

statement ok
DROP VIEW view_1_tab3_1046

statement ok
DROP VIEW view_2_tab3_1046

statement ok
DROP VIEW view_3_tab3_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1046') DROP VIEW view_1_tab4_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1046') DROP VIEW view_2_tab4_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1046') DROP VIEW view_3_tab4_1046

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1046

statement ok
CREATE VIEW view_1_tab4_1046 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 33.44 AND (col4 > 52.40)

statement ok
CREATE VIEW view_2_tab4_1046 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))

statement ok
CREATE VIEW view_3_tab4_1046 AS SELECT pk FROM view_1_tab4_1046

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_1046
----
2
89
3
5
5
97

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_1046
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1046 UNION ALL SELECT pk, col0 FROM view_2_tab4_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 33.44 AND (col4 > 52.40) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 33.44 AND (col4 > 52.40))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1046 UNION SELECT pk, col0 FROM view_2_tab4_1046
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 33.44 AND (col4 > 52.40) ) AS tab4_1046
----
2
3
5

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_1046
----
2
3
5

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE col4 >= 33.44 AND (col4 > 52.40)
----
2
3
5

statement ok
DROP VIEW view_1_tab4_1046

statement ok
DROP VIEW view_2_tab4_1046

statement ok
DROP VIEW view_3_tab4_1046

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1048') DROP VIEW view_1_tab0_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1048') DROP VIEW view_2_tab0_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1048') DROP VIEW view_3_tab0_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1048

statement ok
CREATE VIEW view_1_tab0_1048 AS SELECT pk, col0 FROM tab0 WHERE (((col0 < 13)))

statement ok
CREATE VIEW view_2_tab0_1048 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 13))))

statement ok
CREATE VIEW view_3_tab0_1048 AS SELECT pk FROM view_1_tab0_1048

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE (((col0 < 13)))
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 13))))
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_1048
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_1048
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 < 13))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1048 UNION ALL SELECT pk, col0 FROM view_2_tab0_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 < 13))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1048 UNION SELECT pk, col0 FROM view_2_tab0_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 < 13))) ) AS tab0_1048
----
3
7

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_1048
----
3
7

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE (((col0 < 13)))
----
3
7

statement ok
DROP VIEW view_1_tab0_1048

statement ok
DROP VIEW view_2_tab0_1048

statement ok
DROP VIEW view_3_tab0_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1048') DROP VIEW view_1_tab1_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1048') DROP VIEW view_2_tab1_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1048') DROP VIEW view_3_tab1_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1048

statement ok
CREATE VIEW view_1_tab1_1048 AS SELECT pk, col0 FROM tab1 WHERE (((col0 < 13)))

statement ok
CREATE VIEW view_2_tab1_1048 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 13))))

statement ok
CREATE VIEW view_3_tab1_1048 AS SELECT pk FROM view_1_tab1_1048

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE (((col0 < 13)))
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 13))))
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_1048
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_1048
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 < 13))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1048 UNION ALL SELECT pk, col0 FROM view_2_tab1_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 < 13))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1048 UNION SELECT pk, col0 FROM view_2_tab1_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 < 13))) ) AS tab1_1048
----
3
7

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_1048
----
3
7

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE (((col0 < 13)))
----
3
7

statement ok
DROP VIEW view_1_tab1_1048

statement ok
DROP VIEW view_2_tab1_1048

statement ok
DROP VIEW view_3_tab1_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1048') DROP VIEW view_1_tab2_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1048') DROP VIEW view_2_tab2_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1048') DROP VIEW view_3_tab2_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1048

statement ok
CREATE VIEW view_1_tab2_1048 AS SELECT pk, col0 FROM tab2 WHERE (((col0 < 13)))

statement ok
CREATE VIEW view_2_tab2_1048 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 13))))

statement ok
CREATE VIEW view_3_tab2_1048 AS SELECT pk FROM view_1_tab2_1048

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE (((col0 < 13)))
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 13))))
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_1048
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_1048
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 < 13))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1048 UNION ALL SELECT pk, col0 FROM view_2_tab2_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 < 13))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1048 UNION SELECT pk, col0 FROM view_2_tab2_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 < 13))) ) AS tab2_1048
----
3
7

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_1048
----
3
7

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE (((col0 < 13)))
----
3
7

statement ok
DROP VIEW view_1_tab2_1048

statement ok
DROP VIEW view_2_tab2_1048

statement ok
DROP VIEW view_3_tab2_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1048') DROP VIEW view_1_tab3_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1048') DROP VIEW view_2_tab3_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1048') DROP VIEW view_3_tab3_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1048

statement ok
CREATE VIEW view_1_tab3_1048 AS SELECT pk, col0 FROM tab3 WHERE (((col0 < 13)))

statement ok
CREATE VIEW view_2_tab3_1048 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 13))))

statement ok
CREATE VIEW view_3_tab3_1048 AS SELECT pk FROM view_1_tab3_1048

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE (((col0 < 13)))
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 13))))
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_1048
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_1048
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 < 13))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1048 UNION ALL SELECT pk, col0 FROM view_2_tab3_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 < 13))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1048 UNION SELECT pk, col0 FROM view_2_tab3_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 < 13))) ) AS tab3_1048
----
3
7

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_1048
----
3
7

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE (((col0 < 13)))
----
3
7

statement ok
DROP VIEW view_1_tab3_1048

statement ok
DROP VIEW view_2_tab3_1048

statement ok
DROP VIEW view_3_tab3_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1048') DROP VIEW view_1_tab4_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1048') DROP VIEW view_2_tab4_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1048') DROP VIEW view_3_tab4_1048

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1048

statement ok
CREATE VIEW view_1_tab4_1048 AS SELECT pk, col0 FROM tab4 WHERE (((col0 < 13)))

statement ok
CREATE VIEW view_2_tab4_1048 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 13))))

statement ok
CREATE VIEW view_3_tab4_1048 AS SELECT pk FROM view_1_tab4_1048

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE (((col0 < 13)))
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 13))))
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_1048
----
3
5
7
9

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_1048
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 < 13))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1048 UNION ALL SELECT pk, col0 FROM view_2_tab4_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 < 13))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 13))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1048 UNION SELECT pk, col0 FROM view_2_tab4_1048
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 < 13))) ) AS tab4_1048
----
3
7

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_1048
----
3
7

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE (((col0 < 13)))
----
3
7

statement ok
DROP VIEW view_1_tab4_1048

statement ok
DROP VIEW view_2_tab4_1048

statement ok
DROP VIEW view_3_tab4_1048

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1049') DROP VIEW view_1_tab0_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1049') DROP VIEW view_2_tab0_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1049') DROP VIEW view_3_tab0_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1049

statement ok
CREATE VIEW view_1_tab0_1049 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 13

statement ok
CREATE VIEW view_2_tab0_1049 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 13)

statement ok
CREATE VIEW view_3_tab0_1049 AS SELECT pk FROM view_1_tab0_1049

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 13
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 13)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_1049
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_1049
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 13 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1049 UNION ALL SELECT pk, col0 FROM view_2_tab0_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 13 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1049 UNION SELECT pk, col0 FROM view_2_tab0_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 13 ) AS tab0_1049
----
3
7

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_1049
----
3
7

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col0 <= 13
----
3
7

statement ok
DROP VIEW view_1_tab0_1049

statement ok
DROP VIEW view_2_tab0_1049

statement ok
DROP VIEW view_3_tab0_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1049') DROP VIEW view_1_tab1_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1049') DROP VIEW view_2_tab1_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1049') DROP VIEW view_3_tab1_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1049

statement ok
CREATE VIEW view_1_tab1_1049 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 13

statement ok
CREATE VIEW view_2_tab1_1049 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 13)

statement ok
CREATE VIEW view_3_tab1_1049 AS SELECT pk FROM view_1_tab1_1049

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 13
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 13)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_1049
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_1049
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 13 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1049 UNION ALL SELECT pk, col0 FROM view_2_tab1_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 13 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1049 UNION SELECT pk, col0 FROM view_2_tab1_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 13 ) AS tab1_1049
----
3
7

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_1049
----
3
7

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col0 <= 13
----
3
7

statement ok
DROP VIEW view_1_tab1_1049

statement ok
DROP VIEW view_2_tab1_1049

statement ok
DROP VIEW view_3_tab1_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1049') DROP VIEW view_1_tab2_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1049') DROP VIEW view_2_tab2_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1049') DROP VIEW view_3_tab2_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1049

statement ok
CREATE VIEW view_1_tab2_1049 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 13

statement ok
CREATE VIEW view_2_tab2_1049 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 13)

statement ok
CREATE VIEW view_3_tab2_1049 AS SELECT pk FROM view_1_tab2_1049

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 13
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 13)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_1049
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_1049
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 13 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1049 UNION ALL SELECT pk, col0 FROM view_2_tab2_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 13 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1049 UNION SELECT pk, col0 FROM view_2_tab2_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 13 ) AS tab2_1049
----
3
7

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_1049
----
3
7

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col0 <= 13
----
3
7

statement ok
DROP VIEW view_1_tab2_1049

statement ok
DROP VIEW view_2_tab2_1049

statement ok
DROP VIEW view_3_tab2_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1049') DROP VIEW view_1_tab3_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1049') DROP VIEW view_2_tab3_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1049') DROP VIEW view_3_tab3_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1049

statement ok
CREATE VIEW view_1_tab3_1049 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 13

statement ok
CREATE VIEW view_2_tab3_1049 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 13)

statement ok
CREATE VIEW view_3_tab3_1049 AS SELECT pk FROM view_1_tab3_1049

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 13
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 13)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_1049
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_1049
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 13 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1049 UNION ALL SELECT pk, col0 FROM view_2_tab3_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 13 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1049 UNION SELECT pk, col0 FROM view_2_tab3_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 13 ) AS tab3_1049
----
3
7

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_1049
----
3
7

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col0 <= 13
----
3
7

statement ok
DROP VIEW view_1_tab3_1049

statement ok
DROP VIEW view_2_tab3_1049

statement ok
DROP VIEW view_3_tab3_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1049') DROP VIEW view_1_tab4_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1049') DROP VIEW view_2_tab4_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1049') DROP VIEW view_3_tab4_1049

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1049

statement ok
CREATE VIEW view_1_tab4_1049 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 13

statement ok
CREATE VIEW view_2_tab4_1049 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 13)

statement ok
CREATE VIEW view_3_tab4_1049 AS SELECT pk FROM view_1_tab4_1049

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 13
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 13)
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_1049
----
3
5
7
9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_1049
----
16 values hashing to 30dd5b90c35cdcba9a198f4aef3d0d39

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 13 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1049 UNION ALL SELECT pk, col0 FROM view_2_tab4_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 13 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 13)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1049 UNION SELECT pk, col0 FROM view_2_tab4_1049
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 13 ) AS tab4_1049
----
3
7

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_1049
----
3
7

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col0 <= 13
----
3
7

statement ok
DROP VIEW view_1_tab4_1049

statement ok
DROP VIEW view_2_tab4_1049

statement ok
DROP VIEW view_3_tab4_1049

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1050') DROP VIEW view_1_tab0_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1050') DROP VIEW view_2_tab0_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1050') DROP VIEW view_3_tab0_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1050

statement ok
CREATE VIEW view_1_tab0_1050 AS SELECT pk, col0 FROM tab0 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))

statement ok
CREATE VIEW view_2_tab0_1050 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))

statement ok
CREATE VIEW view_3_tab0_1050 AS SELECT pk FROM view_1_tab0_1050

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_1050
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1050 UNION ALL SELECT pk, col0 FROM view_2_tab0_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1050 UNION SELECT pk, col0 FROM view_2_tab0_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) ) AS tab0_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1050

statement ok
DROP VIEW view_2_tab0_1050

statement ok
DROP VIEW view_3_tab0_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1050') DROP VIEW view_1_tab1_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1050') DROP VIEW view_2_tab1_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1050') DROP VIEW view_3_tab1_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1050

statement ok
CREATE VIEW view_1_tab1_1050 AS SELECT pk, col0 FROM tab1 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))

statement ok
CREATE VIEW view_2_tab1_1050 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))

statement ok
CREATE VIEW view_3_tab1_1050 AS SELECT pk FROM view_1_tab1_1050

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_1050
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1050 UNION ALL SELECT pk, col0 FROM view_2_tab1_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1050 UNION SELECT pk, col0 FROM view_2_tab1_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) ) AS tab1_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1050

statement ok
DROP VIEW view_2_tab1_1050

statement ok
DROP VIEW view_3_tab1_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1050') DROP VIEW view_1_tab2_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1050') DROP VIEW view_2_tab2_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1050') DROP VIEW view_3_tab2_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1050

statement ok
CREATE VIEW view_1_tab2_1050 AS SELECT pk, col0 FROM tab2 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))

statement ok
CREATE VIEW view_2_tab2_1050 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))

statement ok
CREATE VIEW view_3_tab2_1050 AS SELECT pk FROM view_1_tab2_1050

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_1050
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1050 UNION ALL SELECT pk, col0 FROM view_2_tab2_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1050 UNION SELECT pk, col0 FROM view_2_tab2_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) ) AS tab2_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1050

statement ok
DROP VIEW view_2_tab2_1050

statement ok
DROP VIEW view_3_tab2_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1050') DROP VIEW view_1_tab3_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1050') DROP VIEW view_2_tab3_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1050') DROP VIEW view_3_tab3_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1050

statement ok
CREATE VIEW view_1_tab3_1050 AS SELECT pk, col0 FROM tab3 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))

statement ok
CREATE VIEW view_2_tab3_1050 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))

statement ok
CREATE VIEW view_3_tab3_1050 AS SELECT pk FROM view_1_tab3_1050

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_1050
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1050 UNION ALL SELECT pk, col0 FROM view_2_tab3_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1050 UNION SELECT pk, col0 FROM view_2_tab3_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) ) AS tab3_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1050

statement ok
DROP VIEW view_2_tab3_1050

statement ok
DROP VIEW view_3_tab3_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1050') DROP VIEW view_1_tab4_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1050') DROP VIEW view_2_tab4_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1050') DROP VIEW view_3_tab4_1050

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1050

statement ok
CREATE VIEW view_1_tab4_1050 AS SELECT pk, col0 FROM tab4 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))

statement ok
CREATE VIEW view_2_tab4_1050 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))

statement ok
CREATE VIEW view_3_tab4_1050 AS SELECT pk FROM view_1_tab4_1050

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_1050
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1050 UNION ALL SELECT pk, col0 FROM view_2_tab4_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1050 UNION SELECT pk, col0 FROM view_2_tab4_1050
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31)) ) AS tab4_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_1050
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE (((col3 >= 86 OR col0 > 23) OR (col0 <= 84 AND col4 >= 73.12) OR (col1 < 16.87)) OR (col0 <= 42)) OR (((col0 <= 97 OR col3 <= 48 AND ((col0 < 58))))) OR (col4 BETWEEN 70.57 AND 39.6 AND col3 > 89 OR (col0 < 82) AND (((col1 >= 15.46)) OR col1 IS NULL)) AND col0 BETWEEN 64 AND 25 AND ((col4 < 90.84) AND col0 > 7) AND col3 > 39 AND ((col3 BETWEEN 5 AND 49)) OR ((col3 < 27 OR col0 >= 53 AND (col0 >= 51) OR col4 <= 77.31))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1050

statement ok
DROP VIEW view_2_tab4_1050

statement ok
DROP VIEW view_3_tab4_1050

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1051') DROP VIEW view_1_tab0_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1051') DROP VIEW view_2_tab0_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1051') DROP VIEW view_3_tab0_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1051

statement ok
CREATE VIEW view_1_tab0_1051 AS SELECT pk, col0 FROM tab0 WHERE col1 > 35.69

statement ok
CREATE VIEW view_2_tab0_1051 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 35.69)

statement ok
CREATE VIEW view_3_tab0_1051 AS SELECT pk FROM view_1_tab0_1051

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE col1 > 35.69
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 35.69)
----
6
36
7
9
8
14
9
56

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_1051
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_1051
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 35.69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1051 UNION ALL SELECT pk, col0 FROM view_2_tab0_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 35.69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1051 UNION SELECT pk, col0 FROM view_2_tab0_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 35.69 ) AS tab0_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE col1 > 35.69
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab0_1051

statement ok
DROP VIEW view_2_tab0_1051

statement ok
DROP VIEW view_3_tab0_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1051') DROP VIEW view_1_tab1_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1051') DROP VIEW view_2_tab1_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1051') DROP VIEW view_3_tab1_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1051

statement ok
CREATE VIEW view_1_tab1_1051 AS SELECT pk, col0 FROM tab1 WHERE col1 > 35.69

statement ok
CREATE VIEW view_2_tab1_1051 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 35.69)

statement ok
CREATE VIEW view_3_tab1_1051 AS SELECT pk FROM view_1_tab1_1051

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE col1 > 35.69
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 35.69)
----
6
36
7
9
8
14
9
56

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_1051
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_1051
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 35.69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1051 UNION ALL SELECT pk, col0 FROM view_2_tab1_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 35.69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1051 UNION SELECT pk, col0 FROM view_2_tab1_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 35.69 ) AS tab1_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE col1 > 35.69
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab1_1051

statement ok
DROP VIEW view_2_tab1_1051

statement ok
DROP VIEW view_3_tab1_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1051') DROP VIEW view_1_tab2_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1051') DROP VIEW view_2_tab2_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1051') DROP VIEW view_3_tab2_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1051

statement ok
CREATE VIEW view_1_tab2_1051 AS SELECT pk, col0 FROM tab2 WHERE col1 > 35.69

statement ok
CREATE VIEW view_2_tab2_1051 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 35.69)

statement ok
CREATE VIEW view_3_tab2_1051 AS SELECT pk FROM view_1_tab2_1051

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE col1 > 35.69
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 35.69)
----
6
36
7
9
8
14
9
56

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_1051
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_1051
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 35.69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1051 UNION ALL SELECT pk, col0 FROM view_2_tab2_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 35.69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1051 UNION SELECT pk, col0 FROM view_2_tab2_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 35.69 ) AS tab2_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE col1 > 35.69
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab2_1051

statement ok
DROP VIEW view_2_tab2_1051

statement ok
DROP VIEW view_3_tab2_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1051') DROP VIEW view_1_tab3_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1051') DROP VIEW view_2_tab3_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1051') DROP VIEW view_3_tab3_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1051

statement ok
CREATE VIEW view_1_tab3_1051 AS SELECT pk, col0 FROM tab3 WHERE col1 > 35.69

statement ok
CREATE VIEW view_2_tab3_1051 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 35.69)

statement ok
CREATE VIEW view_3_tab3_1051 AS SELECT pk FROM view_1_tab3_1051

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE col1 > 35.69
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 35.69)
----
6
36
7
9
8
14
9
56

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_1051
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_1051
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 35.69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1051 UNION ALL SELECT pk, col0 FROM view_2_tab3_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 35.69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1051 UNION SELECT pk, col0 FROM view_2_tab3_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 35.69 ) AS tab3_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE col1 > 35.69
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab3_1051

statement ok
DROP VIEW view_2_tab3_1051

statement ok
DROP VIEW view_3_tab3_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1051') DROP VIEW view_1_tab4_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1051') DROP VIEW view_2_tab4_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1051') DROP VIEW view_3_tab4_1051

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1051

statement ok
CREATE VIEW view_1_tab4_1051 AS SELECT pk, col0 FROM tab4 WHERE col1 > 35.69

statement ok
CREATE VIEW view_2_tab4_1051 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 35.69)

statement ok
CREATE VIEW view_3_tab4_1051 AS SELECT pk FROM view_1_tab4_1051

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE col1 > 35.69
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 35.69)
----
6
36
7
9
8
14
9
56

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_1051
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_1051
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 35.69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1051 UNION ALL SELECT pk, col0 FROM view_2_tab4_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 35.69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 35.69)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1051 UNION SELECT pk, col0 FROM view_2_tab4_1051
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 35.69 ) AS tab4_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_1051
----
0
1
2
3
4
5

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE col1 > 35.69
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab4_1051

statement ok
DROP VIEW view_2_tab4_1051

statement ok
DROP VIEW view_3_tab4_1051

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1052') DROP VIEW view_1_tab0_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1052') DROP VIEW view_2_tab0_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1052') DROP VIEW view_3_tab0_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1052

statement ok
CREATE VIEW view_1_tab0_1052 AS SELECT pk, col0 FROM tab0 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)

statement ok
CREATE VIEW view_2_tab0_1052 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))

statement ok
CREATE VIEW view_3_tab0_1052 AS SELECT pk FROM view_1_tab0_1052

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_1052
----

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1052 UNION ALL SELECT pk, col0 FROM view_2_tab0_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1052 UNION SELECT pk, col0 FROM view_2_tab0_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) ) AS tab0_1052
----

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_1052
----

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

statement ok
DROP VIEW view_1_tab0_1052

statement ok
DROP VIEW view_2_tab0_1052

statement ok
DROP VIEW view_3_tab0_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1052') DROP VIEW view_1_tab1_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1052') DROP VIEW view_2_tab1_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1052') DROP VIEW view_3_tab1_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1052

statement ok
CREATE VIEW view_1_tab1_1052 AS SELECT pk, col0 FROM tab1 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)

statement ok
CREATE VIEW view_2_tab1_1052 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))

statement ok
CREATE VIEW view_3_tab1_1052 AS SELECT pk FROM view_1_tab1_1052

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_1052
----

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1052 UNION ALL SELECT pk, col0 FROM view_2_tab1_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1052 UNION SELECT pk, col0 FROM view_2_tab1_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) ) AS tab1_1052
----

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_1052
----

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

statement ok
DROP VIEW view_1_tab1_1052

statement ok
DROP VIEW view_2_tab1_1052

statement ok
DROP VIEW view_3_tab1_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1052') DROP VIEW view_1_tab2_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1052') DROP VIEW view_2_tab2_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1052') DROP VIEW view_3_tab2_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1052

statement ok
CREATE VIEW view_1_tab2_1052 AS SELECT pk, col0 FROM tab2 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)

statement ok
CREATE VIEW view_2_tab2_1052 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))

statement ok
CREATE VIEW view_3_tab2_1052 AS SELECT pk FROM view_1_tab2_1052

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_1052
----

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1052 UNION ALL SELECT pk, col0 FROM view_2_tab2_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1052 UNION SELECT pk, col0 FROM view_2_tab2_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) ) AS tab2_1052
----

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_1052
----

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

statement ok
DROP VIEW view_1_tab2_1052

statement ok
DROP VIEW view_2_tab2_1052

statement ok
DROP VIEW view_3_tab2_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1052') DROP VIEW view_1_tab3_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1052') DROP VIEW view_2_tab3_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1052') DROP VIEW view_3_tab3_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1052

statement ok
CREATE VIEW view_1_tab3_1052 AS SELECT pk, col0 FROM tab3 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)

statement ok
CREATE VIEW view_2_tab3_1052 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))

statement ok
CREATE VIEW view_3_tab3_1052 AS SELECT pk FROM view_1_tab3_1052

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_1052
----

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1052 UNION ALL SELECT pk, col0 FROM view_2_tab3_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1052 UNION SELECT pk, col0 FROM view_2_tab3_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) ) AS tab3_1052
----

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_1052
----

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

statement ok
DROP VIEW view_1_tab3_1052

statement ok
DROP VIEW view_2_tab3_1052

statement ok
DROP VIEW view_3_tab3_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1052') DROP VIEW view_1_tab4_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1052') DROP VIEW view_2_tab4_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1052') DROP VIEW view_3_tab4_1052

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1052

statement ok
CREATE VIEW view_1_tab4_1052 AS SELECT pk, col0 FROM tab4 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)

statement ok
CREATE VIEW view_2_tab4_1052 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))

statement ok
CREATE VIEW view_3_tab4_1052 AS SELECT pk FROM view_1_tab4_1052

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_1052
----

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1052 UNION ALL SELECT pk, col0 FROM view_2_tab4_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1052 UNION SELECT pk, col0 FROM view_2_tab4_1052
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92) ) AS tab4_1052
----

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_1052
----

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE col1 >= 82.28 AND col4 IN (24.14,1.29,95.94,30.92)
----

statement ok
DROP VIEW view_1_tab4_1052

statement ok
DROP VIEW view_2_tab4_1052

statement ok
DROP VIEW view_3_tab4_1052

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1053') DROP VIEW view_1_tab0_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1053') DROP VIEW view_2_tab0_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1053') DROP VIEW view_3_tab0_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1053

statement ok
CREATE VIEW view_1_tab0_1053 AS SELECT pk, col0 FROM tab0 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))

statement ok
CREATE VIEW view_2_tab0_1053 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))

statement ok
CREATE VIEW view_3_tab0_1053 AS SELECT pk FROM view_1_tab0_1053

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_1053
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1053 UNION ALL SELECT pk, col0 FROM view_2_tab0_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1053 UNION SELECT pk, col0 FROM view_2_tab0_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) ) AS tab0_1053
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_1053
----

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

statement ok
DROP VIEW view_1_tab0_1053

statement ok
DROP VIEW view_2_tab0_1053

statement ok
DROP VIEW view_3_tab0_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1053') DROP VIEW view_1_tab1_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1053') DROP VIEW view_2_tab1_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1053') DROP VIEW view_3_tab1_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1053

statement ok
CREATE VIEW view_1_tab1_1053 AS SELECT pk, col0 FROM tab1 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))

statement ok
CREATE VIEW view_2_tab1_1053 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))

statement ok
CREATE VIEW view_3_tab1_1053 AS SELECT pk FROM view_1_tab1_1053

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_1053
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1053 UNION ALL SELECT pk, col0 FROM view_2_tab1_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1053 UNION SELECT pk, col0 FROM view_2_tab1_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) ) AS tab1_1053
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_1053
----

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

statement ok
DROP VIEW view_1_tab1_1053

statement ok
DROP VIEW view_2_tab1_1053

statement ok
DROP VIEW view_3_tab1_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1053') DROP VIEW view_1_tab2_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1053') DROP VIEW view_2_tab2_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1053') DROP VIEW view_3_tab2_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1053

statement ok
CREATE VIEW view_1_tab2_1053 AS SELECT pk, col0 FROM tab2 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))

statement ok
CREATE VIEW view_2_tab2_1053 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))

statement ok
CREATE VIEW view_3_tab2_1053 AS SELECT pk FROM view_1_tab2_1053

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_1053
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1053 UNION ALL SELECT pk, col0 FROM view_2_tab2_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1053 UNION SELECT pk, col0 FROM view_2_tab2_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) ) AS tab2_1053
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_1053
----

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

statement ok
DROP VIEW view_1_tab2_1053

statement ok
DROP VIEW view_2_tab2_1053

statement ok
DROP VIEW view_3_tab2_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1053') DROP VIEW view_1_tab3_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1053') DROP VIEW view_2_tab3_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1053') DROP VIEW view_3_tab3_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1053

statement ok
CREATE VIEW view_1_tab3_1053 AS SELECT pk, col0 FROM tab3 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))

statement ok
CREATE VIEW view_2_tab3_1053 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))

statement ok
CREATE VIEW view_3_tab3_1053 AS SELECT pk FROM view_1_tab3_1053

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_1053
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1053 UNION ALL SELECT pk, col0 FROM view_2_tab3_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1053 UNION SELECT pk, col0 FROM view_2_tab3_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) ) AS tab3_1053
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_1053
----

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

statement ok
DROP VIEW view_1_tab3_1053

statement ok
DROP VIEW view_2_tab3_1053

statement ok
DROP VIEW view_3_tab3_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1053') DROP VIEW view_1_tab4_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1053') DROP VIEW view_2_tab4_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1053') DROP VIEW view_3_tab4_1053

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1053

statement ok
CREATE VIEW view_1_tab4_1053 AS SELECT pk, col0 FROM tab4 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))

statement ok
CREATE VIEW view_2_tab4_1053 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))

statement ok
CREATE VIEW view_3_tab4_1053 AS SELECT pk FROM view_1_tab4_1053

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_1053
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1053 UNION ALL SELECT pk, col0 FROM view_2_tab4_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1053 UNION SELECT pk, col0 FROM view_2_tab4_1053
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62)) ) AS tab4_1053
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_1053
----

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE (col1 >= 88.90 AND (col0 = 56)) AND ((col1 >= 39.62))
----

statement ok
DROP VIEW view_1_tab4_1053

statement ok
DROP VIEW view_2_tab4_1053

statement ok
DROP VIEW view_3_tab4_1053

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1054') DROP VIEW view_1_tab0_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1054') DROP VIEW view_2_tab0_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1054') DROP VIEW view_3_tab0_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1054

statement ok
CREATE VIEW view_1_tab0_1054 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36

statement ok
CREATE VIEW view_2_tab0_1054 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)

statement ok
CREATE VIEW view_3_tab0_1054 AS SELECT pk FROM view_1_tab0_1054

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_1054
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_1054
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1054 UNION ALL SELECT pk, col0 FROM view_2_tab0_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1054 UNION SELECT pk, col0 FROM view_2_tab0_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 ) AS tab0_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
4
5
6

statement ok
DROP VIEW view_1_tab0_1054

statement ok
DROP VIEW view_2_tab0_1054

statement ok
DROP VIEW view_3_tab0_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1054') DROP VIEW view_1_tab1_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1054') DROP VIEW view_2_tab1_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1054') DROP VIEW view_3_tab1_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1054

statement ok
CREATE VIEW view_1_tab1_1054 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36

statement ok
CREATE VIEW view_2_tab1_1054 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)

statement ok
CREATE VIEW view_3_tab1_1054 AS SELECT pk FROM view_1_tab1_1054

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_1054
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_1054
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1054 UNION ALL SELECT pk, col0 FROM view_2_tab1_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1054 UNION SELECT pk, col0 FROM view_2_tab1_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 ) AS tab1_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
4
5
6

statement ok
DROP VIEW view_1_tab1_1054

statement ok
DROP VIEW view_2_tab1_1054

statement ok
DROP VIEW view_3_tab1_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1054') DROP VIEW view_1_tab2_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1054') DROP VIEW view_2_tab2_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1054') DROP VIEW view_3_tab2_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1054

statement ok
CREATE VIEW view_1_tab2_1054 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36

statement ok
CREATE VIEW view_2_tab2_1054 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)

statement ok
CREATE VIEW view_3_tab2_1054 AS SELECT pk FROM view_1_tab2_1054

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_1054
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_1054
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1054 UNION ALL SELECT pk, col0 FROM view_2_tab2_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1054 UNION SELECT pk, col0 FROM view_2_tab2_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 ) AS tab2_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
4
5
6

statement ok
DROP VIEW view_1_tab2_1054

statement ok
DROP VIEW view_2_tab2_1054

statement ok
DROP VIEW view_3_tab2_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1054') DROP VIEW view_1_tab3_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1054') DROP VIEW view_2_tab3_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1054') DROP VIEW view_3_tab3_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1054

statement ok
CREATE VIEW view_1_tab3_1054 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36

statement ok
CREATE VIEW view_2_tab3_1054 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)

statement ok
CREATE VIEW view_3_tab3_1054 AS SELECT pk FROM view_1_tab3_1054

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_1054
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_1054
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1054 UNION ALL SELECT pk, col0 FROM view_2_tab3_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1054 UNION SELECT pk, col0 FROM view_2_tab3_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 ) AS tab3_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
4
5
6

statement ok
DROP VIEW view_1_tab3_1054

statement ok
DROP VIEW view_2_tab3_1054

statement ok
DROP VIEW view_3_tab3_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1054') DROP VIEW view_1_tab4_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1054') DROP VIEW view_2_tab4_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1054') DROP VIEW view_3_tab4_1054

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1054

statement ok
CREATE VIEW view_1_tab4_1054 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36

statement ok
CREATE VIEW view_2_tab4_1054 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)

statement ok
CREATE VIEW view_3_tab4_1054 AS SELECT pk FROM view_1_tab4_1054

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_1054
----
2
89
4
92
5
97
6
36

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_1054
----
12 values hashing to 944c103054c3454d13ff11a333dc5ac1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1054 UNION ALL SELECT pk, col0 FROM view_2_tab4_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1054 UNION SELECT pk, col0 FROM view_2_tab4_1054
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36 ) AS tab4_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_1054
----
2
4
5
6

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE (col0 > 75) AND col4 <= 92.83 OR (col4 > 55.40 AND col1 IS NULL) AND (((col0 >= 67 AND col4 >= 21.8 OR col0 > 87 OR ((col4 >= 85.84 AND (col4 BETWEEN 2.90 AND 34.58))) AND col4 > 70.54) OR col0 IS NULL) AND col3 < 48 AND (col0 > 28 OR col3 > 48) OR col3 = 27 OR col4 > 19.18 OR (col4 >= 25.90) OR (col0 < 3 OR col0 IN (78,17,2) AND col3 < 10) AND col0 < 85 OR col3 = 82 OR ((col4 > 89.92)) AND col0 > 60) AND col4 > 16.79 AND col3 < 17 OR (col1 < 21.16) AND col3 >= 80 AND (col1 > 24.95 OR ((col3 > 51)) OR col4 = 72.74 AND ((col0 >= 97)) OR col0 <= 43 OR col3 >= 86) OR col3 = 36
----
2
4
5
6

statement ok
DROP VIEW view_1_tab4_1054

statement ok
DROP VIEW view_2_tab4_1054

statement ok
DROP VIEW view_3_tab4_1054

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1055') DROP VIEW view_1_tab0_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1055') DROP VIEW view_2_tab0_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1055') DROP VIEW view_3_tab0_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1055

statement ok
CREATE VIEW view_1_tab0_1055 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 27)

statement ok
CREATE VIEW view_2_tab0_1055 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 27))

statement ok
CREATE VIEW view_3_tab0_1055 AS SELECT pk FROM view_1_tab0_1055

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 27)
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 27))
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_1055
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_1055
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 27) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1055 UNION ALL SELECT pk, col0 FROM view_2_tab0_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 27) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1055 UNION SELECT pk, col0 FROM view_2_tab0_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 27) ) AS tab0_1055
----
0
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_1055
----
0
7
8

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE (col3 < 27)
----
0
7
8

statement ok
DROP VIEW view_1_tab0_1055

statement ok
DROP VIEW view_2_tab0_1055

statement ok
DROP VIEW view_3_tab0_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1055') DROP VIEW view_1_tab1_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1055') DROP VIEW view_2_tab1_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1055') DROP VIEW view_3_tab1_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1055

statement ok
CREATE VIEW view_1_tab1_1055 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 27)

statement ok
CREATE VIEW view_2_tab1_1055 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 27))

statement ok
CREATE VIEW view_3_tab1_1055 AS SELECT pk FROM view_1_tab1_1055

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 27)
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 27))
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_1055
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_1055
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 27) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1055 UNION ALL SELECT pk, col0 FROM view_2_tab1_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 27) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1055 UNION SELECT pk, col0 FROM view_2_tab1_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 27) ) AS tab1_1055
----
0
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_1055
----
0
7
8

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE (col3 < 27)
----
0
7
8

statement ok
DROP VIEW view_1_tab1_1055

statement ok
DROP VIEW view_2_tab1_1055

statement ok
DROP VIEW view_3_tab1_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1055') DROP VIEW view_1_tab2_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1055') DROP VIEW view_2_tab2_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1055') DROP VIEW view_3_tab2_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1055

statement ok
CREATE VIEW view_1_tab2_1055 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 27)

statement ok
CREATE VIEW view_2_tab2_1055 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 27))

statement ok
CREATE VIEW view_3_tab2_1055 AS SELECT pk FROM view_1_tab2_1055

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 27)
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 27))
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_1055
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_1055
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 27) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1055 UNION ALL SELECT pk, col0 FROM view_2_tab2_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 27) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1055 UNION SELECT pk, col0 FROM view_2_tab2_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 27) ) AS tab2_1055
----
0
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_1055
----
0
7
8

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE (col3 < 27)
----
0
7
8

statement ok
DROP VIEW view_1_tab2_1055

statement ok
DROP VIEW view_2_tab2_1055

statement ok
DROP VIEW view_3_tab2_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1055') DROP VIEW view_1_tab3_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1055') DROP VIEW view_2_tab3_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1055') DROP VIEW view_3_tab3_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1055

statement ok
CREATE VIEW view_1_tab3_1055 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 27)

statement ok
CREATE VIEW view_2_tab3_1055 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 27))

statement ok
CREATE VIEW view_3_tab3_1055 AS SELECT pk FROM view_1_tab3_1055

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 27)
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 27))
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_1055
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_1055
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 27) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1055 UNION ALL SELECT pk, col0 FROM view_2_tab3_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 27) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1055 UNION SELECT pk, col0 FROM view_2_tab3_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 27) ) AS tab3_1055
----
0
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_1055
----
0
7
8

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE (col3 < 27)
----
0
7
8

statement ok
DROP VIEW view_1_tab3_1055

statement ok
DROP VIEW view_2_tab3_1055

statement ok
DROP VIEW view_3_tab3_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1055') DROP VIEW view_1_tab4_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1055') DROP VIEW view_2_tab4_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1055') DROP VIEW view_3_tab4_1055

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1055

statement ok
CREATE VIEW view_1_tab4_1055 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 27)

statement ok
CREATE VIEW view_2_tab4_1055 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 27))

statement ok
CREATE VIEW view_3_tab4_1055 AS SELECT pk FROM view_1_tab4_1055

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 27)
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 27))
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_1055
----
0
71
7
9
8
14

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_1055
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 27) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1055 UNION ALL SELECT pk, col0 FROM view_2_tab4_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 27) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 27))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1055 UNION SELECT pk, col0 FROM view_2_tab4_1055
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 27) ) AS tab4_1055
----
0
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_1055
----
0
7
8

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE (col3 < 27)
----
0
7
8

statement ok
DROP VIEW view_1_tab4_1055

statement ok
DROP VIEW view_2_tab4_1055

statement ok
DROP VIEW view_3_tab4_1055

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1056') DROP VIEW view_1_tab0_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1056') DROP VIEW view_2_tab0_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1056') DROP VIEW view_3_tab0_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1056

statement ok
CREATE VIEW view_1_tab0_1056 AS SELECT pk, col0 FROM tab0 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))

statement ok
CREATE VIEW view_2_tab0_1056 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))

statement ok
CREATE VIEW view_3_tab0_1056 AS SELECT pk FROM view_1_tab0_1056

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_1056
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1056 UNION ALL SELECT pk, col0 FROM view_2_tab0_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1056 UNION SELECT pk, col0 FROM view_2_tab0_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) ) AS tab0_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1056

statement ok
DROP VIEW view_2_tab0_1056

statement ok
DROP VIEW view_3_tab0_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1056') DROP VIEW view_1_tab1_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1056') DROP VIEW view_2_tab1_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1056') DROP VIEW view_3_tab1_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1056

statement ok
CREATE VIEW view_1_tab1_1056 AS SELECT pk, col0 FROM tab1 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))

statement ok
CREATE VIEW view_2_tab1_1056 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))

statement ok
CREATE VIEW view_3_tab1_1056 AS SELECT pk FROM view_1_tab1_1056

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_1056
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1056 UNION ALL SELECT pk, col0 FROM view_2_tab1_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1056 UNION SELECT pk, col0 FROM view_2_tab1_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) ) AS tab1_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1056

statement ok
DROP VIEW view_2_tab1_1056

statement ok
DROP VIEW view_3_tab1_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1056') DROP VIEW view_1_tab2_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1056') DROP VIEW view_2_tab2_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1056') DROP VIEW view_3_tab2_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1056

statement ok
CREATE VIEW view_1_tab2_1056 AS SELECT pk, col0 FROM tab2 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))

statement ok
CREATE VIEW view_2_tab2_1056 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))

statement ok
CREATE VIEW view_3_tab2_1056 AS SELECT pk FROM view_1_tab2_1056

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_1056
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1056 UNION ALL SELECT pk, col0 FROM view_2_tab2_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1056 UNION SELECT pk, col0 FROM view_2_tab2_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) ) AS tab2_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1056

statement ok
DROP VIEW view_2_tab2_1056

statement ok
DROP VIEW view_3_tab2_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1056') DROP VIEW view_1_tab3_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1056') DROP VIEW view_2_tab3_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1056') DROP VIEW view_3_tab3_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1056

statement ok
CREATE VIEW view_1_tab3_1056 AS SELECT pk, col0 FROM tab3 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))

statement ok
CREATE VIEW view_2_tab3_1056 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))

statement ok
CREATE VIEW view_3_tab3_1056 AS SELECT pk FROM view_1_tab3_1056

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_1056
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1056 UNION ALL SELECT pk, col0 FROM view_2_tab3_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1056 UNION SELECT pk, col0 FROM view_2_tab3_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) ) AS tab3_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1056

statement ok
DROP VIEW view_2_tab3_1056

statement ok
DROP VIEW view_3_tab3_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1056') DROP VIEW view_1_tab4_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1056') DROP VIEW view_2_tab4_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1056') DROP VIEW view_3_tab4_1056

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1056

statement ok
CREATE VIEW view_1_tab4_1056 AS SELECT pk, col0 FROM tab4 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))

statement ok
CREATE VIEW view_2_tab4_1056 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))

statement ok
CREATE VIEW view_3_tab4_1056 AS SELECT pk FROM view_1_tab4_1056

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_1056
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1056 UNION ALL SELECT pk, col0 FROM view_2_tab4_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1056 UNION SELECT pk, col0 FROM view_2_tab4_1056
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0)) ) AS tab4_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_1056
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE col1 > 2.15 OR ((col1 <= 28.98 AND (col3 <= 90) OR col1 > 29.76 OR col3 BETWEEN 51 AND 95)) AND ((col1 < 34.52 AND col3 <= 48) OR col3 IS NULL OR col3 >= 92 AND col3 = 66 AND (col3 >= 0))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1056

statement ok
DROP VIEW view_2_tab4_1056

statement ok
DROP VIEW view_3_tab4_1056

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1057') DROP VIEW view_1_tab0_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1057') DROP VIEW view_2_tab0_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1057') DROP VIEW view_3_tab0_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1057

statement ok
CREATE VIEW view_1_tab0_1057 AS SELECT pk, col0 FROM tab0 WHERE col1 < 63.29

statement ok
CREATE VIEW view_2_tab0_1057 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 63.29)

statement ok
CREATE VIEW view_3_tab0_1057 AS SELECT pk FROM view_1_tab0_1057

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE col1 < 63.29
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 63.29)
----
0
71
3
5
4
92
5
97

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_1057
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_1057
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 63.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1057 UNION ALL SELECT pk, col0 FROM view_2_tab0_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 63.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1057 UNION SELECT pk, col0 FROM view_2_tab0_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 63.29 ) AS tab0_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE col1 < 63.29
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1057

statement ok
DROP VIEW view_2_tab0_1057

statement ok
DROP VIEW view_3_tab0_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1057') DROP VIEW view_1_tab1_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1057') DROP VIEW view_2_tab1_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1057') DROP VIEW view_3_tab1_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1057

statement ok
CREATE VIEW view_1_tab1_1057 AS SELECT pk, col0 FROM tab1 WHERE col1 < 63.29

statement ok
CREATE VIEW view_2_tab1_1057 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 63.29)

statement ok
CREATE VIEW view_3_tab1_1057 AS SELECT pk FROM view_1_tab1_1057

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE col1 < 63.29
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 63.29)
----
0
71
3
5
4
92
5
97

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_1057
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_1057
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 63.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1057 UNION ALL SELECT pk, col0 FROM view_2_tab1_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 63.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1057 UNION SELECT pk, col0 FROM view_2_tab1_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 63.29 ) AS tab1_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE col1 < 63.29
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1057

statement ok
DROP VIEW view_2_tab1_1057

statement ok
DROP VIEW view_3_tab1_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1057') DROP VIEW view_1_tab2_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1057') DROP VIEW view_2_tab2_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1057') DROP VIEW view_3_tab2_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1057

statement ok
CREATE VIEW view_1_tab2_1057 AS SELECT pk, col0 FROM tab2 WHERE col1 < 63.29

statement ok
CREATE VIEW view_2_tab2_1057 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 63.29)

statement ok
CREATE VIEW view_3_tab2_1057 AS SELECT pk FROM view_1_tab2_1057

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE col1 < 63.29
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 63.29)
----
0
71
3
5
4
92
5
97

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_1057
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_1057
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 63.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1057 UNION ALL SELECT pk, col0 FROM view_2_tab2_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 63.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1057 UNION SELECT pk, col0 FROM view_2_tab2_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 63.29 ) AS tab2_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE col1 < 63.29
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1057

statement ok
DROP VIEW view_2_tab2_1057

statement ok
DROP VIEW view_3_tab2_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1057') DROP VIEW view_1_tab3_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1057') DROP VIEW view_2_tab3_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1057') DROP VIEW view_3_tab3_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1057

statement ok
CREATE VIEW view_1_tab3_1057 AS SELECT pk, col0 FROM tab3 WHERE col1 < 63.29

statement ok
CREATE VIEW view_2_tab3_1057 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 63.29)

statement ok
CREATE VIEW view_3_tab3_1057 AS SELECT pk FROM view_1_tab3_1057

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE col1 < 63.29
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 63.29)
----
0
71
3
5
4
92
5
97

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_1057
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_1057
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 63.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1057 UNION ALL SELECT pk, col0 FROM view_2_tab3_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 63.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1057 UNION SELECT pk, col0 FROM view_2_tab3_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 63.29 ) AS tab3_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE col1 < 63.29
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1057

statement ok
DROP VIEW view_2_tab3_1057

statement ok
DROP VIEW view_3_tab3_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1057') DROP VIEW view_1_tab4_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1057') DROP VIEW view_2_tab4_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1057') DROP VIEW view_3_tab4_1057

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1057

statement ok
CREATE VIEW view_1_tab4_1057 AS SELECT pk, col0 FROM tab4 WHERE col1 < 63.29

statement ok
CREATE VIEW view_2_tab4_1057 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 63.29)

statement ok
CREATE VIEW view_3_tab4_1057 AS SELECT pk FROM view_1_tab4_1057

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE col1 < 63.29
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 63.29)
----
0
71
3
5
4
92
5
97

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_1057
----
12 values hashing to bea6da55d3e98fab7c4bfd8ed4c75ea0

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_1057
----
0
71
3
5
4
92
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 63.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1057 UNION ALL SELECT pk, col0 FROM view_2_tab4_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 63.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 63.29)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1057 UNION SELECT pk, col0 FROM view_2_tab4_1057
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 63.29 ) AS tab4_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_1057
----
1
2
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE col1 < 63.29
----
1
2
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1057

statement ok
DROP VIEW view_2_tab4_1057

statement ok
DROP VIEW view_3_tab4_1057

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1058') DROP VIEW view_1_tab0_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1058') DROP VIEW view_2_tab0_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1058') DROP VIEW view_3_tab0_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1058

statement ok
CREATE VIEW view_1_tab0_1058 AS SELECT pk, col0 FROM tab0 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))

statement ok
CREATE VIEW view_2_tab0_1058 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))

statement ok
CREATE VIEW view_3_tab0_1058 AS SELECT pk FROM view_1_tab0_1058

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_1058
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1058 UNION ALL SELECT pk, col0 FROM view_2_tab0_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1058 UNION SELECT pk, col0 FROM view_2_tab0_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) ) AS tab0_1058
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_1058
----

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

statement ok
DROP VIEW view_1_tab0_1058

statement ok
DROP VIEW view_2_tab0_1058

statement ok
DROP VIEW view_3_tab0_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1058') DROP VIEW view_1_tab1_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1058') DROP VIEW view_2_tab1_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1058') DROP VIEW view_3_tab1_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1058

statement ok
CREATE VIEW view_1_tab1_1058 AS SELECT pk, col0 FROM tab1 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))

statement ok
CREATE VIEW view_2_tab1_1058 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))

statement ok
CREATE VIEW view_3_tab1_1058 AS SELECT pk FROM view_1_tab1_1058

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_1058
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1058 UNION ALL SELECT pk, col0 FROM view_2_tab1_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1058 UNION SELECT pk, col0 FROM view_2_tab1_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) ) AS tab1_1058
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_1058
----

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

statement ok
DROP VIEW view_1_tab1_1058

statement ok
DROP VIEW view_2_tab1_1058

statement ok
DROP VIEW view_3_tab1_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1058') DROP VIEW view_1_tab2_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1058') DROP VIEW view_2_tab2_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1058') DROP VIEW view_3_tab2_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1058

statement ok
CREATE VIEW view_1_tab2_1058 AS SELECT pk, col0 FROM tab2 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))

statement ok
CREATE VIEW view_2_tab2_1058 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))

statement ok
CREATE VIEW view_3_tab2_1058 AS SELECT pk FROM view_1_tab2_1058

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_1058
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1058 UNION ALL SELECT pk, col0 FROM view_2_tab2_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1058 UNION SELECT pk, col0 FROM view_2_tab2_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) ) AS tab2_1058
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_1058
----

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

statement ok
DROP VIEW view_1_tab2_1058

statement ok
DROP VIEW view_2_tab2_1058

statement ok
DROP VIEW view_3_tab2_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1058') DROP VIEW view_1_tab3_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1058') DROP VIEW view_2_tab3_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1058') DROP VIEW view_3_tab3_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1058

statement ok
CREATE VIEW view_1_tab3_1058 AS SELECT pk, col0 FROM tab3 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))

statement ok
CREATE VIEW view_2_tab3_1058 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))

statement ok
CREATE VIEW view_3_tab3_1058 AS SELECT pk FROM view_1_tab3_1058

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_1058
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1058 UNION ALL SELECT pk, col0 FROM view_2_tab3_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1058 UNION SELECT pk, col0 FROM view_2_tab3_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) ) AS tab3_1058
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_1058
----

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

statement ok
DROP VIEW view_1_tab3_1058

statement ok
DROP VIEW view_2_tab3_1058

statement ok
DROP VIEW view_3_tab3_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1058') DROP VIEW view_1_tab4_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1058') DROP VIEW view_2_tab4_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1058') DROP VIEW view_3_tab4_1058

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1058

statement ok
CREATE VIEW view_1_tab4_1058 AS SELECT pk, col0 FROM tab4 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))

statement ok
CREATE VIEW view_2_tab4_1058 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))

statement ok
CREATE VIEW view_3_tab4_1058 AS SELECT pk FROM view_1_tab4_1058

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_1058
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1058 UNION ALL SELECT pk, col0 FROM view_2_tab4_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1058 UNION SELECT pk, col0 FROM view_2_tab4_1058
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12)) ) AS tab4_1058
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_1058
----

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE ((col3 IN (80,75,14,23,85,2) AND col0 IS NULL OR (col0 < 54 OR col3 > 97) AND col0 = 3 AND (col4 > 56.68)) AND col4 <= 61.79 AND col3 BETWEEN 78 AND 82 OR col4 IN (63.99,17.12))
----

statement ok
DROP VIEW view_1_tab4_1058

statement ok
DROP VIEW view_2_tab4_1058

statement ok
DROP VIEW view_3_tab4_1058

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1060') DROP VIEW view_1_tab0_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1060') DROP VIEW view_2_tab0_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1060') DROP VIEW view_3_tab0_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1060

statement ok
CREATE VIEW view_1_tab0_1060 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 58.77

statement ok
CREATE VIEW view_2_tab0_1060 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 58.77)

statement ok
CREATE VIEW view_3_tab0_1060 AS SELECT pk FROM view_1_tab0_1060

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 58.77
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 58.77)
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_1060
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_1060
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 58.77 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1060 UNION ALL SELECT pk, col0 FROM view_2_tab0_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 58.77 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1060 UNION SELECT pk, col0 FROM view_2_tab0_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 58.77 ) AS tab0_1060
----
2
3
5

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_1060
----
2
3
5

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col4 >= 58.77
----
2
3
5

statement ok
DROP VIEW view_1_tab0_1060

statement ok
DROP VIEW view_2_tab0_1060

statement ok
DROP VIEW view_3_tab0_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1060') DROP VIEW view_1_tab1_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1060') DROP VIEW view_2_tab1_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1060') DROP VIEW view_3_tab1_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1060

statement ok
CREATE VIEW view_1_tab1_1060 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 58.77

statement ok
CREATE VIEW view_2_tab1_1060 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 58.77)

statement ok
CREATE VIEW view_3_tab1_1060 AS SELECT pk FROM view_1_tab1_1060

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 58.77
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 58.77)
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_1060
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_1060
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 58.77 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1060 UNION ALL SELECT pk, col0 FROM view_2_tab1_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 58.77 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1060 UNION SELECT pk, col0 FROM view_2_tab1_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 58.77 ) AS tab1_1060
----
2
3
5

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_1060
----
2
3
5

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col4 >= 58.77
----
2
3
5

statement ok
DROP VIEW view_1_tab1_1060

statement ok
DROP VIEW view_2_tab1_1060

statement ok
DROP VIEW view_3_tab1_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1060') DROP VIEW view_1_tab2_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1060') DROP VIEW view_2_tab2_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1060') DROP VIEW view_3_tab2_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1060

statement ok
CREATE VIEW view_1_tab2_1060 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 58.77

statement ok
CREATE VIEW view_2_tab2_1060 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 58.77)

statement ok
CREATE VIEW view_3_tab2_1060 AS SELECT pk FROM view_1_tab2_1060

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 58.77
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 58.77)
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_1060
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_1060
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 58.77 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1060 UNION ALL SELECT pk, col0 FROM view_2_tab2_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 58.77 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1060 UNION SELECT pk, col0 FROM view_2_tab2_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 58.77 ) AS tab2_1060
----
2
3
5

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_1060
----
2
3
5

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col4 >= 58.77
----
2
3
5

statement ok
DROP VIEW view_1_tab2_1060

statement ok
DROP VIEW view_2_tab2_1060

statement ok
DROP VIEW view_3_tab2_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1060') DROP VIEW view_1_tab3_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1060') DROP VIEW view_2_tab3_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1060') DROP VIEW view_3_tab3_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1060

statement ok
CREATE VIEW view_1_tab3_1060 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 58.77

statement ok
CREATE VIEW view_2_tab3_1060 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 58.77)

statement ok
CREATE VIEW view_3_tab3_1060 AS SELECT pk FROM view_1_tab3_1060

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 58.77
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 58.77)
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_1060
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_1060
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 58.77 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1060 UNION ALL SELECT pk, col0 FROM view_2_tab3_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 58.77 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1060 UNION SELECT pk, col0 FROM view_2_tab3_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 58.77 ) AS tab3_1060
----
2
3
5

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_1060
----
2
3
5

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col4 >= 58.77
----
2
3
5

statement ok
DROP VIEW view_1_tab3_1060

statement ok
DROP VIEW view_2_tab3_1060

statement ok
DROP VIEW view_3_tab3_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1060') DROP VIEW view_1_tab4_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1060') DROP VIEW view_2_tab4_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1060') DROP VIEW view_3_tab4_1060

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1060

statement ok
CREATE VIEW view_1_tab4_1060 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 58.77

statement ok
CREATE VIEW view_2_tab4_1060 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 58.77)

statement ok
CREATE VIEW view_3_tab4_1060 AS SELECT pk FROM view_1_tab4_1060

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 58.77
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 58.77)
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_1060
----
2
89
3
5
5
97

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_1060
----
14 values hashing to e2c6c265be14bec6061b244ed49d7fd0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 58.77 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1060 UNION ALL SELECT pk, col0 FROM view_2_tab4_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 58.77 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 58.77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1060 UNION SELECT pk, col0 FROM view_2_tab4_1060
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 58.77 ) AS tab4_1060
----
2
3
5

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_1060
----
2
3
5

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col4 >= 58.77
----
2
3
5

statement ok
DROP VIEW view_1_tab4_1060

statement ok
DROP VIEW view_2_tab4_1060

statement ok
DROP VIEW view_3_tab4_1060

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1061') DROP VIEW view_1_tab0_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1061') DROP VIEW view_2_tab0_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1061') DROP VIEW view_3_tab0_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1061

statement ok
CREATE VIEW view_1_tab0_1061 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 9

statement ok
CREATE VIEW view_2_tab0_1061 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 9)

statement ok
CREATE VIEW view_3_tab0_1061 AS SELECT pk FROM view_1_tab0_1061

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 9
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 9)
----
3
5

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_1061
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_1061
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 9 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1061 UNION ALL SELECT pk, col0 FROM view_2_tab0_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 9 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1061 UNION SELECT pk, col0 FROM view_2_tab0_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 9 ) AS tab0_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col0 >= 9
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_1061

statement ok
DROP VIEW view_2_tab0_1061

statement ok
DROP VIEW view_3_tab0_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1061') DROP VIEW view_1_tab1_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1061') DROP VIEW view_2_tab1_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1061') DROP VIEW view_3_tab1_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1061

statement ok
CREATE VIEW view_1_tab1_1061 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 9

statement ok
CREATE VIEW view_2_tab1_1061 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 9)

statement ok
CREATE VIEW view_3_tab1_1061 AS SELECT pk FROM view_1_tab1_1061

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 9
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 9)
----
3
5

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_1061
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_1061
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 9 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1061 UNION ALL SELECT pk, col0 FROM view_2_tab1_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 9 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1061 UNION SELECT pk, col0 FROM view_2_tab1_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 9 ) AS tab1_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col0 >= 9
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_1061

statement ok
DROP VIEW view_2_tab1_1061

statement ok
DROP VIEW view_3_tab1_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1061') DROP VIEW view_1_tab2_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1061') DROP VIEW view_2_tab2_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1061') DROP VIEW view_3_tab2_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1061

statement ok
CREATE VIEW view_1_tab2_1061 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 9

statement ok
CREATE VIEW view_2_tab2_1061 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 9)

statement ok
CREATE VIEW view_3_tab2_1061 AS SELECT pk FROM view_1_tab2_1061

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 9
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 9)
----
3
5

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_1061
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_1061
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 9 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1061 UNION ALL SELECT pk, col0 FROM view_2_tab2_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 9 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1061 UNION SELECT pk, col0 FROM view_2_tab2_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 9 ) AS tab2_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col0 >= 9
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_1061

statement ok
DROP VIEW view_2_tab2_1061

statement ok
DROP VIEW view_3_tab2_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1061') DROP VIEW view_1_tab3_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1061') DROP VIEW view_2_tab3_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1061') DROP VIEW view_3_tab3_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1061

statement ok
CREATE VIEW view_1_tab3_1061 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 9

statement ok
CREATE VIEW view_2_tab3_1061 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 9)

statement ok
CREATE VIEW view_3_tab3_1061 AS SELECT pk FROM view_1_tab3_1061

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 9
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 9)
----
3
5

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_1061
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_1061
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 9 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1061 UNION ALL SELECT pk, col0 FROM view_2_tab3_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 9 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1061 UNION SELECT pk, col0 FROM view_2_tab3_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 9 ) AS tab3_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col0 >= 9
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_1061

statement ok
DROP VIEW view_2_tab3_1061

statement ok
DROP VIEW view_3_tab3_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1061') DROP VIEW view_1_tab4_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1061') DROP VIEW view_2_tab4_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1061') DROP VIEW view_3_tab4_1061

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1061

statement ok
CREATE VIEW view_1_tab4_1061 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 9

statement ok
CREATE VIEW view_2_tab4_1061 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 9)

statement ok
CREATE VIEW view_3_tab4_1061 AS SELECT pk FROM view_1_tab4_1061

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 9
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 9)
----
3
5

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_1061
----
18 values hashing to 33a44b66c47ee660736f29137a376cdf

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_1061
----
3
5

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 9 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1061 UNION ALL SELECT pk, col0 FROM view_2_tab4_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 9 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 9)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1061 UNION SELECT pk, col0 FROM view_2_tab4_1061
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 9 ) AS tab4_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_1061
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col0 >= 9
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_1061

statement ok
DROP VIEW view_2_tab4_1061

statement ok
DROP VIEW view_3_tab4_1061

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1062') DROP VIEW view_1_tab0_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1062') DROP VIEW view_2_tab0_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1062') DROP VIEW view_3_tab0_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1062

statement ok
CREATE VIEW view_1_tab0_1062 AS SELECT pk, col0 FROM tab0 WHERE col4 < 89.93

statement ok
CREATE VIEW view_2_tab0_1062 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 89.93)

statement ok
CREATE VIEW view_3_tab0_1062 AS SELECT pk FROM view_1_tab0_1062

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE col4 < 89.93
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 89.93)
----

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_1062
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 89.93 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1062 UNION ALL SELECT pk, col0 FROM view_2_tab0_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 89.93 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1062 UNION SELECT pk, col0 FROM view_2_tab0_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 89.93 ) AS tab0_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE col4 < 89.93
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1062

statement ok
DROP VIEW view_2_tab0_1062

statement ok
DROP VIEW view_3_tab0_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1062') DROP VIEW view_1_tab1_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1062') DROP VIEW view_2_tab1_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1062') DROP VIEW view_3_tab1_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1062

statement ok
CREATE VIEW view_1_tab1_1062 AS SELECT pk, col0 FROM tab1 WHERE col4 < 89.93

statement ok
CREATE VIEW view_2_tab1_1062 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 89.93)

statement ok
CREATE VIEW view_3_tab1_1062 AS SELECT pk FROM view_1_tab1_1062

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE col4 < 89.93
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 89.93)
----

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_1062
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 89.93 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1062 UNION ALL SELECT pk, col0 FROM view_2_tab1_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 89.93 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1062 UNION SELECT pk, col0 FROM view_2_tab1_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 89.93 ) AS tab1_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE col4 < 89.93
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1062

statement ok
DROP VIEW view_2_tab1_1062

statement ok
DROP VIEW view_3_tab1_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1062') DROP VIEW view_1_tab2_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1062') DROP VIEW view_2_tab2_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1062') DROP VIEW view_3_tab2_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1062

statement ok
CREATE VIEW view_1_tab2_1062 AS SELECT pk, col0 FROM tab2 WHERE col4 < 89.93

statement ok
CREATE VIEW view_2_tab2_1062 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 89.93)

statement ok
CREATE VIEW view_3_tab2_1062 AS SELECT pk FROM view_1_tab2_1062

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE col4 < 89.93
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 89.93)
----

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_1062
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 89.93 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1062 UNION ALL SELECT pk, col0 FROM view_2_tab2_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 89.93 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1062 UNION SELECT pk, col0 FROM view_2_tab2_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 89.93 ) AS tab2_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE col4 < 89.93
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1062

statement ok
DROP VIEW view_2_tab2_1062

statement ok
DROP VIEW view_3_tab2_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1062') DROP VIEW view_1_tab3_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1062') DROP VIEW view_2_tab3_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1062') DROP VIEW view_3_tab3_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1062

statement ok
CREATE VIEW view_1_tab3_1062 AS SELECT pk, col0 FROM tab3 WHERE col4 < 89.93

statement ok
CREATE VIEW view_2_tab3_1062 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 89.93)

statement ok
CREATE VIEW view_3_tab3_1062 AS SELECT pk FROM view_1_tab3_1062

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE col4 < 89.93
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 89.93)
----

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_1062
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 89.93 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1062 UNION ALL SELECT pk, col0 FROM view_2_tab3_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 89.93 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1062 UNION SELECT pk, col0 FROM view_2_tab3_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 89.93 ) AS tab3_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE col4 < 89.93
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1062

statement ok
DROP VIEW view_2_tab3_1062

statement ok
DROP VIEW view_3_tab3_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1062') DROP VIEW view_1_tab4_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1062') DROP VIEW view_2_tab4_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1062') DROP VIEW view_3_tab4_1062

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1062

statement ok
CREATE VIEW view_1_tab4_1062 AS SELECT pk, col0 FROM tab4 WHERE col4 < 89.93

statement ok
CREATE VIEW view_2_tab4_1062 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 89.93)

statement ok
CREATE VIEW view_3_tab4_1062 AS SELECT pk FROM view_1_tab4_1062

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE col4 < 89.93
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 89.93)
----

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_1062
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 89.93 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1062 UNION ALL SELECT pk, col0 FROM view_2_tab4_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 89.93 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 89.93)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1062 UNION SELECT pk, col0 FROM view_2_tab4_1062
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 89.93 ) AS tab4_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_1062
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE col4 < 89.93
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1062

statement ok
DROP VIEW view_2_tab4_1062

statement ok
DROP VIEW view_3_tab4_1062

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1063') DROP VIEW view_1_tab0_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1063') DROP VIEW view_2_tab0_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1063') DROP VIEW view_3_tab0_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1063

statement ok
CREATE VIEW view_1_tab0_1063 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))

statement ok
CREATE VIEW view_2_tab0_1063 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))

statement ok
CREATE VIEW view_3_tab0_1063 AS SELECT pk FROM view_1_tab0_1063

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
8
14

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_1063
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_1063
----
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1063 UNION ALL SELECT pk, col0 FROM view_2_tab0_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1063 UNION SELECT pk, col0 FROM view_2_tab0_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) ) AS tab0_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_1063

statement ok
DROP VIEW view_2_tab0_1063

statement ok
DROP VIEW view_3_tab0_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1063') DROP VIEW view_1_tab1_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1063') DROP VIEW view_2_tab1_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1063') DROP VIEW view_3_tab1_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1063

statement ok
CREATE VIEW view_1_tab1_1063 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))

statement ok
CREATE VIEW view_2_tab1_1063 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))

statement ok
CREATE VIEW view_3_tab1_1063 AS SELECT pk FROM view_1_tab1_1063

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
8
14

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_1063
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_1063
----
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1063 UNION ALL SELECT pk, col0 FROM view_2_tab1_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1063 UNION SELECT pk, col0 FROM view_2_tab1_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) ) AS tab1_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_1063

statement ok
DROP VIEW view_2_tab1_1063

statement ok
DROP VIEW view_3_tab1_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1063') DROP VIEW view_1_tab2_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1063') DROP VIEW view_2_tab2_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1063') DROP VIEW view_3_tab2_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1063

statement ok
CREATE VIEW view_1_tab2_1063 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))

statement ok
CREATE VIEW view_2_tab2_1063 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))

statement ok
CREATE VIEW view_3_tab2_1063 AS SELECT pk FROM view_1_tab2_1063

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
8
14

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_1063
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_1063
----
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1063 UNION ALL SELECT pk, col0 FROM view_2_tab2_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1063 UNION SELECT pk, col0 FROM view_2_tab2_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) ) AS tab2_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_1063

statement ok
DROP VIEW view_2_tab2_1063

statement ok
DROP VIEW view_3_tab2_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1063') DROP VIEW view_1_tab3_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1063') DROP VIEW view_2_tab3_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1063') DROP VIEW view_3_tab3_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1063

statement ok
CREATE VIEW view_1_tab3_1063 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))

statement ok
CREATE VIEW view_2_tab3_1063 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))

statement ok
CREATE VIEW view_3_tab3_1063 AS SELECT pk FROM view_1_tab3_1063

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
8
14

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_1063
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_1063
----
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1063 UNION ALL SELECT pk, col0 FROM view_2_tab3_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1063 UNION SELECT pk, col0 FROM view_2_tab3_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) ) AS tab3_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_1063

statement ok
DROP VIEW view_2_tab3_1063

statement ok
DROP VIEW view_3_tab3_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1063') DROP VIEW view_1_tab4_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1063') DROP VIEW view_2_tab4_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1063') DROP VIEW view_3_tab4_1063

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1063

statement ok
CREATE VIEW view_1_tab4_1063 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))

statement ok
CREATE VIEW view_2_tab4_1063 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))

statement ok
CREATE VIEW view_3_tab4_1063 AS SELECT pk FROM view_1_tab4_1063

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
8
14

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_1063
----
18 values hashing to d8b721ea6b411edd19c33e796a31201e

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_1063
----
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1063 UNION ALL SELECT pk, col0 FROM view_2_tab4_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1063 UNION SELECT pk, col0 FROM view_2_tab4_1063
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29))) ) AS tab4_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_1063
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE (col3 > 18) OR col0 > 25 OR col1 IS NULL AND (((col4 > 68.29)))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_1063

statement ok
DROP VIEW view_2_tab4_1063

statement ok
DROP VIEW view_3_tab4_1063

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1064') DROP VIEW view_1_tab0_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1064') DROP VIEW view_2_tab0_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1064') DROP VIEW view_3_tab0_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1064

statement ok
CREATE VIEW view_1_tab0_1064 AS SELECT pk, col0 FROM tab0 WHERE col3 > 77

statement ok
CREATE VIEW view_2_tab0_1064 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 77)

statement ok
CREATE VIEW view_3_tab0_1064 AS SELECT pk FROM view_1_tab0_1064

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE col3 > 77
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 77)
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_1064
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_1064
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 77 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1064 UNION ALL SELECT pk, col0 FROM view_2_tab0_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 77 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1064 UNION SELECT pk, col0 FROM view_2_tab0_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 77 ) AS tab0_1064
----
6

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_1064
----
6

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE col3 > 77
----
6

statement ok
DROP VIEW view_1_tab0_1064

statement ok
DROP VIEW view_2_tab0_1064

statement ok
DROP VIEW view_3_tab0_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1064') DROP VIEW view_1_tab1_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1064') DROP VIEW view_2_tab1_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1064') DROP VIEW view_3_tab1_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1064

statement ok
CREATE VIEW view_1_tab1_1064 AS SELECT pk, col0 FROM tab1 WHERE col3 > 77

statement ok
CREATE VIEW view_2_tab1_1064 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 77)

statement ok
CREATE VIEW view_3_tab1_1064 AS SELECT pk FROM view_1_tab1_1064

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE col3 > 77
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 77)
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_1064
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_1064
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 77 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1064 UNION ALL SELECT pk, col0 FROM view_2_tab1_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 77 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1064 UNION SELECT pk, col0 FROM view_2_tab1_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 77 ) AS tab1_1064
----
6

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_1064
----
6

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE col3 > 77
----
6

statement ok
DROP VIEW view_1_tab1_1064

statement ok
DROP VIEW view_2_tab1_1064

statement ok
DROP VIEW view_3_tab1_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1064') DROP VIEW view_1_tab2_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1064') DROP VIEW view_2_tab2_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1064') DROP VIEW view_3_tab2_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1064

statement ok
CREATE VIEW view_1_tab2_1064 AS SELECT pk, col0 FROM tab2 WHERE col3 > 77

statement ok
CREATE VIEW view_2_tab2_1064 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 77)

statement ok
CREATE VIEW view_3_tab2_1064 AS SELECT pk FROM view_1_tab2_1064

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE col3 > 77
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 77)
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_1064
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_1064
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 77 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1064 UNION ALL SELECT pk, col0 FROM view_2_tab2_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 77 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1064 UNION SELECT pk, col0 FROM view_2_tab2_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 77 ) AS tab2_1064
----
6

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_1064
----
6

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE col3 > 77
----
6

statement ok
DROP VIEW view_1_tab2_1064

statement ok
DROP VIEW view_2_tab2_1064

statement ok
DROP VIEW view_3_tab2_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1064') DROP VIEW view_1_tab3_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1064') DROP VIEW view_2_tab3_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1064') DROP VIEW view_3_tab3_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1064

statement ok
CREATE VIEW view_1_tab3_1064 AS SELECT pk, col0 FROM tab3 WHERE col3 > 77

statement ok
CREATE VIEW view_2_tab3_1064 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 77)

statement ok
CREATE VIEW view_3_tab3_1064 AS SELECT pk FROM view_1_tab3_1064

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE col3 > 77
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 77)
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_1064
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_1064
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 77 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1064 UNION ALL SELECT pk, col0 FROM view_2_tab3_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 77 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1064 UNION SELECT pk, col0 FROM view_2_tab3_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 77 ) AS tab3_1064
----
6

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_1064
----
6

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE col3 > 77
----
6

statement ok
DROP VIEW view_1_tab3_1064

statement ok
DROP VIEW view_2_tab3_1064

statement ok
DROP VIEW view_3_tab3_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1064') DROP VIEW view_1_tab4_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1064') DROP VIEW view_2_tab4_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1064') DROP VIEW view_3_tab4_1064

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1064

statement ok
CREATE VIEW view_1_tab4_1064 AS SELECT pk, col0 FROM tab4 WHERE col3 > 77

statement ok
CREATE VIEW view_2_tab4_1064 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 77)

statement ok
CREATE VIEW view_3_tab4_1064 AS SELECT pk FROM view_1_tab4_1064

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE col3 > 77
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 77)
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_1064
----
6
36

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_1064
----
18 values hashing to 78b63a12956453f086ccc5360f9b2476

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 77 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1064 UNION ALL SELECT pk, col0 FROM view_2_tab4_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 77 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 77)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1064 UNION SELECT pk, col0 FROM view_2_tab4_1064
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 77 ) AS tab4_1064
----
6

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_1064
----
6

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE col3 > 77
----
6

statement ok
DROP VIEW view_1_tab4_1064

statement ok
DROP VIEW view_2_tab4_1064

statement ok
DROP VIEW view_3_tab4_1064

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1065') DROP VIEW view_1_tab0_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1065') DROP VIEW view_2_tab0_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1065') DROP VIEW view_3_tab0_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1065

statement ok
CREATE VIEW view_1_tab0_1065 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 19)

statement ok
CREATE VIEW view_2_tab0_1065 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 19))

statement ok
CREATE VIEW view_3_tab0_1065 AS SELECT pk FROM view_1_tab0_1065

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 19)
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 19))
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_1065
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_1065
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 19) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1065 UNION ALL SELECT pk, col0 FROM view_2_tab0_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 19) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1065 UNION SELECT pk, col0 FROM view_2_tab0_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 19) ) AS tab0_1065
----
3
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_1065
----
3
7
8

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE (col0 < 19)
----
3
7
8

statement ok
DROP VIEW view_1_tab0_1065

statement ok
DROP VIEW view_2_tab0_1065

statement ok
DROP VIEW view_3_tab0_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1065') DROP VIEW view_1_tab1_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1065') DROP VIEW view_2_tab1_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1065') DROP VIEW view_3_tab1_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1065

statement ok
CREATE VIEW view_1_tab1_1065 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 19)

statement ok
CREATE VIEW view_2_tab1_1065 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 19))

statement ok
CREATE VIEW view_3_tab1_1065 AS SELECT pk FROM view_1_tab1_1065

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 19)
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 19))
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_1065
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_1065
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 19) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1065 UNION ALL SELECT pk, col0 FROM view_2_tab1_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 19) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1065 UNION SELECT pk, col0 FROM view_2_tab1_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 19) ) AS tab1_1065
----
3
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_1065
----
3
7
8

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE (col0 < 19)
----
3
7
8

statement ok
DROP VIEW view_1_tab1_1065

statement ok
DROP VIEW view_2_tab1_1065

statement ok
DROP VIEW view_3_tab1_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1065') DROP VIEW view_1_tab2_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1065') DROP VIEW view_2_tab2_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1065') DROP VIEW view_3_tab2_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1065

statement ok
CREATE VIEW view_1_tab2_1065 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 19)

statement ok
CREATE VIEW view_2_tab2_1065 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 19))

statement ok
CREATE VIEW view_3_tab2_1065 AS SELECT pk FROM view_1_tab2_1065

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 19)
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 19))
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_1065
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_1065
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 19) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1065 UNION ALL SELECT pk, col0 FROM view_2_tab2_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 19) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1065 UNION SELECT pk, col0 FROM view_2_tab2_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 19) ) AS tab2_1065
----
3
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_1065
----
3
7
8

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE (col0 < 19)
----
3
7
8

statement ok
DROP VIEW view_1_tab2_1065

statement ok
DROP VIEW view_2_tab2_1065

statement ok
DROP VIEW view_3_tab2_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1065') DROP VIEW view_1_tab3_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1065') DROP VIEW view_2_tab3_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1065') DROP VIEW view_3_tab3_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1065

statement ok
CREATE VIEW view_1_tab3_1065 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 19)

statement ok
CREATE VIEW view_2_tab3_1065 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 19))

statement ok
CREATE VIEW view_3_tab3_1065 AS SELECT pk FROM view_1_tab3_1065

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 19)
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 19))
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_1065
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_1065
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 19) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1065 UNION ALL SELECT pk, col0 FROM view_2_tab3_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 19) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1065 UNION SELECT pk, col0 FROM view_2_tab3_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 19) ) AS tab3_1065
----
3
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_1065
----
3
7
8

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE (col0 < 19)
----
3
7
8

statement ok
DROP VIEW view_1_tab3_1065

statement ok
DROP VIEW view_2_tab3_1065

statement ok
DROP VIEW view_3_tab3_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1065') DROP VIEW view_1_tab4_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1065') DROP VIEW view_2_tab4_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1065') DROP VIEW view_3_tab4_1065

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1065

statement ok
CREATE VIEW view_1_tab4_1065 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 19)

statement ok
CREATE VIEW view_2_tab4_1065 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 19))

statement ok
CREATE VIEW view_3_tab4_1065 AS SELECT pk FROM view_1_tab4_1065

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 19)
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 19))
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_1065
----
3
5
7
9
8
14

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_1065
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 19) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1065 UNION ALL SELECT pk, col0 FROM view_2_tab4_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 19) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 19))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1065 UNION SELECT pk, col0 FROM view_2_tab4_1065
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 19) ) AS tab4_1065
----
3
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_1065
----
3
7
8

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE (col0 < 19)
----
3
7
8

statement ok
DROP VIEW view_1_tab4_1065

statement ok
DROP VIEW view_2_tab4_1065

statement ok
DROP VIEW view_3_tab4_1065

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1066') DROP VIEW view_1_tab0_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1066') DROP VIEW view_2_tab0_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1066') DROP VIEW view_3_tab0_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1066

statement ok
CREATE VIEW view_1_tab0_1066 AS SELECT pk, col0 FROM tab0 WHERE col1 > 90.92

statement ok
CREATE VIEW view_2_tab0_1066 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 90.92)

statement ok
CREATE VIEW view_3_tab0_1066 AS SELECT pk FROM view_1_tab0_1066

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE col1 > 90.92
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 90.92)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_1066
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_1066
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 90.92 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1066 UNION ALL SELECT pk, col0 FROM view_2_tab0_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 90.92 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1066 UNION SELECT pk, col0 FROM view_2_tab0_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 90.92 ) AS tab0_1066
----
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_1066
----
5

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE col1 > 90.92
----
5

statement ok
DROP VIEW view_1_tab0_1066

statement ok
DROP VIEW view_2_tab0_1066

statement ok
DROP VIEW view_3_tab0_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1066') DROP VIEW view_1_tab1_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1066') DROP VIEW view_2_tab1_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1066') DROP VIEW view_3_tab1_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1066

statement ok
CREATE VIEW view_1_tab1_1066 AS SELECT pk, col0 FROM tab1 WHERE col1 > 90.92

statement ok
CREATE VIEW view_2_tab1_1066 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 90.92)

statement ok
CREATE VIEW view_3_tab1_1066 AS SELECT pk FROM view_1_tab1_1066

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE col1 > 90.92
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 90.92)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_1066
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_1066
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 90.92 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1066 UNION ALL SELECT pk, col0 FROM view_2_tab1_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 90.92 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1066 UNION SELECT pk, col0 FROM view_2_tab1_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 90.92 ) AS tab1_1066
----
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_1066
----
5

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE col1 > 90.92
----
5

statement ok
DROP VIEW view_1_tab1_1066

statement ok
DROP VIEW view_2_tab1_1066

statement ok
DROP VIEW view_3_tab1_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1066') DROP VIEW view_1_tab2_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1066') DROP VIEW view_2_tab2_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1066') DROP VIEW view_3_tab2_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1066

statement ok
CREATE VIEW view_1_tab2_1066 AS SELECT pk, col0 FROM tab2 WHERE col1 > 90.92

statement ok
CREATE VIEW view_2_tab2_1066 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 90.92)

statement ok
CREATE VIEW view_3_tab2_1066 AS SELECT pk FROM view_1_tab2_1066

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE col1 > 90.92
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 90.92)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_1066
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_1066
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 90.92 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1066 UNION ALL SELECT pk, col0 FROM view_2_tab2_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 90.92 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1066 UNION SELECT pk, col0 FROM view_2_tab2_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 90.92 ) AS tab2_1066
----
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_1066
----
5

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE col1 > 90.92
----
5

statement ok
DROP VIEW view_1_tab2_1066

statement ok
DROP VIEW view_2_tab2_1066

statement ok
DROP VIEW view_3_tab2_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1066') DROP VIEW view_1_tab3_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1066') DROP VIEW view_2_tab3_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1066') DROP VIEW view_3_tab3_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1066

statement ok
CREATE VIEW view_1_tab3_1066 AS SELECT pk, col0 FROM tab3 WHERE col1 > 90.92

statement ok
CREATE VIEW view_2_tab3_1066 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 90.92)

statement ok
CREATE VIEW view_3_tab3_1066 AS SELECT pk FROM view_1_tab3_1066

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE col1 > 90.92
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 90.92)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_1066
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_1066
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 90.92 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1066 UNION ALL SELECT pk, col0 FROM view_2_tab3_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 90.92 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1066 UNION SELECT pk, col0 FROM view_2_tab3_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 90.92 ) AS tab3_1066
----
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_1066
----
5

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE col1 > 90.92
----
5

statement ok
DROP VIEW view_1_tab3_1066

statement ok
DROP VIEW view_2_tab3_1066

statement ok
DROP VIEW view_3_tab3_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1066') DROP VIEW view_1_tab4_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1066') DROP VIEW view_2_tab4_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1066') DROP VIEW view_3_tab4_1066

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1066

statement ok
CREATE VIEW view_1_tab4_1066 AS SELECT pk, col0 FROM tab4 WHERE col1 > 90.92

statement ok
CREATE VIEW view_2_tab4_1066 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 90.92)

statement ok
CREATE VIEW view_3_tab4_1066 AS SELECT pk FROM view_1_tab4_1066

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE col1 > 90.92
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 90.92)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_1066
----
5
97

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_1066
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 90.92 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1066 UNION ALL SELECT pk, col0 FROM view_2_tab4_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 90.92 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 90.92)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1066 UNION SELECT pk, col0 FROM view_2_tab4_1066
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 90.92 ) AS tab4_1066
----
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_1066
----
5

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE col1 > 90.92
----
5

statement ok
DROP VIEW view_1_tab4_1066

statement ok
DROP VIEW view_2_tab4_1066

statement ok
DROP VIEW view_3_tab4_1066

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1067') DROP VIEW view_1_tab0_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1067') DROP VIEW view_2_tab0_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1067') DROP VIEW view_3_tab0_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1067

statement ok
CREATE VIEW view_1_tab0_1067 AS SELECT pk, col0 FROM tab0 WHERE (col1 <= 80.90)

statement ok
CREATE VIEW view_2_tab0_1067 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 80.90))

statement ok
CREATE VIEW view_3_tab0_1067 AS SELECT pk FROM view_1_tab0_1067

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE (col1 <= 80.90)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 80.90))
----
5
97

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_1067
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_1067
----
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 <= 80.90) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1067 UNION ALL SELECT pk, col0 FROM view_2_tab0_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 <= 80.90) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1067 UNION SELECT pk, col0 FROM view_2_tab0_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 <= 80.90) ) AS tab0_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE (col1 <= 80.90)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab0_1067

statement ok
DROP VIEW view_2_tab0_1067

statement ok
DROP VIEW view_3_tab0_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1067') DROP VIEW view_1_tab1_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1067') DROP VIEW view_2_tab1_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1067') DROP VIEW view_3_tab1_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1067

statement ok
CREATE VIEW view_1_tab1_1067 AS SELECT pk, col0 FROM tab1 WHERE (col1 <= 80.90)

statement ok
CREATE VIEW view_2_tab1_1067 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 80.90))

statement ok
CREATE VIEW view_3_tab1_1067 AS SELECT pk FROM view_1_tab1_1067

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE (col1 <= 80.90)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 80.90))
----
5
97

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_1067
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_1067
----
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 <= 80.90) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1067 UNION ALL SELECT pk, col0 FROM view_2_tab1_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 <= 80.90) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1067 UNION SELECT pk, col0 FROM view_2_tab1_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 <= 80.90) ) AS tab1_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE (col1 <= 80.90)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab1_1067

statement ok
DROP VIEW view_2_tab1_1067

statement ok
DROP VIEW view_3_tab1_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1067') DROP VIEW view_1_tab2_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1067') DROP VIEW view_2_tab2_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1067') DROP VIEW view_3_tab2_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1067

statement ok
CREATE VIEW view_1_tab2_1067 AS SELECT pk, col0 FROM tab2 WHERE (col1 <= 80.90)

statement ok
CREATE VIEW view_2_tab2_1067 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 80.90))

statement ok
CREATE VIEW view_3_tab2_1067 AS SELECT pk FROM view_1_tab2_1067

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE (col1 <= 80.90)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 80.90))
----
5
97

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_1067
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_1067
----
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 <= 80.90) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1067 UNION ALL SELECT pk, col0 FROM view_2_tab2_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 <= 80.90) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1067 UNION SELECT pk, col0 FROM view_2_tab2_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 <= 80.90) ) AS tab2_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE (col1 <= 80.90)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab2_1067

statement ok
DROP VIEW view_2_tab2_1067

statement ok
DROP VIEW view_3_tab2_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1067') DROP VIEW view_1_tab3_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1067') DROP VIEW view_2_tab3_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1067') DROP VIEW view_3_tab3_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1067

statement ok
CREATE VIEW view_1_tab3_1067 AS SELECT pk, col0 FROM tab3 WHERE (col1 <= 80.90)

statement ok
CREATE VIEW view_2_tab3_1067 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 80.90))

statement ok
CREATE VIEW view_3_tab3_1067 AS SELECT pk FROM view_1_tab3_1067

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE (col1 <= 80.90)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 80.90))
----
5
97

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_1067
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_1067
----
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 <= 80.90) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1067 UNION ALL SELECT pk, col0 FROM view_2_tab3_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 <= 80.90) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1067 UNION SELECT pk, col0 FROM view_2_tab3_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 <= 80.90) ) AS tab3_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE (col1 <= 80.90)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab3_1067

statement ok
DROP VIEW view_2_tab3_1067

statement ok
DROP VIEW view_3_tab3_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1067') DROP VIEW view_1_tab4_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1067') DROP VIEW view_2_tab4_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1067') DROP VIEW view_3_tab4_1067

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1067

statement ok
CREATE VIEW view_1_tab4_1067 AS SELECT pk, col0 FROM tab4 WHERE (col1 <= 80.90)

statement ok
CREATE VIEW view_2_tab4_1067 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 80.90))

statement ok
CREATE VIEW view_3_tab4_1067 AS SELECT pk FROM view_1_tab4_1067

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE (col1 <= 80.90)
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 80.90))
----
5
97

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_1067
----
18 values hashing to e6d881af6987446b430328cf899ff019

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_1067
----
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 <= 80.90) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1067 UNION ALL SELECT pk, col0 FROM view_2_tab4_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 <= 80.90) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 80.90))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1067 UNION SELECT pk, col0 FROM view_2_tab4_1067
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 <= 80.90) ) AS tab4_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_1067
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE (col1 <= 80.90)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab4_1067

statement ok
DROP VIEW view_2_tab4_1067

statement ok
DROP VIEW view_3_tab4_1067

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1068') DROP VIEW view_1_tab0_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1068') DROP VIEW view_2_tab0_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1068') DROP VIEW view_3_tab0_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1068

statement ok
CREATE VIEW view_1_tab0_1068 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14

statement ok
CREATE VIEW view_2_tab0_1068 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)

statement ok
CREATE VIEW view_3_tab0_1068 AS SELECT pk FROM view_1_tab0_1068

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_1068
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_1068
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1068 UNION ALL SELECT pk, col0 FROM view_2_tab0_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1068 UNION SELECT pk, col0 FROM view_2_tab0_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 ) AS tab0_1068
----
3
7
8

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_1068
----
3
7
8

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab0_1068

statement ok
DROP VIEW view_2_tab0_1068

statement ok
DROP VIEW view_3_tab0_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1068') DROP VIEW view_1_tab1_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1068') DROP VIEW view_2_tab1_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1068') DROP VIEW view_3_tab1_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1068

statement ok
CREATE VIEW view_1_tab1_1068 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14

statement ok
CREATE VIEW view_2_tab1_1068 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)

statement ok
CREATE VIEW view_3_tab1_1068 AS SELECT pk FROM view_1_tab1_1068

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_1068
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_1068
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1068 UNION ALL SELECT pk, col0 FROM view_2_tab1_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1068 UNION SELECT pk, col0 FROM view_2_tab1_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 ) AS tab1_1068
----
3
7
8

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_1068
----
3
7
8

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab1_1068

statement ok
DROP VIEW view_2_tab1_1068

statement ok
DROP VIEW view_3_tab1_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1068') DROP VIEW view_1_tab2_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1068') DROP VIEW view_2_tab2_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1068') DROP VIEW view_3_tab2_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1068

statement ok
CREATE VIEW view_1_tab2_1068 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14

statement ok
CREATE VIEW view_2_tab2_1068 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)

statement ok
CREATE VIEW view_3_tab2_1068 AS SELECT pk FROM view_1_tab2_1068

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_1068
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_1068
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1068 UNION ALL SELECT pk, col0 FROM view_2_tab2_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1068 UNION SELECT pk, col0 FROM view_2_tab2_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 ) AS tab2_1068
----
3
7
8

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_1068
----
3
7
8

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab2_1068

statement ok
DROP VIEW view_2_tab2_1068

statement ok
DROP VIEW view_3_tab2_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1068') DROP VIEW view_1_tab3_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1068') DROP VIEW view_2_tab3_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1068') DROP VIEW view_3_tab3_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1068

statement ok
CREATE VIEW view_1_tab3_1068 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14

statement ok
CREATE VIEW view_2_tab3_1068 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)

statement ok
CREATE VIEW view_3_tab3_1068 AS SELECT pk FROM view_1_tab3_1068

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_1068
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_1068
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1068 UNION ALL SELECT pk, col0 FROM view_2_tab3_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1068 UNION SELECT pk, col0 FROM view_2_tab3_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 ) AS tab3_1068
----
3
7
8

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_1068
----
3
7
8

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab3_1068

statement ok
DROP VIEW view_2_tab3_1068

statement ok
DROP VIEW view_3_tab3_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1068') DROP VIEW view_1_tab4_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1068') DROP VIEW view_2_tab4_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1068') DROP VIEW view_3_tab4_1068

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1068

statement ok
CREATE VIEW view_1_tab4_1068 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14

statement ok
CREATE VIEW view_2_tab4_1068 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)

statement ok
CREATE VIEW view_3_tab4_1068 AS SELECT pk FROM view_1_tab4_1068

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_1068
----
3
5
7
9
8
14

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_1068
----
14 values hashing to ebc4c5ac3dc44819e18aff1edf266c56

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1068 UNION ALL SELECT pk, col0 FROM view_2_tab4_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1068 UNION SELECT pk, col0 FROM view_2_tab4_1068
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14 ) AS tab4_1068
----
3
7
8

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_1068
----
3
7
8

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE (col0 < 80 OR col3 <= 94 OR (col0 > 2 AND col0 <= 70 OR col1 < 95.50 OR (col3 = 9) AND col3 > 5 AND (col3 < 14) OR ((col1 IS NULL) AND col4 > 3.68 AND col1 = 0.13 OR col0 < 96 OR col3 BETWEEN 2 AND 28 AND col0 <= 28 AND col3 IS NULL AND (col3 < 31 OR (col0 < 6)) AND col0 IS NULL AND ((col1 < 91.84) OR col1 IN (41.79,41.96,0.59)) AND (col3 < 34) AND ((col0 < 35 OR (col3 IS NULL AND (col3 <= 69)) AND (col4 > 82.41) AND (col0 <= 39))) AND col1 <= 5.70 AND col3 >= 32 AND col1 > 60.87 AND col0 < 71 OR col3 < 79 AND (col4 IS NULL) OR col3 BETWEEN 70 AND 32 AND col1 > 34.44 AND (col1 > 66.96) AND col0 < 97) AND col4 > 26.99 AND col0 < 97)) AND col0 <= 14
----
3
7
8

statement ok
DROP VIEW view_1_tab4_1068

statement ok
DROP VIEW view_2_tab4_1068

statement ok
DROP VIEW view_3_tab4_1068

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1069') DROP VIEW view_1_tab0_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1069') DROP VIEW view_2_tab0_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1069') DROP VIEW view_3_tab0_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1069

statement ok
CREATE VIEW view_1_tab0_1069 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 30

statement ok
CREATE VIEW view_2_tab0_1069 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 30)

statement ok
CREATE VIEW view_3_tab0_1069 AS SELECT pk FROM view_1_tab0_1069

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 30
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 30)
----
0
71
7
9
8
14

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_1069
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_1069
----
0
71
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 30 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1069 UNION ALL SELECT pk, col0 FROM view_2_tab0_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 30 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1069 UNION SELECT pk, col0 FROM view_2_tab0_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 30 ) AS tab0_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE col3 >= 30
----
1
2
3
4
5
6
9

statement ok
DROP VIEW view_1_tab0_1069

statement ok
DROP VIEW view_2_tab0_1069

statement ok
DROP VIEW view_3_tab0_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1069') DROP VIEW view_1_tab1_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1069') DROP VIEW view_2_tab1_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1069') DROP VIEW view_3_tab1_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1069

statement ok
CREATE VIEW view_1_tab1_1069 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 30

statement ok
CREATE VIEW view_2_tab1_1069 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 30)

statement ok
CREATE VIEW view_3_tab1_1069 AS SELECT pk FROM view_1_tab1_1069

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 30
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 30)
----
0
71
7
9
8
14

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_1069
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_1069
----
0
71
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 30 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1069 UNION ALL SELECT pk, col0 FROM view_2_tab1_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 30 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1069 UNION SELECT pk, col0 FROM view_2_tab1_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 30 ) AS tab1_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE col3 >= 30
----
1
2
3
4
5
6
9

statement ok
DROP VIEW view_1_tab1_1069

statement ok
DROP VIEW view_2_tab1_1069

statement ok
DROP VIEW view_3_tab1_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1069') DROP VIEW view_1_tab2_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1069') DROP VIEW view_2_tab2_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1069') DROP VIEW view_3_tab2_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1069

statement ok
CREATE VIEW view_1_tab2_1069 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 30

statement ok
CREATE VIEW view_2_tab2_1069 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 30)

statement ok
CREATE VIEW view_3_tab2_1069 AS SELECT pk FROM view_1_tab2_1069

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 30
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 30)
----
0
71
7
9
8
14

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_1069
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_1069
----
0
71
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 30 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1069 UNION ALL SELECT pk, col0 FROM view_2_tab2_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 30 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1069 UNION SELECT pk, col0 FROM view_2_tab2_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 30 ) AS tab2_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE col3 >= 30
----
1
2
3
4
5
6
9

statement ok
DROP VIEW view_1_tab2_1069

statement ok
DROP VIEW view_2_tab2_1069

statement ok
DROP VIEW view_3_tab2_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1069') DROP VIEW view_1_tab3_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1069') DROP VIEW view_2_tab3_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1069') DROP VIEW view_3_tab3_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1069

statement ok
CREATE VIEW view_1_tab3_1069 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 30

statement ok
CREATE VIEW view_2_tab3_1069 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 30)

statement ok
CREATE VIEW view_3_tab3_1069 AS SELECT pk FROM view_1_tab3_1069

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 30
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 30)
----
0
71
7
9
8
14

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_1069
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_1069
----
0
71
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 30 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1069 UNION ALL SELECT pk, col0 FROM view_2_tab3_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 30 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1069 UNION SELECT pk, col0 FROM view_2_tab3_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 30 ) AS tab3_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE col3 >= 30
----
1
2
3
4
5
6
9

statement ok
DROP VIEW view_1_tab3_1069

statement ok
DROP VIEW view_2_tab3_1069

statement ok
DROP VIEW view_3_tab3_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1069') DROP VIEW view_1_tab4_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1069') DROP VIEW view_2_tab4_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1069') DROP VIEW view_3_tab4_1069

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1069

statement ok
CREATE VIEW view_1_tab4_1069 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 30

statement ok
CREATE VIEW view_2_tab4_1069 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 30)

statement ok
CREATE VIEW view_3_tab4_1069 AS SELECT pk FROM view_1_tab4_1069

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 30
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 30)
----
0
71
7
9
8
14

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_1069
----
14 values hashing to 58d7a4b1a0424c3e852ad0a51915060a

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_1069
----
0
71
7
9
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 30 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1069 UNION ALL SELECT pk, col0 FROM view_2_tab4_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 30 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 30)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1069 UNION SELECT pk, col0 FROM view_2_tab4_1069
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 30 ) AS tab4_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_1069
----
1
2
3
4
5
6
9

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE col3 >= 30
----
1
2
3
4
5
6
9

statement ok
DROP VIEW view_1_tab4_1069

statement ok
DROP VIEW view_2_tab4_1069

statement ok
DROP VIEW view_3_tab4_1069

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1070') DROP VIEW view_1_tab0_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1070') DROP VIEW view_2_tab0_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1070') DROP VIEW view_3_tab0_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1070

statement ok
CREATE VIEW view_1_tab0_1070 AS SELECT pk, col0 FROM tab0 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))

statement ok
CREATE VIEW view_2_tab0_1070 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))

statement ok
CREATE VIEW view_3_tab0_1070 AS SELECT pk FROM view_1_tab0_1070

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_1070
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_1070
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1070 UNION ALL SELECT pk, col0 FROM view_2_tab0_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1070 UNION SELECT pk, col0 FROM view_2_tab0_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) ) AS tab0_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
6
7
9

statement ok
DROP VIEW view_1_tab0_1070

statement ok
DROP VIEW view_2_tab0_1070

statement ok
DROP VIEW view_3_tab0_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1070') DROP VIEW view_1_tab1_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1070') DROP VIEW view_2_tab1_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1070') DROP VIEW view_3_tab1_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1070

statement ok
CREATE VIEW view_1_tab1_1070 AS SELECT pk, col0 FROM tab1 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))

statement ok
CREATE VIEW view_2_tab1_1070 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))

statement ok
CREATE VIEW view_3_tab1_1070 AS SELECT pk FROM view_1_tab1_1070

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_1070
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_1070
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1070 UNION ALL SELECT pk, col0 FROM view_2_tab1_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1070 UNION SELECT pk, col0 FROM view_2_tab1_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) ) AS tab1_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
6
7
9

statement ok
DROP VIEW view_1_tab1_1070

statement ok
DROP VIEW view_2_tab1_1070

statement ok
DROP VIEW view_3_tab1_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1070') DROP VIEW view_1_tab2_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1070') DROP VIEW view_2_tab2_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1070') DROP VIEW view_3_tab2_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1070

statement ok
CREATE VIEW view_1_tab2_1070 AS SELECT pk, col0 FROM tab2 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))

statement ok
CREATE VIEW view_2_tab2_1070 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))

statement ok
CREATE VIEW view_3_tab2_1070 AS SELECT pk FROM view_1_tab2_1070

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_1070
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_1070
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1070 UNION ALL SELECT pk, col0 FROM view_2_tab2_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1070 UNION SELECT pk, col0 FROM view_2_tab2_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) ) AS tab2_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
6
7
9

statement ok
DROP VIEW view_1_tab2_1070

statement ok
DROP VIEW view_2_tab2_1070

statement ok
DROP VIEW view_3_tab2_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1070') DROP VIEW view_1_tab3_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1070') DROP VIEW view_2_tab3_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1070') DROP VIEW view_3_tab3_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1070

statement ok
CREATE VIEW view_1_tab3_1070 AS SELECT pk, col0 FROM tab3 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))

statement ok
CREATE VIEW view_2_tab3_1070 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))

statement ok
CREATE VIEW view_3_tab3_1070 AS SELECT pk FROM view_1_tab3_1070

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_1070
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_1070
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1070 UNION ALL SELECT pk, col0 FROM view_2_tab3_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1070 UNION SELECT pk, col0 FROM view_2_tab3_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) ) AS tab3_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
6
7
9

statement ok
DROP VIEW view_1_tab3_1070

statement ok
DROP VIEW view_2_tab3_1070

statement ok
DROP VIEW view_3_tab3_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1070') DROP VIEW view_1_tab4_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1070') DROP VIEW view_2_tab4_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1070') DROP VIEW view_3_tab4_1070

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1070

statement ok
CREATE VIEW view_1_tab4_1070 AS SELECT pk, col0 FROM tab4 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))

statement ok
CREATE VIEW view_2_tab4_1070 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))

statement ok
CREATE VIEW view_3_tab4_1070 AS SELECT pk FROM view_1_tab4_1070

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_1070
----
3
5
6
36
7
9
9
56

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_1070
----
12 values hashing to 3b649bd886bf4fddb1e0ba6f33ccf7cd

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1070 UNION ALL SELECT pk, col0 FROM view_2_tab4_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1070 UNION SELECT pk, col0 FROM view_2_tab4_1070
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21))) ) AS tab4_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_1070
----
3
6
7
9

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE ((col0 >= 30)) AND col1 <= 34.36 OR (col4 >= 14.91) AND ((((col0 < 22))) OR ((col0 <= 27 AND (col0 >= 19) AND (col4 >= 96.82) AND (col3 > 29) OR (col0 >= 29) AND (col0 IN (77,15)) AND col1 >= 2.18 AND col3 > 21)))
----
3
6
7
9

statement ok
DROP VIEW view_1_tab4_1070

statement ok
DROP VIEW view_2_tab4_1070

statement ok
DROP VIEW view_3_tab4_1070

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1071') DROP VIEW view_1_tab0_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1071') DROP VIEW view_2_tab0_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1071') DROP VIEW view_3_tab0_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1071

statement ok
CREATE VIEW view_1_tab0_1071 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))

statement ok
CREATE VIEW view_2_tab0_1071 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))

statement ok
CREATE VIEW view_3_tab0_1071 AS SELECT pk FROM view_1_tab0_1071

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
0
71
5
97

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_1071
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_1071
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1071 UNION ALL SELECT pk, col0 FROM view_2_tab0_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1071 UNION SELECT pk, col0 FROM view_2_tab0_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) ) AS tab0_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab0_1071

statement ok
DROP VIEW view_2_tab0_1071

statement ok
DROP VIEW view_3_tab0_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1071') DROP VIEW view_1_tab1_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1071') DROP VIEW view_2_tab1_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1071') DROP VIEW view_3_tab1_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1071

statement ok
CREATE VIEW view_1_tab1_1071 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))

statement ok
CREATE VIEW view_2_tab1_1071 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))

statement ok
CREATE VIEW view_3_tab1_1071 AS SELECT pk FROM view_1_tab1_1071

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
0
71
5
97

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_1071
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_1071
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1071 UNION ALL SELECT pk, col0 FROM view_2_tab1_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1071 UNION SELECT pk, col0 FROM view_2_tab1_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) ) AS tab1_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab1_1071

statement ok
DROP VIEW view_2_tab1_1071

statement ok
DROP VIEW view_3_tab1_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1071') DROP VIEW view_1_tab2_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1071') DROP VIEW view_2_tab2_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1071') DROP VIEW view_3_tab2_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1071

statement ok
CREATE VIEW view_1_tab2_1071 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))

statement ok
CREATE VIEW view_2_tab2_1071 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))

statement ok
CREATE VIEW view_3_tab2_1071 AS SELECT pk FROM view_1_tab2_1071

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
0
71
5
97

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_1071
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_1071
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1071 UNION ALL SELECT pk, col0 FROM view_2_tab2_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1071 UNION SELECT pk, col0 FROM view_2_tab2_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) ) AS tab2_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab2_1071

statement ok
DROP VIEW view_2_tab2_1071

statement ok
DROP VIEW view_3_tab2_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1071') DROP VIEW view_1_tab3_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1071') DROP VIEW view_2_tab3_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1071') DROP VIEW view_3_tab3_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1071

statement ok
CREATE VIEW view_1_tab3_1071 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))

statement ok
CREATE VIEW view_2_tab3_1071 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))

statement ok
CREATE VIEW view_3_tab3_1071 AS SELECT pk FROM view_1_tab3_1071

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
0
71
5
97

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_1071
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_1071
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1071 UNION ALL SELECT pk, col0 FROM view_2_tab3_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1071 UNION SELECT pk, col0 FROM view_2_tab3_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) ) AS tab3_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab3_1071

statement ok
DROP VIEW view_2_tab3_1071

statement ok
DROP VIEW view_3_tab3_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1071') DROP VIEW view_1_tab4_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1071') DROP VIEW view_2_tab4_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1071') DROP VIEW view_3_tab4_1071

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1071

statement ok
CREATE VIEW view_1_tab4_1071 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))

statement ok
CREATE VIEW view_2_tab4_1071 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))

statement ok
CREATE VIEW view_3_tab4_1071 AS SELECT pk FROM view_1_tab4_1071

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
0
71
5
97

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_1071
----
16 values hashing to 5aee31850959587ea9a87bb1e7ae6638

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_1071
----
0
71
5
97

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1071 UNION ALL SELECT pk, col0 FROM view_2_tab4_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1071 UNION SELECT pk, col0 FROM view_2_tab4_1071
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1)) ) AS tab4_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_1071
----
1
2
3
4
6
7
8
9

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE (col3 >= 41 OR col3 <= 61 AND col0 IN (62,59,39,80,86,13) AND col0 < 86 AND (col4 <= 50.65) OR col0 < 54 OR (col4 BETWEEN 73.71 AND 85.1))
----
1
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab4_1071

statement ok
DROP VIEW view_2_tab4_1071

statement ok
DROP VIEW view_3_tab4_1071

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1072') DROP VIEW view_1_tab0_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1072') DROP VIEW view_2_tab0_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1072') DROP VIEW view_3_tab0_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1072

statement ok
CREATE VIEW view_1_tab0_1072 AS SELECT pk, col0 FROM tab0 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))

statement ok
CREATE VIEW view_2_tab0_1072 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))

statement ok
CREATE VIEW view_3_tab0_1072 AS SELECT pk FROM view_1_tab0_1072

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
4
92

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_1072
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_1072
----
4
92

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1072 UNION ALL SELECT pk, col0 FROM view_2_tab0_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1072 UNION SELECT pk, col0 FROM view_2_tab0_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) ) AS tab0_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab0_1072

statement ok
DROP VIEW view_2_tab0_1072

statement ok
DROP VIEW view_3_tab0_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1072') DROP VIEW view_1_tab1_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1072') DROP VIEW view_2_tab1_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1072') DROP VIEW view_3_tab1_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1072

statement ok
CREATE VIEW view_1_tab1_1072 AS SELECT pk, col0 FROM tab1 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))

statement ok
CREATE VIEW view_2_tab1_1072 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))

statement ok
CREATE VIEW view_3_tab1_1072 AS SELECT pk FROM view_1_tab1_1072

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
4
92

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_1072
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_1072
----
4
92

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1072 UNION ALL SELECT pk, col0 FROM view_2_tab1_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1072 UNION SELECT pk, col0 FROM view_2_tab1_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) ) AS tab1_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab1_1072

statement ok
DROP VIEW view_2_tab1_1072

statement ok
DROP VIEW view_3_tab1_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1072') DROP VIEW view_1_tab2_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1072') DROP VIEW view_2_tab2_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1072') DROP VIEW view_3_tab2_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1072

statement ok
CREATE VIEW view_1_tab2_1072 AS SELECT pk, col0 FROM tab2 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))

statement ok
CREATE VIEW view_2_tab2_1072 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))

statement ok
CREATE VIEW view_3_tab2_1072 AS SELECT pk FROM view_1_tab2_1072

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
4
92

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_1072
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_1072
----
4
92

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1072 UNION ALL SELECT pk, col0 FROM view_2_tab2_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1072 UNION SELECT pk, col0 FROM view_2_tab2_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) ) AS tab2_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab2_1072

statement ok
DROP VIEW view_2_tab2_1072

statement ok
DROP VIEW view_3_tab2_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1072') DROP VIEW view_1_tab3_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1072') DROP VIEW view_2_tab3_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1072') DROP VIEW view_3_tab3_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1072

statement ok
CREATE VIEW view_1_tab3_1072 AS SELECT pk, col0 FROM tab3 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))

statement ok
CREATE VIEW view_2_tab3_1072 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))

statement ok
CREATE VIEW view_3_tab3_1072 AS SELECT pk FROM view_1_tab3_1072

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
4
92

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_1072
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_1072
----
4
92

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1072 UNION ALL SELECT pk, col0 FROM view_2_tab3_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1072 UNION SELECT pk, col0 FROM view_2_tab3_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) ) AS tab3_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab3_1072

statement ok
DROP VIEW view_2_tab3_1072

statement ok
DROP VIEW view_3_tab3_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1072') DROP VIEW view_1_tab4_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1072') DROP VIEW view_2_tab4_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1072') DROP VIEW view_3_tab4_1072

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1072

statement ok
CREATE VIEW view_1_tab4_1072 AS SELECT pk, col0 FROM tab4 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))

statement ok
CREATE VIEW view_2_tab4_1072 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))

statement ok
CREATE VIEW view_3_tab4_1072 AS SELECT pk FROM view_1_tab4_1072

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
4
92

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_1072
----
18 values hashing to 8b03dbd9177f1ff5598f7765bf671065

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_1072
----
4
92

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1072 UNION ALL SELECT pk, col0 FROM view_2_tab4_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1072 UNION SELECT pk, col0 FROM view_2_tab4_1072
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73)) ) AS tab4_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_1072
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE col4 > 57.4 OR col1 < 58.84 OR ((col3 >= 77 AND col1 >= 13.96 OR col0 < 73))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab4_1072

statement ok
DROP VIEW view_2_tab4_1072

statement ok
DROP VIEW view_3_tab4_1072

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1073') DROP VIEW view_1_tab0_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1073') DROP VIEW view_2_tab0_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1073') DROP VIEW view_3_tab0_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1073

statement ok
CREATE VIEW view_1_tab0_1073 AS SELECT pk, col0 FROM tab0 WHERE col1 < 2.58 AND col3 < 75

statement ok
CREATE VIEW view_2_tab0_1073 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 2.58 AND col3 < 75)

statement ok
CREATE VIEW view_3_tab0_1073 AS SELECT pk FROM view_1_tab0_1073

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE col1 < 2.58 AND col3 < 75
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_1073
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 2.58 AND col3 < 75 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1073 UNION ALL SELECT pk, col0 FROM view_2_tab0_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 2.58 AND col3 < 75 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1073 UNION SELECT pk, col0 FROM view_2_tab0_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 2.58 AND col3 < 75 ) AS tab0_1073
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_1073
----

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE col1 < 2.58 AND col3 < 75
----

statement ok
DROP VIEW view_1_tab0_1073

statement ok
DROP VIEW view_2_tab0_1073

statement ok
DROP VIEW view_3_tab0_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1073') DROP VIEW view_1_tab1_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1073') DROP VIEW view_2_tab1_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1073') DROP VIEW view_3_tab1_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1073

statement ok
CREATE VIEW view_1_tab1_1073 AS SELECT pk, col0 FROM tab1 WHERE col1 < 2.58 AND col3 < 75

statement ok
CREATE VIEW view_2_tab1_1073 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 2.58 AND col3 < 75)

statement ok
CREATE VIEW view_3_tab1_1073 AS SELECT pk FROM view_1_tab1_1073

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE col1 < 2.58 AND col3 < 75
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_1073
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 2.58 AND col3 < 75 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1073 UNION ALL SELECT pk, col0 FROM view_2_tab1_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 2.58 AND col3 < 75 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1073 UNION SELECT pk, col0 FROM view_2_tab1_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 2.58 AND col3 < 75 ) AS tab1_1073
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_1073
----

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE col1 < 2.58 AND col3 < 75
----

statement ok
DROP VIEW view_1_tab1_1073

statement ok
DROP VIEW view_2_tab1_1073

statement ok
DROP VIEW view_3_tab1_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1073') DROP VIEW view_1_tab2_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1073') DROP VIEW view_2_tab2_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1073') DROP VIEW view_3_tab2_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1073

statement ok
CREATE VIEW view_1_tab2_1073 AS SELECT pk, col0 FROM tab2 WHERE col1 < 2.58 AND col3 < 75

statement ok
CREATE VIEW view_2_tab2_1073 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 2.58 AND col3 < 75)

statement ok
CREATE VIEW view_3_tab2_1073 AS SELECT pk FROM view_1_tab2_1073

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE col1 < 2.58 AND col3 < 75
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_1073
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 2.58 AND col3 < 75 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1073 UNION ALL SELECT pk, col0 FROM view_2_tab2_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 2.58 AND col3 < 75 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1073 UNION SELECT pk, col0 FROM view_2_tab2_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 2.58 AND col3 < 75 ) AS tab2_1073
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_1073
----

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE col1 < 2.58 AND col3 < 75
----

statement ok
DROP VIEW view_1_tab2_1073

statement ok
DROP VIEW view_2_tab2_1073

statement ok
DROP VIEW view_3_tab2_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1073') DROP VIEW view_1_tab3_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1073') DROP VIEW view_2_tab3_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1073') DROP VIEW view_3_tab3_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1073

statement ok
CREATE VIEW view_1_tab3_1073 AS SELECT pk, col0 FROM tab3 WHERE col1 < 2.58 AND col3 < 75

statement ok
CREATE VIEW view_2_tab3_1073 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 2.58 AND col3 < 75)

statement ok
CREATE VIEW view_3_tab3_1073 AS SELECT pk FROM view_1_tab3_1073

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE col1 < 2.58 AND col3 < 75
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_1073
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 2.58 AND col3 < 75 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1073 UNION ALL SELECT pk, col0 FROM view_2_tab3_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 2.58 AND col3 < 75 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1073 UNION SELECT pk, col0 FROM view_2_tab3_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 2.58 AND col3 < 75 ) AS tab3_1073
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_1073
----

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE col1 < 2.58 AND col3 < 75
----

statement ok
DROP VIEW view_1_tab3_1073

statement ok
DROP VIEW view_2_tab3_1073

statement ok
DROP VIEW view_3_tab3_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1073') DROP VIEW view_1_tab4_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1073') DROP VIEW view_2_tab4_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1073') DROP VIEW view_3_tab4_1073

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1073

statement ok
CREATE VIEW view_1_tab4_1073 AS SELECT pk, col0 FROM tab4 WHERE col1 < 2.58 AND col3 < 75

statement ok
CREATE VIEW view_2_tab4_1073 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 2.58 AND col3 < 75)

statement ok
CREATE VIEW view_3_tab4_1073 AS SELECT pk FROM view_1_tab4_1073

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE col1 < 2.58 AND col3 < 75
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_1073
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 2.58 AND col3 < 75 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1073 UNION ALL SELECT pk, col0 FROM view_2_tab4_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 2.58 AND col3 < 75 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 2.58 AND col3 < 75)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1073 UNION SELECT pk, col0 FROM view_2_tab4_1073
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 2.58 AND col3 < 75 ) AS tab4_1073
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_1073
----

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE col1 < 2.58 AND col3 < 75
----

statement ok
DROP VIEW view_1_tab4_1073

statement ok
DROP VIEW view_2_tab4_1073

statement ok
DROP VIEW view_3_tab4_1073

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1074') DROP VIEW view_1_tab0_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1074') DROP VIEW view_2_tab0_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1074') DROP VIEW view_3_tab0_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1074

statement ok
CREATE VIEW view_1_tab0_1074 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))

statement ok
CREATE VIEW view_2_tab0_1074 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))

statement ok
CREATE VIEW view_3_tab0_1074 AS SELECT pk FROM view_1_tab0_1074

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_1074
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1074 UNION ALL SELECT pk, col0 FROM view_2_tab0_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1074 UNION SELECT pk, col0 FROM view_2_tab0_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) ) AS tab0_1074
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_1074
----

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

statement ok
DROP VIEW view_1_tab0_1074

statement ok
DROP VIEW view_2_tab0_1074

statement ok
DROP VIEW view_3_tab0_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1074') DROP VIEW view_1_tab1_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1074') DROP VIEW view_2_tab1_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1074') DROP VIEW view_3_tab1_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1074

statement ok
CREATE VIEW view_1_tab1_1074 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))

statement ok
CREATE VIEW view_2_tab1_1074 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))

statement ok
CREATE VIEW view_3_tab1_1074 AS SELECT pk FROM view_1_tab1_1074

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_1074
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1074 UNION ALL SELECT pk, col0 FROM view_2_tab1_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1074 UNION SELECT pk, col0 FROM view_2_tab1_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) ) AS tab1_1074
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_1074
----

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

statement ok
DROP VIEW view_1_tab1_1074

statement ok
DROP VIEW view_2_tab1_1074

statement ok
DROP VIEW view_3_tab1_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1074') DROP VIEW view_1_tab2_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1074') DROP VIEW view_2_tab2_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1074') DROP VIEW view_3_tab2_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1074

statement ok
CREATE VIEW view_1_tab2_1074 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))

statement ok
CREATE VIEW view_2_tab2_1074 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))

statement ok
CREATE VIEW view_3_tab2_1074 AS SELECT pk FROM view_1_tab2_1074

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_1074
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1074 UNION ALL SELECT pk, col0 FROM view_2_tab2_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1074 UNION SELECT pk, col0 FROM view_2_tab2_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) ) AS tab2_1074
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_1074
----

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

statement ok
DROP VIEW view_1_tab2_1074

statement ok
DROP VIEW view_2_tab2_1074

statement ok
DROP VIEW view_3_tab2_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1074') DROP VIEW view_1_tab3_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1074') DROP VIEW view_2_tab3_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1074') DROP VIEW view_3_tab3_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1074

statement ok
CREATE VIEW view_1_tab3_1074 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))

statement ok
CREATE VIEW view_2_tab3_1074 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))

statement ok
CREATE VIEW view_3_tab3_1074 AS SELECT pk FROM view_1_tab3_1074

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_1074
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1074 UNION ALL SELECT pk, col0 FROM view_2_tab3_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1074 UNION SELECT pk, col0 FROM view_2_tab3_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) ) AS tab3_1074
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_1074
----

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

statement ok
DROP VIEW view_1_tab3_1074

statement ok
DROP VIEW view_2_tab3_1074

statement ok
DROP VIEW view_3_tab3_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1074') DROP VIEW view_1_tab4_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1074') DROP VIEW view_2_tab4_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1074') DROP VIEW view_3_tab4_1074

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1074

statement ok
CREATE VIEW view_1_tab4_1074 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))

statement ok
CREATE VIEW view_2_tab4_1074 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))

statement ok
CREATE VIEW view_3_tab4_1074 AS SELECT pk FROM view_1_tab4_1074

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_1074
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1074 UNION ALL SELECT pk, col0 FROM view_2_tab4_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1074 UNION SELECT pk, col0 FROM view_2_tab4_1074
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65)))))) ) AS tab4_1074
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_1074
----

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE col0 IS NULL AND ((col3 > 72)) AND (((((((col1 < 93.76)))))) OR (((col3 < 60)) OR col0 <= 79 OR col0 > 52 AND (col0 = 55 OR col3 < 35 AND ((col4 < 7.4)) AND col4 > 3.23 OR (col4 < 12.88) OR col1 = 57.74 AND col3 > 64 AND col3 > 41 OR col1 IS NULL AND (col3 BETWEEN 1 AND 98) AND (col3 >= 18) OR (col1 > 95.22) OR col3 IS NULL AND col4 > 8.41 OR col3 < 15 OR col4 >= 66.17 OR col0 < 86 AND (((col3 IN (0,12,82,91,56,80)))) AND col1 > 64.56 AND col0 < 53 AND col3 <= 84 AND ((col3 <= 18) OR col1 > 80.0)) OR ((col0 >= 96)) AND (col4 IS NULL) OR col3 > 73) AND col1 = 26.89 OR ((col3 > 30 OR (col3 >= 59)))) AND ((col3 >= 92) AND (((((col3 < 65))))))
----

statement ok
DROP VIEW view_1_tab4_1074

statement ok
DROP VIEW view_2_tab4_1074

statement ok
DROP VIEW view_3_tab4_1074

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1075') DROP VIEW view_1_tab0_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1075') DROP VIEW view_2_tab0_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1075') DROP VIEW view_3_tab0_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1075

statement ok
CREATE VIEW view_1_tab0_1075 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 71))

statement ok
CREATE VIEW view_2_tab0_1075 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 71)))

statement ok
CREATE VIEW view_3_tab0_1075 AS SELECT pk FROM view_1_tab0_1075

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 71))
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 71)))
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_1075
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_1075
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 71)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1075 UNION ALL SELECT pk, col0 FROM view_2_tab0_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 71)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1075 UNION SELECT pk, col0 FROM view_2_tab0_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 71)) ) AS tab0_1075
----
1
3
6

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_1075
----
1
3
6

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE ((col3 > 71))
----
1
3
6

statement ok
DROP VIEW view_1_tab0_1075

statement ok
DROP VIEW view_2_tab0_1075

statement ok
DROP VIEW view_3_tab0_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1075') DROP VIEW view_1_tab1_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1075') DROP VIEW view_2_tab1_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1075') DROP VIEW view_3_tab1_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1075

statement ok
CREATE VIEW view_1_tab1_1075 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 71))

statement ok
CREATE VIEW view_2_tab1_1075 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 71)))

statement ok
CREATE VIEW view_3_tab1_1075 AS SELECT pk FROM view_1_tab1_1075

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 71))
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 71)))
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_1075
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_1075
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 71)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1075 UNION ALL SELECT pk, col0 FROM view_2_tab1_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 71)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1075 UNION SELECT pk, col0 FROM view_2_tab1_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 71)) ) AS tab1_1075
----
1
3
6

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_1075
----
1
3
6

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE ((col3 > 71))
----
1
3
6

statement ok
DROP VIEW view_1_tab1_1075

statement ok
DROP VIEW view_2_tab1_1075

statement ok
DROP VIEW view_3_tab1_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1075') DROP VIEW view_1_tab2_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1075') DROP VIEW view_2_tab2_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1075') DROP VIEW view_3_tab2_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1075

statement ok
CREATE VIEW view_1_tab2_1075 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 71))

statement ok
CREATE VIEW view_2_tab2_1075 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 71)))

statement ok
CREATE VIEW view_3_tab2_1075 AS SELECT pk FROM view_1_tab2_1075

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 71))
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 71)))
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_1075
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_1075
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 71)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1075 UNION ALL SELECT pk, col0 FROM view_2_tab2_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 71)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1075 UNION SELECT pk, col0 FROM view_2_tab2_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 71)) ) AS tab2_1075
----
1
3
6

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_1075
----
1
3
6

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE ((col3 > 71))
----
1
3
6

statement ok
DROP VIEW view_1_tab2_1075

statement ok
DROP VIEW view_2_tab2_1075

statement ok
DROP VIEW view_3_tab2_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1075') DROP VIEW view_1_tab3_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1075') DROP VIEW view_2_tab3_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1075') DROP VIEW view_3_tab3_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1075

statement ok
CREATE VIEW view_1_tab3_1075 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 71))

statement ok
CREATE VIEW view_2_tab3_1075 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 71)))

statement ok
CREATE VIEW view_3_tab3_1075 AS SELECT pk FROM view_1_tab3_1075

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 71))
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 71)))
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_1075
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_1075
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 71)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1075 UNION ALL SELECT pk, col0 FROM view_2_tab3_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 71)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1075 UNION SELECT pk, col0 FROM view_2_tab3_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 71)) ) AS tab3_1075
----
1
3
6

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_1075
----
1
3
6

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE ((col3 > 71))
----
1
3
6

statement ok
DROP VIEW view_1_tab3_1075

statement ok
DROP VIEW view_2_tab3_1075

statement ok
DROP VIEW view_3_tab3_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1075') DROP VIEW view_1_tab4_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1075') DROP VIEW view_2_tab4_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1075') DROP VIEW view_3_tab4_1075

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1075

statement ok
CREATE VIEW view_1_tab4_1075 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 71))

statement ok
CREATE VIEW view_2_tab4_1075 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 71)))

statement ok
CREATE VIEW view_3_tab4_1075 AS SELECT pk FROM view_1_tab4_1075

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 71))
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 71)))
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_1075
----
1
57
3
5
6
36

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_1075
----
14 values hashing to dbf8f4b354909e52909dcf7aa8d5f498

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 71)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1075 UNION ALL SELECT pk, col0 FROM view_2_tab4_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 71)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 71)))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1075 UNION SELECT pk, col0 FROM view_2_tab4_1075
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 71)) ) AS tab4_1075
----
1
3
6

query I rowsort label-5900-3
SELECT * FROM view_3_tab4_1075
----
1
3
6

query I rowsort label-5900-3
SELECT pk FROM tab4 WHERE ((col3 > 71))
----
1
3
6

statement ok
DROP VIEW view_1_tab4_1075

statement ok
DROP VIEW view_2_tab4_1075

statement ok
DROP VIEW view_3_tab4_1075

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1076') DROP VIEW view_1_tab0_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1076') DROP VIEW view_2_tab0_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1076') DROP VIEW view_3_tab0_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1076

statement ok
CREATE VIEW view_1_tab0_1076 AS SELECT pk, col0 FROM tab0 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))

statement ok
CREATE VIEW view_2_tab0_1076 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))

statement ok
CREATE VIEW view_3_tab0_1076 AS SELECT pk FROM view_1_tab0_1076

query II rowsort label-6000-1
SELECT pk, col0 FROM tab0 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab0_1076
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab0_1076
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1076 UNION ALL SELECT pk, col0 FROM view_2_tab0_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1076 UNION SELECT pk, col0 FROM view_2_tab0_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) ) AS tab0_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab0_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT pk FROM tab0 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
1
2
3
6
9

statement ok
DROP VIEW view_1_tab0_1076

statement ok
DROP VIEW view_2_tab0_1076

statement ok
DROP VIEW view_3_tab0_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1076') DROP VIEW view_1_tab1_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1076') DROP VIEW view_2_tab1_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1076') DROP VIEW view_3_tab1_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1076

statement ok
CREATE VIEW view_1_tab1_1076 AS SELECT pk, col0 FROM tab1 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))

statement ok
CREATE VIEW view_2_tab1_1076 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))

statement ok
CREATE VIEW view_3_tab1_1076 AS SELECT pk FROM view_1_tab1_1076

query II rowsort label-6000-1
SELECT pk, col0 FROM tab1 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab1_1076
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab1_1076
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1076 UNION ALL SELECT pk, col0 FROM view_2_tab1_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1076 UNION SELECT pk, col0 FROM view_2_tab1_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) ) AS tab1_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab1_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT pk FROM tab1 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
1
2
3
6
9

statement ok
DROP VIEW view_1_tab1_1076

statement ok
DROP VIEW view_2_tab1_1076

statement ok
DROP VIEW view_3_tab1_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1076') DROP VIEW view_1_tab2_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1076') DROP VIEW view_2_tab2_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1076') DROP VIEW view_3_tab2_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1076

statement ok
CREATE VIEW view_1_tab2_1076 AS SELECT pk, col0 FROM tab2 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))

statement ok
CREATE VIEW view_2_tab2_1076 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))

statement ok
CREATE VIEW view_3_tab2_1076 AS SELECT pk FROM view_1_tab2_1076

query II rowsort label-6000-1
SELECT pk, col0 FROM tab2 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab2_1076
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab2_1076
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1076 UNION ALL SELECT pk, col0 FROM view_2_tab2_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1076 UNION SELECT pk, col0 FROM view_2_tab2_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) ) AS tab2_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab2_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT pk FROM tab2 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
1
2
3
6
9

statement ok
DROP VIEW view_1_tab2_1076

statement ok
DROP VIEW view_2_tab2_1076

statement ok
DROP VIEW view_3_tab2_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1076') DROP VIEW view_1_tab3_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1076') DROP VIEW view_2_tab3_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1076') DROP VIEW view_3_tab3_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1076

statement ok
CREATE VIEW view_1_tab3_1076 AS SELECT pk, col0 FROM tab3 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))

statement ok
CREATE VIEW view_2_tab3_1076 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))

statement ok
CREATE VIEW view_3_tab3_1076 AS SELECT pk FROM view_1_tab3_1076

query II rowsort label-6000-1
SELECT pk, col0 FROM tab3 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab3_1076
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab3_1076
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1076 UNION ALL SELECT pk, col0 FROM view_2_tab3_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1076 UNION SELECT pk, col0 FROM view_2_tab3_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) ) AS tab3_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab3_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT pk FROM tab3 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
1
2
3
6
9

statement ok
DROP VIEW view_1_tab3_1076

statement ok
DROP VIEW view_2_tab3_1076

statement ok
DROP VIEW view_3_tab3_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1076') DROP VIEW view_1_tab4_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1076') DROP VIEW view_2_tab4_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1076') DROP VIEW view_3_tab4_1076

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1076

statement ok
CREATE VIEW view_1_tab4_1076 AS SELECT pk, col0 FROM tab4 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))

statement ok
CREATE VIEW view_2_tab4_1076 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))

statement ok
CREATE VIEW view_3_tab4_1076 AS SELECT pk FROM view_1_tab4_1076

query II rowsort label-6000-1
SELECT pk, col0 FROM tab4 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab4_1076
----
10 values hashing to 2859752c3e228fabe3d13242d03d790b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab4_1076
----
10 values hashing to bfa0bc883c86b2db8eb306feb96cedd0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1076 UNION ALL SELECT pk, col0 FROM view_2_tab4_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1076 UNION SELECT pk, col0 FROM view_2_tab4_1076
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61)))))) ) AS tab4_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab4_1076
----
1
2
3
6
9

query I rowsort label-6000-3
SELECT pk FROM tab4 WHERE ((((col3 > 54 OR col0 = 44 AND (((col0 >= 49))) AND ((col1 > 61.61))))))
----
1
2
3
6
9

statement ok
DROP VIEW view_1_tab4_1076

statement ok
DROP VIEW view_2_tab4_1076

statement ok
DROP VIEW view_3_tab4_1076

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1077') DROP VIEW view_1_tab0_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1077') DROP VIEW view_2_tab0_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1077') DROP VIEW view_3_tab0_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1077

statement ok
CREATE VIEW view_1_tab0_1077 AS SELECT pk, col0 FROM tab0 WHERE col3 < 53

statement ok
CREATE VIEW view_2_tab0_1077 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 53)

statement ok
CREATE VIEW view_3_tab0_1077 AS SELECT pk FROM view_1_tab0_1077

query II rowsort label-6100-1
SELECT pk, col0 FROM tab0 WHERE col3 < 53
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 53)
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab0_1077
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab0_1077
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 53 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1077 UNION ALL SELECT pk, col0 FROM view_2_tab0_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 53 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1077 UNION SELECT pk, col0 FROM view_2_tab0_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 53 ) AS tab0_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT * FROM view_3_tab0_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT pk FROM tab0 WHERE col3 < 53
----
0
5
7
8

statement ok
DROP VIEW view_1_tab0_1077

statement ok
DROP VIEW view_2_tab0_1077

statement ok
DROP VIEW view_3_tab0_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1077') DROP VIEW view_1_tab1_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1077') DROP VIEW view_2_tab1_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1077') DROP VIEW view_3_tab1_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1077

statement ok
CREATE VIEW view_1_tab1_1077 AS SELECT pk, col0 FROM tab1 WHERE col3 < 53

statement ok
CREATE VIEW view_2_tab1_1077 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 53)

statement ok
CREATE VIEW view_3_tab1_1077 AS SELECT pk FROM view_1_tab1_1077

query II rowsort label-6100-1
SELECT pk, col0 FROM tab1 WHERE col3 < 53
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 53)
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab1_1077
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab1_1077
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 53 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1077 UNION ALL SELECT pk, col0 FROM view_2_tab1_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 53 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1077 UNION SELECT pk, col0 FROM view_2_tab1_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 53 ) AS tab1_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT * FROM view_3_tab1_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT pk FROM tab1 WHERE col3 < 53
----
0
5
7
8

statement ok
DROP VIEW view_1_tab1_1077

statement ok
DROP VIEW view_2_tab1_1077

statement ok
DROP VIEW view_3_tab1_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1077') DROP VIEW view_1_tab2_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1077') DROP VIEW view_2_tab2_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1077') DROP VIEW view_3_tab2_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1077

statement ok
CREATE VIEW view_1_tab2_1077 AS SELECT pk, col0 FROM tab2 WHERE col3 < 53

statement ok
CREATE VIEW view_2_tab2_1077 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 53)

statement ok
CREATE VIEW view_3_tab2_1077 AS SELECT pk FROM view_1_tab2_1077

query II rowsort label-6100-1
SELECT pk, col0 FROM tab2 WHERE col3 < 53
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 53)
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab2_1077
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab2_1077
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 53 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1077 UNION ALL SELECT pk, col0 FROM view_2_tab2_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 53 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1077 UNION SELECT pk, col0 FROM view_2_tab2_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 53 ) AS tab2_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT * FROM view_3_tab2_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT pk FROM tab2 WHERE col3 < 53
----
0
5
7
8

statement ok
DROP VIEW view_1_tab2_1077

statement ok
DROP VIEW view_2_tab2_1077

statement ok
DROP VIEW view_3_tab2_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1077') DROP VIEW view_1_tab3_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1077') DROP VIEW view_2_tab3_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1077') DROP VIEW view_3_tab3_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1077

statement ok
CREATE VIEW view_1_tab3_1077 AS SELECT pk, col0 FROM tab3 WHERE col3 < 53

statement ok
CREATE VIEW view_2_tab3_1077 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 53)

statement ok
CREATE VIEW view_3_tab3_1077 AS SELECT pk FROM view_1_tab3_1077

query II rowsort label-6100-1
SELECT pk, col0 FROM tab3 WHERE col3 < 53
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 53)
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab3_1077
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab3_1077
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 53 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1077 UNION ALL SELECT pk, col0 FROM view_2_tab3_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 53 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1077 UNION SELECT pk, col0 FROM view_2_tab3_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 53 ) AS tab3_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT * FROM view_3_tab3_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT pk FROM tab3 WHERE col3 < 53
----
0
5
7
8

statement ok
DROP VIEW view_1_tab3_1077

statement ok
DROP VIEW view_2_tab3_1077

statement ok
DROP VIEW view_3_tab3_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1077') DROP VIEW view_1_tab4_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1077') DROP VIEW view_2_tab4_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1077') DROP VIEW view_3_tab4_1077

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1077

statement ok
CREATE VIEW view_1_tab4_1077 AS SELECT pk, col0 FROM tab4 WHERE col3 < 53

statement ok
CREATE VIEW view_2_tab4_1077 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 53)

statement ok
CREATE VIEW view_3_tab4_1077 AS SELECT pk FROM view_1_tab4_1077

query II rowsort label-6100-1
SELECT pk, col0 FROM tab4 WHERE col3 < 53
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 53)
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab4_1077
----
0
71
5
97
7
9
8
14

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab4_1077
----
12 values hashing to 444c25fb5fb5b9ddf1c2ccd6f0bdeaa6

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 53 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1077 UNION ALL SELECT pk, col0 FROM view_2_tab4_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 53 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 53)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1077 UNION SELECT pk, col0 FROM view_2_tab4_1077
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 53 ) AS tab4_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT * FROM view_3_tab4_1077
----
0
5
7
8

query I rowsort label-6100-3
SELECT pk FROM tab4 WHERE col3 < 53
----
0
5
7
8

statement ok
DROP VIEW view_1_tab4_1077

statement ok
DROP VIEW view_2_tab4_1077

statement ok
DROP VIEW view_3_tab4_1077

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1078') DROP VIEW view_1_tab0_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1078') DROP VIEW view_2_tab0_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1078') DROP VIEW view_3_tab0_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1078

statement ok
CREATE VIEW view_1_tab0_1078 AS SELECT pk, col0 FROM tab0 WHERE ((col3 <= 22 OR col3 IN (27)))

statement ok
CREATE VIEW view_2_tab0_1078 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 22 OR col3 IN (27))))

statement ok
CREATE VIEW view_3_tab0_1078 AS SELECT pk FROM view_1_tab0_1078

query II rowsort label-6200-1
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab0_1078
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab0_1078
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 22 OR col3 IN (27))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1078 UNION ALL SELECT pk, col0 FROM view_2_tab0_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 22 OR col3 IN (27))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1078 UNION SELECT pk, col0 FROM view_2_tab0_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 <= 22 OR col3 IN (27))) ) AS tab0_1078
----
0
8

query I rowsort label-6200-3
SELECT * FROM view_3_tab0_1078
----
0
8

query I rowsort label-6200-3
SELECT pk FROM tab0 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
8

statement ok
DROP VIEW view_1_tab0_1078

statement ok
DROP VIEW view_2_tab0_1078

statement ok
DROP VIEW view_3_tab0_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1078') DROP VIEW view_1_tab1_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1078') DROP VIEW view_2_tab1_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1078') DROP VIEW view_3_tab1_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1078

statement ok
CREATE VIEW view_1_tab1_1078 AS SELECT pk, col0 FROM tab1 WHERE ((col3 <= 22 OR col3 IN (27)))

statement ok
CREATE VIEW view_2_tab1_1078 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 22 OR col3 IN (27))))

statement ok
CREATE VIEW view_3_tab1_1078 AS SELECT pk FROM view_1_tab1_1078

query II rowsort label-6200-1
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab1_1078
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab1_1078
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 22 OR col3 IN (27))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1078 UNION ALL SELECT pk, col0 FROM view_2_tab1_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 22 OR col3 IN (27))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1078 UNION SELECT pk, col0 FROM view_2_tab1_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 <= 22 OR col3 IN (27))) ) AS tab1_1078
----
0
8

query I rowsort label-6200-3
SELECT * FROM view_3_tab1_1078
----
0
8

query I rowsort label-6200-3
SELECT pk FROM tab1 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
8

statement ok
DROP VIEW view_1_tab1_1078

statement ok
DROP VIEW view_2_tab1_1078

statement ok
DROP VIEW view_3_tab1_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1078') DROP VIEW view_1_tab2_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1078') DROP VIEW view_2_tab2_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1078') DROP VIEW view_3_tab2_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1078

statement ok
CREATE VIEW view_1_tab2_1078 AS SELECT pk, col0 FROM tab2 WHERE ((col3 <= 22 OR col3 IN (27)))

statement ok
CREATE VIEW view_2_tab2_1078 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 22 OR col3 IN (27))))

statement ok
CREATE VIEW view_3_tab2_1078 AS SELECT pk FROM view_1_tab2_1078

query II rowsort label-6200-1
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab2_1078
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab2_1078
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 22 OR col3 IN (27))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1078 UNION ALL SELECT pk, col0 FROM view_2_tab2_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 22 OR col3 IN (27))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1078 UNION SELECT pk, col0 FROM view_2_tab2_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 <= 22 OR col3 IN (27))) ) AS tab2_1078
----
0
8

query I rowsort label-6200-3
SELECT * FROM view_3_tab2_1078
----
0
8

query I rowsort label-6200-3
SELECT pk FROM tab2 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
8

statement ok
DROP VIEW view_1_tab2_1078

statement ok
DROP VIEW view_2_tab2_1078

statement ok
DROP VIEW view_3_tab2_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1078') DROP VIEW view_1_tab3_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1078') DROP VIEW view_2_tab3_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1078') DROP VIEW view_3_tab3_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1078

statement ok
CREATE VIEW view_1_tab3_1078 AS SELECT pk, col0 FROM tab3 WHERE ((col3 <= 22 OR col3 IN (27)))

statement ok
CREATE VIEW view_2_tab3_1078 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 22 OR col3 IN (27))))

statement ok
CREATE VIEW view_3_tab3_1078 AS SELECT pk FROM view_1_tab3_1078

query II rowsort label-6200-1
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab3_1078
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab3_1078
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 22 OR col3 IN (27))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1078 UNION ALL SELECT pk, col0 FROM view_2_tab3_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 22 OR col3 IN (27))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1078 UNION SELECT pk, col0 FROM view_2_tab3_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 <= 22 OR col3 IN (27))) ) AS tab3_1078
----
0
8

query I rowsort label-6200-3
SELECT * FROM view_3_tab3_1078
----
0
8

query I rowsort label-6200-3
SELECT pk FROM tab3 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
8

statement ok
DROP VIEW view_1_tab3_1078

statement ok
DROP VIEW view_2_tab3_1078

statement ok
DROP VIEW view_3_tab3_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1078') DROP VIEW view_1_tab4_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1078') DROP VIEW view_2_tab4_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1078') DROP VIEW view_3_tab4_1078

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1078

statement ok
CREATE VIEW view_1_tab4_1078 AS SELECT pk, col0 FROM tab4 WHERE ((col3 <= 22 OR col3 IN (27)))

statement ok
CREATE VIEW view_2_tab4_1078 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 22 OR col3 IN (27))))

statement ok
CREATE VIEW view_3_tab4_1078 AS SELECT pk FROM view_1_tab4_1078

query II rowsort label-6200-1
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab4_1078
----
0
71
8
14

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab4_1078
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 22 OR col3 IN (27))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1078 UNION ALL SELECT pk, col0 FROM view_2_tab4_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 22 OR col3 IN (27))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 22 OR col3 IN (27))))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1078 UNION SELECT pk, col0 FROM view_2_tab4_1078
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 <= 22 OR col3 IN (27))) ) AS tab4_1078
----
0
8

query I rowsort label-6200-3
SELECT * FROM view_3_tab4_1078
----
0
8

query I rowsort label-6200-3
SELECT pk FROM tab4 WHERE ((col3 <= 22 OR col3 IN (27)))
----
0
8

statement ok
DROP VIEW view_1_tab4_1078

statement ok
DROP VIEW view_2_tab4_1078

statement ok
DROP VIEW view_3_tab4_1078

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1079') DROP VIEW view_1_tab0_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1079') DROP VIEW view_2_tab0_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1079') DROP VIEW view_3_tab0_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1079

statement ok
CREATE VIEW view_1_tab0_1079 AS SELECT pk, col0 FROM tab0 WHERE (col1 >= 68.67)

statement ok
CREATE VIEW view_2_tab0_1079 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 68.67))

statement ok
CREATE VIEW view_3_tab0_1079 AS SELECT pk FROM view_1_tab0_1079

query II rowsort label-6300-1
SELECT pk, col0 FROM tab0 WHERE (col1 >= 68.67)
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 68.67))
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab0_1079
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab0_1079
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 68.67) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1079 UNION ALL SELECT pk, col0 FROM view_2_tab0_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 68.67) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1079 UNION SELECT pk, col0 FROM view_2_tab0_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 >= 68.67) ) AS tab0_1079
----
0
3
5

query I rowsort label-6300-3
SELECT * FROM view_3_tab0_1079
----
0
3
5

query I rowsort label-6300-3
SELECT pk FROM tab0 WHERE (col1 >= 68.67)
----
0
3
5

statement ok
DROP VIEW view_1_tab0_1079

statement ok
DROP VIEW view_2_tab0_1079

statement ok
DROP VIEW view_3_tab0_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1079') DROP VIEW view_1_tab1_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1079') DROP VIEW view_2_tab1_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1079') DROP VIEW view_3_tab1_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1079

statement ok
CREATE VIEW view_1_tab1_1079 AS SELECT pk, col0 FROM tab1 WHERE (col1 >= 68.67)

statement ok
CREATE VIEW view_2_tab1_1079 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 68.67))

statement ok
CREATE VIEW view_3_tab1_1079 AS SELECT pk FROM view_1_tab1_1079

query II rowsort label-6300-1
SELECT pk, col0 FROM tab1 WHERE (col1 >= 68.67)
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 68.67))
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab1_1079
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab1_1079
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 68.67) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1079 UNION ALL SELECT pk, col0 FROM view_2_tab1_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 68.67) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1079 UNION SELECT pk, col0 FROM view_2_tab1_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 >= 68.67) ) AS tab1_1079
----
0
3
5

query I rowsort label-6300-3
SELECT * FROM view_3_tab1_1079
----
0
3
5

query I rowsort label-6300-3
SELECT pk FROM tab1 WHERE (col1 >= 68.67)
----
0
3
5

statement ok
DROP VIEW view_1_tab1_1079

statement ok
DROP VIEW view_2_tab1_1079

statement ok
DROP VIEW view_3_tab1_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1079') DROP VIEW view_1_tab2_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1079') DROP VIEW view_2_tab2_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1079') DROP VIEW view_3_tab2_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1079

statement ok
CREATE VIEW view_1_tab2_1079 AS SELECT pk, col0 FROM tab2 WHERE (col1 >= 68.67)

statement ok
CREATE VIEW view_2_tab2_1079 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 68.67))

statement ok
CREATE VIEW view_3_tab2_1079 AS SELECT pk FROM view_1_tab2_1079

query II rowsort label-6300-1
SELECT pk, col0 FROM tab2 WHERE (col1 >= 68.67)
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 68.67))
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab2_1079
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab2_1079
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 68.67) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1079 UNION ALL SELECT pk, col0 FROM view_2_tab2_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 68.67) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1079 UNION SELECT pk, col0 FROM view_2_tab2_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 >= 68.67) ) AS tab2_1079
----
0
3
5

query I rowsort label-6300-3
SELECT * FROM view_3_tab2_1079
----
0
3
5

query I rowsort label-6300-3
SELECT pk FROM tab2 WHERE (col1 >= 68.67)
----
0
3
5

statement ok
DROP VIEW view_1_tab2_1079

statement ok
DROP VIEW view_2_tab2_1079

statement ok
DROP VIEW view_3_tab2_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1079') DROP VIEW view_1_tab3_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1079') DROP VIEW view_2_tab3_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1079') DROP VIEW view_3_tab3_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1079

statement ok
CREATE VIEW view_1_tab3_1079 AS SELECT pk, col0 FROM tab3 WHERE (col1 >= 68.67)

statement ok
CREATE VIEW view_2_tab3_1079 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 68.67))

statement ok
CREATE VIEW view_3_tab3_1079 AS SELECT pk FROM view_1_tab3_1079

query II rowsort label-6300-1
SELECT pk, col0 FROM tab3 WHERE (col1 >= 68.67)
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 68.67))
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab3_1079
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab3_1079
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 68.67) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1079 UNION ALL SELECT pk, col0 FROM view_2_tab3_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 68.67) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1079 UNION SELECT pk, col0 FROM view_2_tab3_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 >= 68.67) ) AS tab3_1079
----
0
3
5

query I rowsort label-6300-3
SELECT * FROM view_3_tab3_1079
----
0
3
5

query I rowsort label-6300-3
SELECT pk FROM tab3 WHERE (col1 >= 68.67)
----
0
3
5

statement ok
DROP VIEW view_1_tab3_1079

statement ok
DROP VIEW view_2_tab3_1079

statement ok
DROP VIEW view_3_tab3_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1079') DROP VIEW view_1_tab4_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1079') DROP VIEW view_2_tab4_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1079') DROP VIEW view_3_tab4_1079

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1079

statement ok
CREATE VIEW view_1_tab4_1079 AS SELECT pk, col0 FROM tab4 WHERE (col1 >= 68.67)

statement ok
CREATE VIEW view_2_tab4_1079 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 68.67))

statement ok
CREATE VIEW view_3_tab4_1079 AS SELECT pk FROM view_1_tab4_1079

query II rowsort label-6300-1
SELECT pk, col0 FROM tab4 WHERE (col1 >= 68.67)
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 68.67))
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab4_1079
----
0
71
3
5
5
97

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab4_1079
----
14 values hashing to afe3abbb85d7317a4d32fefea6950fa6

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 68.67) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1079 UNION ALL SELECT pk, col0 FROM view_2_tab4_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 68.67) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 68.67))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1079 UNION SELECT pk, col0 FROM view_2_tab4_1079
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 >= 68.67) ) AS tab4_1079
----
0
3
5

query I rowsort label-6300-3
SELECT * FROM view_3_tab4_1079
----
0
3
5

query I rowsort label-6300-3
SELECT pk FROM tab4 WHERE (col1 >= 68.67)
----
0
3
5

statement ok
DROP VIEW view_1_tab4_1079

statement ok
DROP VIEW view_2_tab4_1079

statement ok
DROP VIEW view_3_tab4_1079

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1080') DROP VIEW view_1_tab0_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1080') DROP VIEW view_2_tab0_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1080') DROP VIEW view_3_tab0_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1080

statement ok
CREATE VIEW view_1_tab0_1080 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 24

statement ok
CREATE VIEW view_2_tab0_1080 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 24)

statement ok
CREATE VIEW view_3_tab0_1080 AS SELECT pk FROM view_1_tab0_1080

query II rowsort label-6400-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 24
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 24)
----
0
71
8
14

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab0_1080
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab0_1080
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 24 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1080 UNION ALL SELECT pk, col0 FROM view_2_tab0_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 24 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1080 UNION SELECT pk, col0 FROM view_2_tab0_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 24 ) AS tab0_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT * FROM view_3_tab0_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT pk FROM tab0 WHERE col3 >= 24
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab0_1080

statement ok
DROP VIEW view_2_tab0_1080

statement ok
DROP VIEW view_3_tab0_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1080') DROP VIEW view_1_tab1_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1080') DROP VIEW view_2_tab1_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1080') DROP VIEW view_3_tab1_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1080

statement ok
CREATE VIEW view_1_tab1_1080 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 24

statement ok
CREATE VIEW view_2_tab1_1080 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 24)

statement ok
CREATE VIEW view_3_tab1_1080 AS SELECT pk FROM view_1_tab1_1080

query II rowsort label-6400-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 24
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 24)
----
0
71
8
14

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab1_1080
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab1_1080
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 24 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1080 UNION ALL SELECT pk, col0 FROM view_2_tab1_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 24 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1080 UNION SELECT pk, col0 FROM view_2_tab1_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 24 ) AS tab1_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT * FROM view_3_tab1_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT pk FROM tab1 WHERE col3 >= 24
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab1_1080

statement ok
DROP VIEW view_2_tab1_1080

statement ok
DROP VIEW view_3_tab1_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1080') DROP VIEW view_1_tab2_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1080') DROP VIEW view_2_tab2_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1080') DROP VIEW view_3_tab2_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1080

statement ok
CREATE VIEW view_1_tab2_1080 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 24

statement ok
CREATE VIEW view_2_tab2_1080 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 24)

statement ok
CREATE VIEW view_3_tab2_1080 AS SELECT pk FROM view_1_tab2_1080

query II rowsort label-6400-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 24
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 24)
----
0
71
8
14

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab2_1080
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab2_1080
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 24 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1080 UNION ALL SELECT pk, col0 FROM view_2_tab2_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 24 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1080 UNION SELECT pk, col0 FROM view_2_tab2_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 24 ) AS tab2_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT * FROM view_3_tab2_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT pk FROM tab2 WHERE col3 >= 24
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab2_1080

statement ok
DROP VIEW view_2_tab2_1080

statement ok
DROP VIEW view_3_tab2_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1080') DROP VIEW view_1_tab3_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1080') DROP VIEW view_2_tab3_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1080') DROP VIEW view_3_tab3_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1080

statement ok
CREATE VIEW view_1_tab3_1080 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 24

statement ok
CREATE VIEW view_2_tab3_1080 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 24)

statement ok
CREATE VIEW view_3_tab3_1080 AS SELECT pk FROM view_1_tab3_1080

query II rowsort label-6400-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 24
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 24)
----
0
71
8
14

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab3_1080
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab3_1080
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 24 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1080 UNION ALL SELECT pk, col0 FROM view_2_tab3_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 24 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1080 UNION SELECT pk, col0 FROM view_2_tab3_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 24 ) AS tab3_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT * FROM view_3_tab3_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT pk FROM tab3 WHERE col3 >= 24
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab3_1080

statement ok
DROP VIEW view_2_tab3_1080

statement ok
DROP VIEW view_3_tab3_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1080') DROP VIEW view_1_tab4_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1080') DROP VIEW view_2_tab4_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1080') DROP VIEW view_3_tab4_1080

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1080

statement ok
CREATE VIEW view_1_tab4_1080 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 24

statement ok
CREATE VIEW view_2_tab4_1080 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 24)

statement ok
CREATE VIEW view_3_tab4_1080 AS SELECT pk FROM view_1_tab4_1080

query II rowsort label-6400-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 24
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 24)
----
0
71
8
14

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab4_1080
----
16 values hashing to c1dab5b3e8d7ef8857d58bcb3132adb6

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab4_1080
----
0
71
8
14

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 24 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1080 UNION ALL SELECT pk, col0 FROM view_2_tab4_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 24 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 24)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1080 UNION SELECT pk, col0 FROM view_2_tab4_1080
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 24 ) AS tab4_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT * FROM view_3_tab4_1080
----
1
2
3
4
5
6
7
9

query I rowsort label-6400-3
SELECT pk FROM tab4 WHERE col3 >= 24
----
1
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab4_1080

statement ok
DROP VIEW view_2_tab4_1080

statement ok
DROP VIEW view_3_tab4_1080

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1081') DROP VIEW view_1_tab0_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1081') DROP VIEW view_2_tab0_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1081') DROP VIEW view_3_tab0_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1081

statement ok
CREATE VIEW view_1_tab0_1081 AS SELECT pk, col0 FROM tab0 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55

statement ok
CREATE VIEW view_2_tab0_1081 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)

statement ok
CREATE VIEW view_3_tab0_1081 AS SELECT pk FROM view_1_tab0_1081

query II rowsort label-6500-1
SELECT pk, col0 FROM tab0 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab0_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab0_1081
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1081 UNION ALL SELECT pk, col0 FROM view_2_tab0_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1081 UNION SELECT pk, col0 FROM view_2_tab0_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 ) AS tab0_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT * FROM view_3_tab0_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT pk FROM tab0 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1081

statement ok
DROP VIEW view_2_tab0_1081

statement ok
DROP VIEW view_3_tab0_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1081') DROP VIEW view_1_tab1_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1081') DROP VIEW view_2_tab1_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1081') DROP VIEW view_3_tab1_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1081

statement ok
CREATE VIEW view_1_tab1_1081 AS SELECT pk, col0 FROM tab1 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55

statement ok
CREATE VIEW view_2_tab1_1081 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)

statement ok
CREATE VIEW view_3_tab1_1081 AS SELECT pk FROM view_1_tab1_1081

query II rowsort label-6500-1
SELECT pk, col0 FROM tab1 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab1_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab1_1081
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1081 UNION ALL SELECT pk, col0 FROM view_2_tab1_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1081 UNION SELECT pk, col0 FROM view_2_tab1_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 ) AS tab1_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT * FROM view_3_tab1_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT pk FROM tab1 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1081

statement ok
DROP VIEW view_2_tab1_1081

statement ok
DROP VIEW view_3_tab1_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1081') DROP VIEW view_1_tab2_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1081') DROP VIEW view_2_tab2_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1081') DROP VIEW view_3_tab2_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1081

statement ok
CREATE VIEW view_1_tab2_1081 AS SELECT pk, col0 FROM tab2 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55

statement ok
CREATE VIEW view_2_tab2_1081 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)

statement ok
CREATE VIEW view_3_tab2_1081 AS SELECT pk FROM view_1_tab2_1081

query II rowsort label-6500-1
SELECT pk, col0 FROM tab2 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab2_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab2_1081
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1081 UNION ALL SELECT pk, col0 FROM view_2_tab2_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1081 UNION SELECT pk, col0 FROM view_2_tab2_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 ) AS tab2_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT * FROM view_3_tab2_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT pk FROM tab2 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1081

statement ok
DROP VIEW view_2_tab2_1081

statement ok
DROP VIEW view_3_tab2_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1081') DROP VIEW view_1_tab3_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1081') DROP VIEW view_2_tab3_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1081') DROP VIEW view_3_tab3_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1081

statement ok
CREATE VIEW view_1_tab3_1081 AS SELECT pk, col0 FROM tab3 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55

statement ok
CREATE VIEW view_2_tab3_1081 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)

statement ok
CREATE VIEW view_3_tab3_1081 AS SELECT pk FROM view_1_tab3_1081

query II rowsort label-6500-1
SELECT pk, col0 FROM tab3 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab3_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab3_1081
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1081 UNION ALL SELECT pk, col0 FROM view_2_tab3_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1081 UNION SELECT pk, col0 FROM view_2_tab3_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 ) AS tab3_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT * FROM view_3_tab3_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT pk FROM tab3 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1081

statement ok
DROP VIEW view_2_tab3_1081

statement ok
DROP VIEW view_3_tab3_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1081') DROP VIEW view_1_tab4_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1081') DROP VIEW view_2_tab4_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1081') DROP VIEW view_3_tab4_1081

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1081

statement ok
CREATE VIEW view_1_tab4_1081 AS SELECT pk, col0 FROM tab4 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55

statement ok
CREATE VIEW view_2_tab4_1081 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)

statement ok
CREATE VIEW view_3_tab4_1081 AS SELECT pk FROM view_1_tab4_1081

query II rowsort label-6500-1
SELECT pk, col0 FROM tab4 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab4_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab4_1081
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1081 UNION ALL SELECT pk, col0 FROM view_2_tab4_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 48 OR col3 <= 29 OR col0 >= 55)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1081 UNION SELECT pk, col0 FROM view_2_tab4_1081
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55 ) AS tab4_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT * FROM view_3_tab4_1081
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6500-3
SELECT pk FROM tab4 WHERE col3 > 48 OR col3 <= 29 OR col0 >= 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1081

statement ok
DROP VIEW view_2_tab4_1081

statement ok
DROP VIEW view_3_tab4_1081

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1082') DROP VIEW view_1_tab0_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1082') DROP VIEW view_2_tab0_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1082') DROP VIEW view_3_tab0_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1082

statement ok
CREATE VIEW view_1_tab0_1082 AS SELECT pk, col0 FROM tab0 WHERE (col3 = 24)

statement ok
CREATE VIEW view_2_tab0_1082 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 24))

statement ok
CREATE VIEW view_3_tab0_1082 AS SELECT pk FROM view_1_tab0_1082

query II rowsort label-6600-1
SELECT pk, col0 FROM tab0 WHERE (col3 = 24)
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab0_1082
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab0_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 24) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1082 UNION ALL SELECT pk, col0 FROM view_2_tab0_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 24) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1082 UNION SELECT pk, col0 FROM view_2_tab0_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 = 24) ) AS tab0_1082
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab0_1082
----

query I rowsort label-6600-3
SELECT pk FROM tab0 WHERE (col3 = 24)
----

statement ok
DROP VIEW view_1_tab0_1082

statement ok
DROP VIEW view_2_tab0_1082

statement ok
DROP VIEW view_3_tab0_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1082') DROP VIEW view_1_tab1_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1082') DROP VIEW view_2_tab1_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1082') DROP VIEW view_3_tab1_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1082

statement ok
CREATE VIEW view_1_tab1_1082 AS SELECT pk, col0 FROM tab1 WHERE (col3 = 24)

statement ok
CREATE VIEW view_2_tab1_1082 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 24))

statement ok
CREATE VIEW view_3_tab1_1082 AS SELECT pk FROM view_1_tab1_1082

query II rowsort label-6600-1
SELECT pk, col0 FROM tab1 WHERE (col3 = 24)
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab1_1082
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab1_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 24) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1082 UNION ALL SELECT pk, col0 FROM view_2_tab1_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 24) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1082 UNION SELECT pk, col0 FROM view_2_tab1_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 = 24) ) AS tab1_1082
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab1_1082
----

query I rowsort label-6600-3
SELECT pk FROM tab1 WHERE (col3 = 24)
----

statement ok
DROP VIEW view_1_tab1_1082

statement ok
DROP VIEW view_2_tab1_1082

statement ok
DROP VIEW view_3_tab1_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1082') DROP VIEW view_1_tab2_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1082') DROP VIEW view_2_tab2_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1082') DROP VIEW view_3_tab2_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1082

statement ok
CREATE VIEW view_1_tab2_1082 AS SELECT pk, col0 FROM tab2 WHERE (col3 = 24)

statement ok
CREATE VIEW view_2_tab2_1082 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 24))

statement ok
CREATE VIEW view_3_tab2_1082 AS SELECT pk FROM view_1_tab2_1082

query II rowsort label-6600-1
SELECT pk, col0 FROM tab2 WHERE (col3 = 24)
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab2_1082
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab2_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 24) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1082 UNION ALL SELECT pk, col0 FROM view_2_tab2_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 24) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1082 UNION SELECT pk, col0 FROM view_2_tab2_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 = 24) ) AS tab2_1082
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab2_1082
----

query I rowsort label-6600-3
SELECT pk FROM tab2 WHERE (col3 = 24)
----

statement ok
DROP VIEW view_1_tab2_1082

statement ok
DROP VIEW view_2_tab2_1082

statement ok
DROP VIEW view_3_tab2_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1082') DROP VIEW view_1_tab3_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1082') DROP VIEW view_2_tab3_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1082') DROP VIEW view_3_tab3_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1082

statement ok
CREATE VIEW view_1_tab3_1082 AS SELECT pk, col0 FROM tab3 WHERE (col3 = 24)

statement ok
CREATE VIEW view_2_tab3_1082 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 24))

statement ok
CREATE VIEW view_3_tab3_1082 AS SELECT pk FROM view_1_tab3_1082

query II rowsort label-6600-1
SELECT pk, col0 FROM tab3 WHERE (col3 = 24)
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab3_1082
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab3_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 24) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1082 UNION ALL SELECT pk, col0 FROM view_2_tab3_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 24) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1082 UNION SELECT pk, col0 FROM view_2_tab3_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 = 24) ) AS tab3_1082
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab3_1082
----

query I rowsort label-6600-3
SELECT pk FROM tab3 WHERE (col3 = 24)
----

statement ok
DROP VIEW view_1_tab3_1082

statement ok
DROP VIEW view_2_tab3_1082

statement ok
DROP VIEW view_3_tab3_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1082') DROP VIEW view_1_tab4_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1082') DROP VIEW view_2_tab4_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1082') DROP VIEW view_3_tab4_1082

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1082

statement ok
CREATE VIEW view_1_tab4_1082 AS SELECT pk, col0 FROM tab4 WHERE (col3 = 24)

statement ok
CREATE VIEW view_2_tab4_1082 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 24))

statement ok
CREATE VIEW view_3_tab4_1082 AS SELECT pk FROM view_1_tab4_1082

query II rowsort label-6600-1
SELECT pk, col0 FROM tab4 WHERE (col3 = 24)
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab4_1082
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab4_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 24) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1082 UNION ALL SELECT pk, col0 FROM view_2_tab4_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 24) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 24))
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1082 UNION SELECT pk, col0 FROM view_2_tab4_1082
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 = 24) ) AS tab4_1082
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab4_1082
----

query I rowsort label-6600-3
SELECT pk FROM tab4 WHERE (col3 = 24)
----

statement ok
DROP VIEW view_1_tab4_1082

statement ok
DROP VIEW view_2_tab4_1082

statement ok
DROP VIEW view_3_tab4_1082

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1083') DROP VIEW view_1_tab0_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1083') DROP VIEW view_2_tab0_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1083') DROP VIEW view_3_tab0_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1083

statement ok
CREATE VIEW view_1_tab0_1083 AS SELECT pk, col0 FROM tab0 WHERE col4 > 27.68 OR col1 >= 59.78

statement ok
CREATE VIEW view_2_tab0_1083 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)

statement ok
CREATE VIEW view_3_tab0_1083 AS SELECT pk FROM view_1_tab0_1083

query II rowsort label-6700-1
SELECT pk, col0 FROM tab0 WHERE col4 > 27.68 OR col1 >= 59.78
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
6
36
7
9
8
14
9
56

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab0_1083
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab0_1083
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 27.68 OR col1 >= 59.78 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1083 UNION ALL SELECT pk, col0 FROM view_2_tab0_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 27.68 OR col1 >= 59.78 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1083 UNION SELECT pk, col0 FROM view_2_tab0_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 27.68 OR col1 >= 59.78 ) AS tab0_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT * FROM view_3_tab0_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT pk FROM tab0 WHERE col4 > 27.68 OR col1 >= 59.78
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab0_1083

statement ok
DROP VIEW view_2_tab0_1083

statement ok
DROP VIEW view_3_tab0_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1083') DROP VIEW view_1_tab1_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1083') DROP VIEW view_2_tab1_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1083') DROP VIEW view_3_tab1_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1083

statement ok
CREATE VIEW view_1_tab1_1083 AS SELECT pk, col0 FROM tab1 WHERE col4 > 27.68 OR col1 >= 59.78

statement ok
CREATE VIEW view_2_tab1_1083 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)

statement ok
CREATE VIEW view_3_tab1_1083 AS SELECT pk FROM view_1_tab1_1083

query II rowsort label-6700-1
SELECT pk, col0 FROM tab1 WHERE col4 > 27.68 OR col1 >= 59.78
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
6
36
7
9
8
14
9
56

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab1_1083
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab1_1083
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 27.68 OR col1 >= 59.78 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1083 UNION ALL SELECT pk, col0 FROM view_2_tab1_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 27.68 OR col1 >= 59.78 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1083 UNION SELECT pk, col0 FROM view_2_tab1_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 27.68 OR col1 >= 59.78 ) AS tab1_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT * FROM view_3_tab1_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT pk FROM tab1 WHERE col4 > 27.68 OR col1 >= 59.78
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab1_1083

statement ok
DROP VIEW view_2_tab1_1083

statement ok
DROP VIEW view_3_tab1_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1083') DROP VIEW view_1_tab2_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1083') DROP VIEW view_2_tab2_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1083') DROP VIEW view_3_tab2_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1083

statement ok
CREATE VIEW view_1_tab2_1083 AS SELECT pk, col0 FROM tab2 WHERE col4 > 27.68 OR col1 >= 59.78

statement ok
CREATE VIEW view_2_tab2_1083 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)

statement ok
CREATE VIEW view_3_tab2_1083 AS SELECT pk FROM view_1_tab2_1083

query II rowsort label-6700-1
SELECT pk, col0 FROM tab2 WHERE col4 > 27.68 OR col1 >= 59.78
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
6
36
7
9
8
14
9
56

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab2_1083
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab2_1083
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 27.68 OR col1 >= 59.78 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1083 UNION ALL SELECT pk, col0 FROM view_2_tab2_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 27.68 OR col1 >= 59.78 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1083 UNION SELECT pk, col0 FROM view_2_tab2_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 27.68 OR col1 >= 59.78 ) AS tab2_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT * FROM view_3_tab2_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT pk FROM tab2 WHERE col4 > 27.68 OR col1 >= 59.78
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab2_1083

statement ok
DROP VIEW view_2_tab2_1083

statement ok
DROP VIEW view_3_tab2_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1083') DROP VIEW view_1_tab3_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1083') DROP VIEW view_2_tab3_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1083') DROP VIEW view_3_tab3_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1083

statement ok
CREATE VIEW view_1_tab3_1083 AS SELECT pk, col0 FROM tab3 WHERE col4 > 27.68 OR col1 >= 59.78

statement ok
CREATE VIEW view_2_tab3_1083 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)

statement ok
CREATE VIEW view_3_tab3_1083 AS SELECT pk FROM view_1_tab3_1083

query II rowsort label-6700-1
SELECT pk, col0 FROM tab3 WHERE col4 > 27.68 OR col1 >= 59.78
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
6
36
7
9
8
14
9
56

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab3_1083
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab3_1083
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 27.68 OR col1 >= 59.78 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1083 UNION ALL SELECT pk, col0 FROM view_2_tab3_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 27.68 OR col1 >= 59.78 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1083 UNION SELECT pk, col0 FROM view_2_tab3_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 27.68 OR col1 >= 59.78 ) AS tab3_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT * FROM view_3_tab3_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT pk FROM tab3 WHERE col4 > 27.68 OR col1 >= 59.78
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab3_1083

statement ok
DROP VIEW view_2_tab3_1083

statement ok
DROP VIEW view_3_tab3_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1083') DROP VIEW view_1_tab4_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1083') DROP VIEW view_2_tab4_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1083') DROP VIEW view_3_tab4_1083

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1083

statement ok
CREATE VIEW view_1_tab4_1083 AS SELECT pk, col0 FROM tab4 WHERE col4 > 27.68 OR col1 >= 59.78

statement ok
CREATE VIEW view_2_tab4_1083 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)

statement ok
CREATE VIEW view_3_tab4_1083 AS SELECT pk FROM view_1_tab4_1083

query II rowsort label-6700-1
SELECT pk, col0 FROM tab4 WHERE col4 > 27.68 OR col1 >= 59.78
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
6
36
7
9
8
14
9
56

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab4_1083
----
12 values hashing to 535e3ed575f0949d4937008cb4301450

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab4_1083
----
6
36
7
9
8
14
9
56

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 27.68 OR col1 >= 59.78 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1083 UNION ALL SELECT pk, col0 FROM view_2_tab4_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 27.68 OR col1 >= 59.78 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 27.68 OR col1 >= 59.78)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1083 UNION SELECT pk, col0 FROM view_2_tab4_1083
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 27.68 OR col1 >= 59.78 ) AS tab4_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT * FROM view_3_tab4_1083
----
0
1
2
3
4
5

query I rowsort label-6700-3
SELECT pk FROM tab4 WHERE col4 > 27.68 OR col1 >= 59.78
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab4_1083

statement ok
DROP VIEW view_2_tab4_1083

statement ok
DROP VIEW view_3_tab4_1083

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1084') DROP VIEW view_1_tab0_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1084') DROP VIEW view_2_tab0_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1084') DROP VIEW view_3_tab0_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1084

statement ok
CREATE VIEW view_1_tab0_1084 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 89

statement ok
CREATE VIEW view_2_tab0_1084 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 89)

statement ok
CREATE VIEW view_3_tab0_1084 AS SELECT pk FROM view_1_tab0_1084

query II rowsort label-6800-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 89
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab0_1084
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab0_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 89 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1084 UNION ALL SELECT pk, col0 FROM view_2_tab0_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 89 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1084 UNION SELECT pk, col0 FROM view_2_tab0_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 89 ) AS tab0_1084
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab0_1084
----

query I rowsort label-6800-3
SELECT pk FROM tab0 WHERE col3 >= 89
----

statement ok
DROP VIEW view_1_tab0_1084

statement ok
DROP VIEW view_2_tab0_1084

statement ok
DROP VIEW view_3_tab0_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1084') DROP VIEW view_1_tab1_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1084') DROP VIEW view_2_tab1_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1084') DROP VIEW view_3_tab1_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1084

statement ok
CREATE VIEW view_1_tab1_1084 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 89

statement ok
CREATE VIEW view_2_tab1_1084 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 89)

statement ok
CREATE VIEW view_3_tab1_1084 AS SELECT pk FROM view_1_tab1_1084

query II rowsort label-6800-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 89
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab1_1084
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab1_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 89 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1084 UNION ALL SELECT pk, col0 FROM view_2_tab1_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 89 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1084 UNION SELECT pk, col0 FROM view_2_tab1_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 89 ) AS tab1_1084
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab1_1084
----

query I rowsort label-6800-3
SELECT pk FROM tab1 WHERE col3 >= 89
----

statement ok
DROP VIEW view_1_tab1_1084

statement ok
DROP VIEW view_2_tab1_1084

statement ok
DROP VIEW view_3_tab1_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1084') DROP VIEW view_1_tab2_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1084') DROP VIEW view_2_tab2_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1084') DROP VIEW view_3_tab2_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1084

statement ok
CREATE VIEW view_1_tab2_1084 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 89

statement ok
CREATE VIEW view_2_tab2_1084 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 89)

statement ok
CREATE VIEW view_3_tab2_1084 AS SELECT pk FROM view_1_tab2_1084

query II rowsort label-6800-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 89
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab2_1084
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab2_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 89 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1084 UNION ALL SELECT pk, col0 FROM view_2_tab2_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 89 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1084 UNION SELECT pk, col0 FROM view_2_tab2_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 89 ) AS tab2_1084
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab2_1084
----

query I rowsort label-6800-3
SELECT pk FROM tab2 WHERE col3 >= 89
----

statement ok
DROP VIEW view_1_tab2_1084

statement ok
DROP VIEW view_2_tab2_1084

statement ok
DROP VIEW view_3_tab2_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1084') DROP VIEW view_1_tab3_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1084') DROP VIEW view_2_tab3_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1084') DROP VIEW view_3_tab3_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1084

statement ok
CREATE VIEW view_1_tab3_1084 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 89

statement ok
CREATE VIEW view_2_tab3_1084 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 89)

statement ok
CREATE VIEW view_3_tab3_1084 AS SELECT pk FROM view_1_tab3_1084

query II rowsort label-6800-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 89
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab3_1084
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab3_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 89 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1084 UNION ALL SELECT pk, col0 FROM view_2_tab3_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 89 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1084 UNION SELECT pk, col0 FROM view_2_tab3_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 89 ) AS tab3_1084
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab3_1084
----

query I rowsort label-6800-3
SELECT pk FROM tab3 WHERE col3 >= 89
----

statement ok
DROP VIEW view_1_tab3_1084

statement ok
DROP VIEW view_2_tab3_1084

statement ok
DROP VIEW view_3_tab3_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1084') DROP VIEW view_1_tab4_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1084') DROP VIEW view_2_tab4_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1084

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1084') DROP VIEW view_3_tab4_1084

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1084

statement ok
CREATE VIEW view_1_tab4_1084 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 89

statement ok
CREATE VIEW view_2_tab4_1084 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 89)

statement ok
CREATE VIEW view_3_tab4_1084 AS SELECT pk FROM view_1_tab4_1084

query II rowsort label-6800-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 89
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab4_1084
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab4_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 89 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1084 UNION ALL SELECT pk, col0 FROM view_2_tab4_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 89 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 89)
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1084 UNION SELECT pk, col0 FROM view_2_tab4_1084
----
20 values hashing to e0ff9f51855fbcbf409d9f48f2ae6a49

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 89 ) AS tab4_1084
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab4_1084
----

query I rowsort label-6800-3
SELECT pk FROM tab4 WHERE col3 >= 89
----

statement ok
DROP VIEW view_1_tab4_1084

statement ok
DROP VIEW view_2_tab4_1084

statement ok
DROP VIEW view_3_tab4_1084

