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,87,51.64,'lbcbe',15,68.33,'wvwnc')

statement ok
INSERT INTO tab0 VALUES(1,35,59.0,'yohfs',73,32.75,'gsatd')

statement ok
INSERT INTO tab0 VALUES(2,73,6.52,'noeeg',69,91.59,'cpteg')

statement ok
INSERT INTO tab0 VALUES(3,18,88.69,'oqfff',3,94.76,'mubsc')

statement ok
INSERT INTO tab0 VALUES(4,84,24.34,'hrptm',26,45.58,'fqwkt')

statement ok
INSERT INTO tab0 VALUES(5,85,17.84,'khrpc',51,59.97,'gtsta')

statement ok
INSERT INTO tab0 VALUES(6,59,12.17,'srtxt',63,29.53,'rvfrn')

statement ok
INSERT INTO tab0 VALUES(7,71,66.10,'samkp',37,90.71,'wcuqw')

statement ok
INSERT INTO tab0 VALUES(8,30,3.27,'hhumv',46,74.87,'mgkzp')

statement ok
INSERT INTO tab0 VALUES(9,0,82.32,'hsege',74,80.46,'aszuq')

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 (col3)

statement ok
CREATE INDEX idx_tab2_1 ON tab2 (col1)

statement ok
CREATE UNIQUE INDEX idx_tab2_2 ON tab2 (col0)

statement ok
CREATE INDEX idx_tab2_3 ON tab2 (col4)

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 (col0)

statement ok
CREATE UNIQUE INDEX idx_tab3_1 ON tab3 (col4 DESC,col3 DESC,col1 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab3_2 ON tab3 (col4 DESC,col1 DESC)

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 INDEX idx_tab4_0 ON tab4 (col0 DESC,col1 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab4_1 ON tab4 (col3 DESC,col1 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab4_5 ON tab4 (col1,col0)

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 d4ae738bdf2c57c7b49cfb7b94e649a7

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_946 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 49

statement ok
CREATE VIEW view_2_tab0_946 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 49)

statement ok
CREATE VIEW view_3_tab0_946 AS SELECT pk FROM view_1_tab0_946

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 49
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 49)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_946
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_946
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_946 UNION ALL SELECT pk, col0 FROM view_2_tab0_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_946 UNION SELECT pk, col0 FROM view_2_tab0_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 49 ) AS tab0_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT * FROM view_3_tab0_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE col3 >= 49
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab0_946

statement ok
DROP VIEW view_2_tab0_946

statement ok
DROP VIEW view_3_tab0_946

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_946 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 49

statement ok
CREATE VIEW view_2_tab1_946 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 49)

statement ok
CREATE VIEW view_3_tab1_946 AS SELECT pk FROM view_1_tab1_946

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 49
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 49)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_946
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_946
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_946 UNION ALL SELECT pk, col0 FROM view_2_tab1_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_946 UNION SELECT pk, col0 FROM view_2_tab1_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 49 ) AS tab1_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT * FROM view_3_tab1_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE col3 >= 49
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab1_946

statement ok
DROP VIEW view_2_tab1_946

statement ok
DROP VIEW view_3_tab1_946

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_946 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 49

statement ok
CREATE VIEW view_2_tab2_946 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 49)

statement ok
CREATE VIEW view_3_tab2_946 AS SELECT pk FROM view_1_tab2_946

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 49
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 49)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_946
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_946
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_946 UNION ALL SELECT pk, col0 FROM view_2_tab2_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_946 UNION SELECT pk, col0 FROM view_2_tab2_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 49 ) AS tab2_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT * FROM view_3_tab2_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE col3 >= 49
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab2_946

statement ok
DROP VIEW view_2_tab2_946

statement ok
DROP VIEW view_3_tab2_946

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_946 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 49

statement ok
CREATE VIEW view_2_tab3_946 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 49)

statement ok
CREATE VIEW view_3_tab3_946 AS SELECT pk FROM view_1_tab3_946

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 49
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 49)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_946
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_946
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_946 UNION ALL SELECT pk, col0 FROM view_2_tab3_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_946 UNION SELECT pk, col0 FROM view_2_tab3_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 49 ) AS tab3_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT * FROM view_3_tab3_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE col3 >= 49
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab3_946

statement ok
DROP VIEW view_2_tab3_946

statement ok
DROP VIEW view_3_tab3_946

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_946 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 49

statement ok
CREATE VIEW view_2_tab4_946 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 49)

statement ok
CREATE VIEW view_3_tab4_946 AS SELECT pk FROM view_1_tab4_946

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 49
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 49)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_946
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_946
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_946 UNION ALL SELECT pk, col0 FROM view_2_tab4_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_946 UNION SELECT pk, col0 FROM view_2_tab4_946
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 49 ) AS tab4_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT * FROM view_3_tab4_946
----
1
2
5
6
9

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE col3 >= 49
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab4_946

statement ok
DROP VIEW view_2_tab4_946

statement ok
DROP VIEW view_3_tab4_946

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_947 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)

statement ok
CREATE VIEW view_2_tab0_947 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))

statement ok
CREATE VIEW view_3_tab0_947 AS SELECT pk FROM view_1_tab0_947

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_947
----

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_947 UNION ALL SELECT pk, col0 FROM view_2_tab0_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_947 UNION SELECT pk, col0 FROM view_2_tab0_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) ) AS tab0_947
----

query I rowsort label-100-3
SELECT * FROM view_3_tab0_947
----

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

statement ok
DROP VIEW view_1_tab0_947

statement ok
DROP VIEW view_2_tab0_947

statement ok
DROP VIEW view_3_tab0_947

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_947 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)

statement ok
CREATE VIEW view_2_tab1_947 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))

statement ok
CREATE VIEW view_3_tab1_947 AS SELECT pk FROM view_1_tab1_947

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_947
----

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_947 UNION ALL SELECT pk, col0 FROM view_2_tab1_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_947 UNION SELECT pk, col0 FROM view_2_tab1_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) ) AS tab1_947
----

query I rowsort label-100-3
SELECT * FROM view_3_tab1_947
----

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

statement ok
DROP VIEW view_1_tab1_947

statement ok
DROP VIEW view_2_tab1_947

statement ok
DROP VIEW view_3_tab1_947

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_947 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)

statement ok
CREATE VIEW view_2_tab2_947 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))

statement ok
CREATE VIEW view_3_tab2_947 AS SELECT pk FROM view_1_tab2_947

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_947
----

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_947 UNION ALL SELECT pk, col0 FROM view_2_tab2_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_947 UNION SELECT pk, col0 FROM view_2_tab2_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) ) AS tab2_947
----

query I rowsort label-100-3
SELECT * FROM view_3_tab2_947
----

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

statement ok
DROP VIEW view_1_tab2_947

statement ok
DROP VIEW view_2_tab2_947

statement ok
DROP VIEW view_3_tab2_947

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_947 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)

statement ok
CREATE VIEW view_2_tab3_947 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))

statement ok
CREATE VIEW view_3_tab3_947 AS SELECT pk FROM view_1_tab3_947

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_947
----

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_947 UNION ALL SELECT pk, col0 FROM view_2_tab3_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_947 UNION SELECT pk, col0 FROM view_2_tab3_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) ) AS tab3_947
----

query I rowsort label-100-3
SELECT * FROM view_3_tab3_947
----

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

statement ok
DROP VIEW view_1_tab3_947

statement ok
DROP VIEW view_2_tab3_947

statement ok
DROP VIEW view_3_tab3_947

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_947 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)

statement ok
CREATE VIEW view_2_tab4_947 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))

statement ok
CREATE VIEW view_3_tab4_947 AS SELECT pk FROM view_1_tab4_947

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_947
----

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_947 UNION ALL SELECT pk, col0 FROM view_2_tab4_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_947 UNION SELECT pk, col0 FROM view_2_tab4_947
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17) ) AS tab4_947
----

query I rowsort label-100-3
SELECT * FROM view_3_tab4_947
----

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col3 >= 12 AND (col0 = 62) AND (col3 IN (68,71,20,8,78,8) OR (col3 < 79) AND (col3 < 68) OR (col1 > 99.77)) AND (col0 >= 17)
----

statement ok
DROP VIEW view_1_tab4_947

statement ok
DROP VIEW view_2_tab4_947

statement ok
DROP VIEW view_3_tab4_947

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_948 AS SELECT pk, col0 FROM tab0 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))

statement ok
CREATE VIEW view_2_tab0_948 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))

statement ok
CREATE VIEW view_3_tab0_948 AS SELECT pk FROM view_1_tab0_948

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
7
71

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_948
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_948
----
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_948 UNION ALL SELECT pk, col0 FROM view_2_tab0_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_948 UNION SELECT pk, col0 FROM view_2_tab0_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) ) AS tab0_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT * FROM view_3_tab0_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab0_948

statement ok
DROP VIEW view_2_tab0_948

statement ok
DROP VIEW view_3_tab0_948

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_948 AS SELECT pk, col0 FROM tab1 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))

statement ok
CREATE VIEW view_2_tab1_948 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))

statement ok
CREATE VIEW view_3_tab1_948 AS SELECT pk FROM view_1_tab1_948

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
7
71

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_948
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_948
----
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_948 UNION ALL SELECT pk, col0 FROM view_2_tab1_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_948 UNION SELECT pk, col0 FROM view_2_tab1_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) ) AS tab1_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT * FROM view_3_tab1_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab1_948

statement ok
DROP VIEW view_2_tab1_948

statement ok
DROP VIEW view_3_tab1_948

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_948 AS SELECT pk, col0 FROM tab2 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))

statement ok
CREATE VIEW view_2_tab2_948 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))

statement ok
CREATE VIEW view_3_tab2_948 AS SELECT pk FROM view_1_tab2_948

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
7
71

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_948
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_948
----
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_948 UNION ALL SELECT pk, col0 FROM view_2_tab2_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_948 UNION SELECT pk, col0 FROM view_2_tab2_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) ) AS tab2_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT * FROM view_3_tab2_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab2_948

statement ok
DROP VIEW view_2_tab2_948

statement ok
DROP VIEW view_3_tab2_948

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_948 AS SELECT pk, col0 FROM tab3 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))

statement ok
CREATE VIEW view_2_tab3_948 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))

statement ok
CREATE VIEW view_3_tab3_948 AS SELECT pk FROM view_1_tab3_948

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
7
71

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_948
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_948
----
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_948 UNION ALL SELECT pk, col0 FROM view_2_tab3_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_948 UNION SELECT pk, col0 FROM view_2_tab3_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) ) AS tab3_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT * FROM view_3_tab3_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab3_948

statement ok
DROP VIEW view_2_tab3_948

statement ok
DROP VIEW view_3_tab3_948

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_948 AS SELECT pk, col0 FROM tab4 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))

statement ok
CREATE VIEW view_2_tab4_948 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))

statement ok
CREATE VIEW view_3_tab4_948 AS SELECT pk FROM view_1_tab4_948

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
7
71

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_948
----
18 values hashing to 6be83edeeaf038d0094fa846bdb99cbe

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_948
----
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_948 UNION ALL SELECT pk, col0 FROM view_2_tab4_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 = 50.63 OR (col3 > 43) OR col3 < 30))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_948 UNION SELECT pk, col0 FROM view_2_tab4_948
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30))) ) AS tab4_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT * FROM view_3_tab4_948
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE (((col1 = 50.63 OR (col3 > 43) OR col3 < 30)))
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab4_948

statement ok
DROP VIEW view_2_tab4_948

statement ok
DROP VIEW view_3_tab4_948

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_949 AS SELECT pk, col0 FROM tab0 WHERE ((col0 <= 16)) AND col4 < 12.6

statement ok
CREATE VIEW view_2_tab0_949 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)

statement ok
CREATE VIEW view_3_tab0_949 AS SELECT pk FROM view_1_tab0_949

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 16)) AND col4 < 12.6
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_949
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_949 UNION ALL SELECT pk, col0 FROM view_2_tab0_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_949 UNION SELECT pk, col0 FROM view_2_tab0_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 <= 16)) AND col4 < 12.6 ) AS tab0_949
----

query I rowsort label-300-3
SELECT * FROM view_3_tab0_949
----

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE ((col0 <= 16)) AND col4 < 12.6
----

statement ok
DROP VIEW view_1_tab0_949

statement ok
DROP VIEW view_2_tab0_949

statement ok
DROP VIEW view_3_tab0_949

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_949 AS SELECT pk, col0 FROM tab1 WHERE ((col0 <= 16)) AND col4 < 12.6

statement ok
CREATE VIEW view_2_tab1_949 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)

statement ok
CREATE VIEW view_3_tab1_949 AS SELECT pk FROM view_1_tab1_949

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 16)) AND col4 < 12.6
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_949
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_949 UNION ALL SELECT pk, col0 FROM view_2_tab1_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_949 UNION SELECT pk, col0 FROM view_2_tab1_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 <= 16)) AND col4 < 12.6 ) AS tab1_949
----

query I rowsort label-300-3
SELECT * FROM view_3_tab1_949
----

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE ((col0 <= 16)) AND col4 < 12.6
----

statement ok
DROP VIEW view_1_tab1_949

statement ok
DROP VIEW view_2_tab1_949

statement ok
DROP VIEW view_3_tab1_949

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_949 AS SELECT pk, col0 FROM tab2 WHERE ((col0 <= 16)) AND col4 < 12.6

statement ok
CREATE VIEW view_2_tab2_949 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)

statement ok
CREATE VIEW view_3_tab2_949 AS SELECT pk FROM view_1_tab2_949

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 16)) AND col4 < 12.6
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_949
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_949 UNION ALL SELECT pk, col0 FROM view_2_tab2_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_949 UNION SELECT pk, col0 FROM view_2_tab2_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 <= 16)) AND col4 < 12.6 ) AS tab2_949
----

query I rowsort label-300-3
SELECT * FROM view_3_tab2_949
----

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE ((col0 <= 16)) AND col4 < 12.6
----

statement ok
DROP VIEW view_1_tab2_949

statement ok
DROP VIEW view_2_tab2_949

statement ok
DROP VIEW view_3_tab2_949

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_949 AS SELECT pk, col0 FROM tab3 WHERE ((col0 <= 16)) AND col4 < 12.6

statement ok
CREATE VIEW view_2_tab3_949 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)

statement ok
CREATE VIEW view_3_tab3_949 AS SELECT pk FROM view_1_tab3_949

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 16)) AND col4 < 12.6
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_949
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_949 UNION ALL SELECT pk, col0 FROM view_2_tab3_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_949 UNION SELECT pk, col0 FROM view_2_tab3_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 <= 16)) AND col4 < 12.6 ) AS tab3_949
----

query I rowsort label-300-3
SELECT * FROM view_3_tab3_949
----

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE ((col0 <= 16)) AND col4 < 12.6
----

statement ok
DROP VIEW view_1_tab3_949

statement ok
DROP VIEW view_2_tab3_949

statement ok
DROP VIEW view_3_tab3_949

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_949 AS SELECT pk, col0 FROM tab4 WHERE ((col0 <= 16)) AND col4 < 12.6

statement ok
CREATE VIEW view_2_tab4_949 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)

statement ok
CREATE VIEW view_3_tab4_949 AS SELECT pk FROM view_1_tab4_949

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 16)) AND col4 < 12.6
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_949
----

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_949 UNION ALL SELECT pk, col0 FROM view_2_tab4_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 16)) AND col4 < 12.6 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 16)) AND col4 < 12.6)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_949 UNION SELECT pk, col0 FROM view_2_tab4_949
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 <= 16)) AND col4 < 12.6 ) AS tab4_949
----

query I rowsort label-300-3
SELECT * FROM view_3_tab4_949
----

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE ((col0 <= 16)) AND col4 < 12.6
----

statement ok
DROP VIEW view_1_tab4_949

statement ok
DROP VIEW view_2_tab4_949

statement ok
DROP VIEW view_3_tab4_949

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_950 AS SELECT pk, col0 FROM tab0 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57

statement ok
CREATE VIEW view_2_tab0_950 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)

statement ok
CREATE VIEW view_3_tab0_950 AS SELECT pk FROM view_1_tab0_950

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_950 UNION ALL SELECT pk, col0 FROM view_2_tab0_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_950 UNION SELECT pk, col0 FROM view_2_tab0_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 ) AS tab0_950
----

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

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

statement ok
DROP VIEW view_1_tab0_950

statement ok
DROP VIEW view_2_tab0_950

statement ok
DROP VIEW view_3_tab0_950

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_950 AS SELECT pk, col0 FROM tab1 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57

statement ok
CREATE VIEW view_2_tab1_950 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)

statement ok
CREATE VIEW view_3_tab1_950 AS SELECT pk FROM view_1_tab1_950

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_950 UNION ALL SELECT pk, col0 FROM view_2_tab1_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_950 UNION SELECT pk, col0 FROM view_2_tab1_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 ) AS tab1_950
----

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

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

statement ok
DROP VIEW view_1_tab1_950

statement ok
DROP VIEW view_2_tab1_950

statement ok
DROP VIEW view_3_tab1_950

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_950 AS SELECT pk, col0 FROM tab2 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57

statement ok
CREATE VIEW view_2_tab2_950 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)

statement ok
CREATE VIEW view_3_tab2_950 AS SELECT pk FROM view_1_tab2_950

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_950 UNION ALL SELECT pk, col0 FROM view_2_tab2_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_950 UNION SELECT pk, col0 FROM view_2_tab2_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 ) AS tab2_950
----

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

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

statement ok
DROP VIEW view_1_tab2_950

statement ok
DROP VIEW view_2_tab2_950

statement ok
DROP VIEW view_3_tab2_950

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_950 AS SELECT pk, col0 FROM tab3 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57

statement ok
CREATE VIEW view_2_tab3_950 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)

statement ok
CREATE VIEW view_3_tab3_950 AS SELECT pk FROM view_1_tab3_950

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_950 UNION ALL SELECT pk, col0 FROM view_2_tab3_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_950 UNION SELECT pk, col0 FROM view_2_tab3_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 ) AS tab3_950
----

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

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

statement ok
DROP VIEW view_1_tab3_950

statement ok
DROP VIEW view_2_tab3_950

statement ok
DROP VIEW view_3_tab3_950

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_950 AS SELECT pk, col0 FROM tab4 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57

statement ok
CREATE VIEW view_2_tab4_950 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)

statement ok
CREATE VIEW view_3_tab4_950 AS SELECT pk FROM view_1_tab4_950

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_950 UNION ALL SELECT pk, col0 FROM view_2_tab4_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 65 AND col4 < 86.42 AND col0 > 57)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_950 UNION SELECT pk, col0 FROM view_2_tab4_950
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57 ) AS tab4_950
----

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

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE col3 = 65 AND col4 < 86.42 AND col0 > 57
----

statement ok
DROP VIEW view_1_tab4_950

statement ok
DROP VIEW view_2_tab4_950

statement ok
DROP VIEW view_3_tab4_950

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_951 AS SELECT pk, col0 FROM tab0 WHERE col1 = 21.5

statement ok
CREATE VIEW view_2_tab0_951 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 21.5)

statement ok
CREATE VIEW view_3_tab0_951 AS SELECT pk FROM view_1_tab0_951

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col1 = 21.5
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_951
----

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 21.5 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_951 UNION ALL SELECT pk, col0 FROM view_2_tab0_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 21.5 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_951 UNION SELECT pk, col0 FROM view_2_tab0_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 = 21.5 ) AS tab0_951
----

query I rowsort label-500-3
SELECT * FROM view_3_tab0_951
----

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col1 = 21.5
----

statement ok
DROP VIEW view_1_tab0_951

statement ok
DROP VIEW view_2_tab0_951

statement ok
DROP VIEW view_3_tab0_951

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_951 AS SELECT pk, col0 FROM tab1 WHERE col1 = 21.5

statement ok
CREATE VIEW view_2_tab1_951 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 21.5)

statement ok
CREATE VIEW view_3_tab1_951 AS SELECT pk FROM view_1_tab1_951

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col1 = 21.5
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_951
----

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 21.5 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_951 UNION ALL SELECT pk, col0 FROM view_2_tab1_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 21.5 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_951 UNION SELECT pk, col0 FROM view_2_tab1_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 = 21.5 ) AS tab1_951
----

query I rowsort label-500-3
SELECT * FROM view_3_tab1_951
----

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col1 = 21.5
----

statement ok
DROP VIEW view_1_tab1_951

statement ok
DROP VIEW view_2_tab1_951

statement ok
DROP VIEW view_3_tab1_951

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_951 AS SELECT pk, col0 FROM tab2 WHERE col1 = 21.5

statement ok
CREATE VIEW view_2_tab2_951 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 21.5)

statement ok
CREATE VIEW view_3_tab2_951 AS SELECT pk FROM view_1_tab2_951

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col1 = 21.5
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_951
----

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 21.5 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_951 UNION ALL SELECT pk, col0 FROM view_2_tab2_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 21.5 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_951 UNION SELECT pk, col0 FROM view_2_tab2_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 = 21.5 ) AS tab2_951
----

query I rowsort label-500-3
SELECT * FROM view_3_tab2_951
----

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col1 = 21.5
----

statement ok
DROP VIEW view_1_tab2_951

statement ok
DROP VIEW view_2_tab2_951

statement ok
DROP VIEW view_3_tab2_951

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_951 AS SELECT pk, col0 FROM tab3 WHERE col1 = 21.5

statement ok
CREATE VIEW view_2_tab3_951 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 21.5)

statement ok
CREATE VIEW view_3_tab3_951 AS SELECT pk FROM view_1_tab3_951

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col1 = 21.5
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_951
----

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 21.5 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_951 UNION ALL SELECT pk, col0 FROM view_2_tab3_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 21.5 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_951 UNION SELECT pk, col0 FROM view_2_tab3_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 = 21.5 ) AS tab3_951
----

query I rowsort label-500-3
SELECT * FROM view_3_tab3_951
----

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col1 = 21.5
----

statement ok
DROP VIEW view_1_tab3_951

statement ok
DROP VIEW view_2_tab3_951

statement ok
DROP VIEW view_3_tab3_951

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_951 AS SELECT pk, col0 FROM tab4 WHERE col1 = 21.5

statement ok
CREATE VIEW view_2_tab4_951 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 21.5)

statement ok
CREATE VIEW view_3_tab4_951 AS SELECT pk FROM view_1_tab4_951

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col1 = 21.5
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_951
----

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 21.5 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_951 UNION ALL SELECT pk, col0 FROM view_2_tab4_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 21.5 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 21.5)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_951 UNION SELECT pk, col0 FROM view_2_tab4_951
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 = 21.5 ) AS tab4_951
----

query I rowsort label-500-3
SELECT * FROM view_3_tab4_951
----

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col1 = 21.5
----

statement ok
DROP VIEW view_1_tab4_951

statement ok
DROP VIEW view_2_tab4_951

statement ok
DROP VIEW view_3_tab4_951

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_952 AS SELECT pk, col0 FROM tab0 WHERE col1 < 54.4

statement ok
CREATE VIEW view_2_tab0_952 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 54.4)

statement ok
CREATE VIEW view_3_tab0_952 AS SELECT pk FROM view_1_tab0_952

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE col1 < 54.4
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 54.4)
----
1
35
3
18
7
71
9
0

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_952
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_952
----
1
35
3
18
7
71
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_952 UNION ALL SELECT pk, col0 FROM view_2_tab0_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_952 UNION SELECT pk, col0 FROM view_2_tab0_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 54.4 ) AS tab0_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT * FROM view_3_tab0_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE col1 < 54.4
----
0
2
4
5
6
8

statement ok
DROP VIEW view_1_tab0_952

statement ok
DROP VIEW view_2_tab0_952

statement ok
DROP VIEW view_3_tab0_952

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_952 AS SELECT pk, col0 FROM tab1 WHERE col1 < 54.4

statement ok
CREATE VIEW view_2_tab1_952 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 54.4)

statement ok
CREATE VIEW view_3_tab1_952 AS SELECT pk FROM view_1_tab1_952

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE col1 < 54.4
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 54.4)
----
1
35
3
18
7
71
9
0

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_952
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_952
----
1
35
3
18
7
71
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_952 UNION ALL SELECT pk, col0 FROM view_2_tab1_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_952 UNION SELECT pk, col0 FROM view_2_tab1_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 54.4 ) AS tab1_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT * FROM view_3_tab1_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE col1 < 54.4
----
0
2
4
5
6
8

statement ok
DROP VIEW view_1_tab1_952

statement ok
DROP VIEW view_2_tab1_952

statement ok
DROP VIEW view_3_tab1_952

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_952 AS SELECT pk, col0 FROM tab2 WHERE col1 < 54.4

statement ok
CREATE VIEW view_2_tab2_952 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 54.4)

statement ok
CREATE VIEW view_3_tab2_952 AS SELECT pk FROM view_1_tab2_952

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE col1 < 54.4
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 54.4)
----
1
35
3
18
7
71
9
0

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_952
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_952
----
1
35
3
18
7
71
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_952 UNION ALL SELECT pk, col0 FROM view_2_tab2_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_952 UNION SELECT pk, col0 FROM view_2_tab2_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 54.4 ) AS tab2_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT * FROM view_3_tab2_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE col1 < 54.4
----
0
2
4
5
6
8

statement ok
DROP VIEW view_1_tab2_952

statement ok
DROP VIEW view_2_tab2_952

statement ok
DROP VIEW view_3_tab2_952

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_952 AS SELECT pk, col0 FROM tab3 WHERE col1 < 54.4

statement ok
CREATE VIEW view_2_tab3_952 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 54.4)

statement ok
CREATE VIEW view_3_tab3_952 AS SELECT pk FROM view_1_tab3_952

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE col1 < 54.4
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 54.4)
----
1
35
3
18
7
71
9
0

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_952
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_952
----
1
35
3
18
7
71
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_952 UNION ALL SELECT pk, col0 FROM view_2_tab3_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_952 UNION SELECT pk, col0 FROM view_2_tab3_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 54.4 ) AS tab3_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT * FROM view_3_tab3_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE col1 < 54.4
----
0
2
4
5
6
8

statement ok
DROP VIEW view_1_tab3_952

statement ok
DROP VIEW view_2_tab3_952

statement ok
DROP VIEW view_3_tab3_952

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_952 AS SELECT pk, col0 FROM tab4 WHERE col1 < 54.4

statement ok
CREATE VIEW view_2_tab4_952 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 54.4)

statement ok
CREATE VIEW view_3_tab4_952 AS SELECT pk FROM view_1_tab4_952

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE col1 < 54.4
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 54.4)
----
1
35
3
18
7
71
9
0

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_952
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_952
----
1
35
3
18
7
71
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_952 UNION ALL SELECT pk, col0 FROM view_2_tab4_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_952 UNION SELECT pk, col0 FROM view_2_tab4_952
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 54.4 ) AS tab4_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT * FROM view_3_tab4_952
----
0
2
4
5
6
8

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE col1 < 54.4
----
0
2
4
5
6
8

statement ok
DROP VIEW view_1_tab4_952

statement ok
DROP VIEW view_2_tab4_952

statement ok
DROP VIEW view_3_tab4_952

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_953 AS SELECT pk, col0 FROM tab0 WHERE col0 > 55

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

statement ok
CREATE VIEW view_3_tab0_953 AS SELECT pk FROM view_1_tab0_953

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE col0 > 55
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 55)
----
1
35
3
18
8
30
9
0

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab0_953
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_953
----
1
35
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_953 UNION ALL SELECT pk, col0 FROM view_2_tab0_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_953 UNION SELECT pk, col0 FROM view_2_tab0_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 55 ) AS tab0_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT * FROM view_3_tab0_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE col0 > 55
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab0_953

statement ok
DROP VIEW view_2_tab0_953

statement ok
DROP VIEW view_3_tab0_953

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_953 AS SELECT pk, col0 FROM tab1 WHERE col0 > 55

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

statement ok
CREATE VIEW view_3_tab1_953 AS SELECT pk FROM view_1_tab1_953

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE col0 > 55
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 55)
----
1
35
3
18
8
30
9
0

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab1_953
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_953
----
1
35
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_953 UNION ALL SELECT pk, col0 FROM view_2_tab1_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_953 UNION SELECT pk, col0 FROM view_2_tab1_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 55 ) AS tab1_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT * FROM view_3_tab1_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE col0 > 55
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab1_953

statement ok
DROP VIEW view_2_tab1_953

statement ok
DROP VIEW view_3_tab1_953

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_953 AS SELECT pk, col0 FROM tab2 WHERE col0 > 55

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

statement ok
CREATE VIEW view_3_tab2_953 AS SELECT pk FROM view_1_tab2_953

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE col0 > 55
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 55)
----
1
35
3
18
8
30
9
0

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab2_953
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_953
----
1
35
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_953 UNION ALL SELECT pk, col0 FROM view_2_tab2_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_953 UNION SELECT pk, col0 FROM view_2_tab2_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 55 ) AS tab2_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT * FROM view_3_tab2_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE col0 > 55
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab2_953

statement ok
DROP VIEW view_2_tab2_953

statement ok
DROP VIEW view_3_tab2_953

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_953 AS SELECT pk, col0 FROM tab3 WHERE col0 > 55

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

statement ok
CREATE VIEW view_3_tab3_953 AS SELECT pk FROM view_1_tab3_953

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE col0 > 55
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 55)
----
1
35
3
18
8
30
9
0

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab3_953
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_953
----
1
35
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_953 UNION ALL SELECT pk, col0 FROM view_2_tab3_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_953 UNION SELECT pk, col0 FROM view_2_tab3_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 55 ) AS tab3_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT * FROM view_3_tab3_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE col0 > 55
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab3_953

statement ok
DROP VIEW view_2_tab3_953

statement ok
DROP VIEW view_3_tab3_953

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_953 AS SELECT pk, col0 FROM tab4 WHERE col0 > 55

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

statement ok
CREATE VIEW view_3_tab4_953 AS SELECT pk FROM view_1_tab4_953

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE col0 > 55
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 55)
----
1
35
3
18
8
30
9
0

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab4_953
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_953
----
1
35
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_953 UNION ALL SELECT pk, col0 FROM view_2_tab4_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_953 UNION SELECT pk, col0 FROM view_2_tab4_953
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 55 ) AS tab4_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT * FROM view_3_tab4_953
----
0
2
4
5
6
7

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE col0 > 55
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab4_953

statement ok
DROP VIEW view_2_tab4_953

statement ok
DROP VIEW view_3_tab4_953

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_954 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 17)) OR col0 < 83

statement ok
CREATE VIEW view_2_tab0_954 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 17)) OR col0 < 83)

statement ok
CREATE VIEW view_3_tab0_954 AS SELECT pk FROM view_1_tab0_954

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 17)) OR col0 < 83
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
0
87

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_954
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_954
----
0
87

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 17)) OR col0 < 83 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_954 UNION ALL SELECT pk, col0 FROM view_2_tab0_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 17)) OR col0 < 83 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_954 UNION SELECT pk, col0 FROM view_2_tab0_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 17)) OR col0 < 83 ) AS tab0_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT * FROM view_3_tab0_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE ((col3 > 17)) OR col0 < 83
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab0_954

statement ok
DROP VIEW view_2_tab0_954

statement ok
DROP VIEW view_3_tab0_954

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_954 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 17)) OR col0 < 83

statement ok
CREATE VIEW view_2_tab1_954 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 17)) OR col0 < 83)

statement ok
CREATE VIEW view_3_tab1_954 AS SELECT pk FROM view_1_tab1_954

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 17)) OR col0 < 83
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
0
87

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_954
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_954
----
0
87

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 17)) OR col0 < 83 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_954 UNION ALL SELECT pk, col0 FROM view_2_tab1_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 17)) OR col0 < 83 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_954 UNION SELECT pk, col0 FROM view_2_tab1_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 17)) OR col0 < 83 ) AS tab1_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT * FROM view_3_tab1_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE ((col3 > 17)) OR col0 < 83
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab1_954

statement ok
DROP VIEW view_2_tab1_954

statement ok
DROP VIEW view_3_tab1_954

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_954 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 17)) OR col0 < 83

statement ok
CREATE VIEW view_2_tab2_954 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 17)) OR col0 < 83)

statement ok
CREATE VIEW view_3_tab2_954 AS SELECT pk FROM view_1_tab2_954

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 17)) OR col0 < 83
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
0
87

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_954
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_954
----
0
87

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 17)) OR col0 < 83 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_954 UNION ALL SELECT pk, col0 FROM view_2_tab2_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 17)) OR col0 < 83 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_954 UNION SELECT pk, col0 FROM view_2_tab2_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 17)) OR col0 < 83 ) AS tab2_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT * FROM view_3_tab2_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE ((col3 > 17)) OR col0 < 83
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab2_954

statement ok
DROP VIEW view_2_tab2_954

statement ok
DROP VIEW view_3_tab2_954

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_954 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 17)) OR col0 < 83

statement ok
CREATE VIEW view_2_tab3_954 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 17)) OR col0 < 83)

statement ok
CREATE VIEW view_3_tab3_954 AS SELECT pk FROM view_1_tab3_954

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 17)) OR col0 < 83
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
0
87

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_954
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_954
----
0
87

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 17)) OR col0 < 83 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_954 UNION ALL SELECT pk, col0 FROM view_2_tab3_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 17)) OR col0 < 83 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_954 UNION SELECT pk, col0 FROM view_2_tab3_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 17)) OR col0 < 83 ) AS tab3_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT * FROM view_3_tab3_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE ((col3 > 17)) OR col0 < 83
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab3_954

statement ok
DROP VIEW view_2_tab3_954

statement ok
DROP VIEW view_3_tab3_954

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_954 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 17)) OR col0 < 83

statement ok
CREATE VIEW view_2_tab4_954 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 17)) OR col0 < 83)

statement ok
CREATE VIEW view_3_tab4_954 AS SELECT pk FROM view_1_tab4_954

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 17)) OR col0 < 83
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
0
87

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_954
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_954
----
0
87

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 17)) OR col0 < 83 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_954 UNION ALL SELECT pk, col0 FROM view_2_tab4_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 17)) OR col0 < 83 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 17)) OR col0 < 83)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_954 UNION SELECT pk, col0 FROM view_2_tab4_954
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 17)) OR col0 < 83 ) AS tab4_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT * FROM view_3_tab4_954
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE ((col3 > 17)) OR col0 < 83
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab4_954

statement ok
DROP VIEW view_2_tab4_954

statement ok
DROP VIEW view_3_tab4_954

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_955 AS SELECT pk, col0 FROM tab0 WHERE (col1 = 6.67)

statement ok
CREATE VIEW view_2_tab0_955 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 6.67))

statement ok
CREATE VIEW view_3_tab0_955 AS SELECT pk FROM view_1_tab0_955

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE (col1 = 6.67)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_955
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 = 6.67) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_955 UNION ALL SELECT pk, col0 FROM view_2_tab0_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 = 6.67) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_955 UNION SELECT pk, col0 FROM view_2_tab0_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 = 6.67) ) AS tab0_955
----

query I rowsort label-900-3
SELECT * FROM view_3_tab0_955
----

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE (col1 = 6.67)
----

statement ok
DROP VIEW view_1_tab0_955

statement ok
DROP VIEW view_2_tab0_955

statement ok
DROP VIEW view_3_tab0_955

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_955 AS SELECT pk, col0 FROM tab1 WHERE (col1 = 6.67)

statement ok
CREATE VIEW view_2_tab1_955 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 6.67))

statement ok
CREATE VIEW view_3_tab1_955 AS SELECT pk FROM view_1_tab1_955

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE (col1 = 6.67)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_955
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 = 6.67) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_955 UNION ALL SELECT pk, col0 FROM view_2_tab1_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 = 6.67) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_955 UNION SELECT pk, col0 FROM view_2_tab1_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 = 6.67) ) AS tab1_955
----

query I rowsort label-900-3
SELECT * FROM view_3_tab1_955
----

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE (col1 = 6.67)
----

statement ok
DROP VIEW view_1_tab1_955

statement ok
DROP VIEW view_2_tab1_955

statement ok
DROP VIEW view_3_tab1_955

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_955 AS SELECT pk, col0 FROM tab2 WHERE (col1 = 6.67)

statement ok
CREATE VIEW view_2_tab2_955 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 6.67))

statement ok
CREATE VIEW view_3_tab2_955 AS SELECT pk FROM view_1_tab2_955

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE (col1 = 6.67)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_955
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 = 6.67) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_955 UNION ALL SELECT pk, col0 FROM view_2_tab2_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 = 6.67) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_955 UNION SELECT pk, col0 FROM view_2_tab2_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 = 6.67) ) AS tab2_955
----

query I rowsort label-900-3
SELECT * FROM view_3_tab2_955
----

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE (col1 = 6.67)
----

statement ok
DROP VIEW view_1_tab2_955

statement ok
DROP VIEW view_2_tab2_955

statement ok
DROP VIEW view_3_tab2_955

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_955 AS SELECT pk, col0 FROM tab3 WHERE (col1 = 6.67)

statement ok
CREATE VIEW view_2_tab3_955 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 6.67))

statement ok
CREATE VIEW view_3_tab3_955 AS SELECT pk FROM view_1_tab3_955

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE (col1 = 6.67)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_955
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 = 6.67) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_955 UNION ALL SELECT pk, col0 FROM view_2_tab3_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 = 6.67) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_955 UNION SELECT pk, col0 FROM view_2_tab3_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 = 6.67) ) AS tab3_955
----

query I rowsort label-900-3
SELECT * FROM view_3_tab3_955
----

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE (col1 = 6.67)
----

statement ok
DROP VIEW view_1_tab3_955

statement ok
DROP VIEW view_2_tab3_955

statement ok
DROP VIEW view_3_tab3_955

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_955 AS SELECT pk, col0 FROM tab4 WHERE (col1 = 6.67)

statement ok
CREATE VIEW view_2_tab4_955 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 6.67))

statement ok
CREATE VIEW view_3_tab4_955 AS SELECT pk FROM view_1_tab4_955

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE (col1 = 6.67)
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_955
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 = 6.67) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_955 UNION ALL SELECT pk, col0 FROM view_2_tab4_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 = 6.67) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 = 6.67))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_955 UNION SELECT pk, col0 FROM view_2_tab4_955
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 = 6.67) ) AS tab4_955
----

query I rowsort label-900-3
SELECT * FROM view_3_tab4_955
----

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE (col1 = 6.67)
----

statement ok
DROP VIEW view_1_tab4_955

statement ok
DROP VIEW view_2_tab4_955

statement ok
DROP VIEW view_3_tab4_955

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_956 AS SELECT pk, col0 FROM tab0 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)

statement ok
CREATE VIEW view_2_tab0_956 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))

statement ok
CREATE VIEW view_3_tab0_956 AS SELECT pk FROM view_1_tab0_956

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
3
18

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_956
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_956
----
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_956 UNION ALL SELECT pk, col0 FROM view_2_tab0_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_956 UNION SELECT pk, col0 FROM view_2_tab0_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) ) AS tab0_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_956

statement ok
DROP VIEW view_2_tab0_956

statement ok
DROP VIEW view_3_tab0_956

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_956 AS SELECT pk, col0 FROM tab1 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)

statement ok
CREATE VIEW view_2_tab1_956 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))

statement ok
CREATE VIEW view_3_tab1_956 AS SELECT pk FROM view_1_tab1_956

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
3
18

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_956
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_956
----
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_956 UNION ALL SELECT pk, col0 FROM view_2_tab1_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_956 UNION SELECT pk, col0 FROM view_2_tab1_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) ) AS tab1_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_956

statement ok
DROP VIEW view_2_tab1_956

statement ok
DROP VIEW view_3_tab1_956

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_956 AS SELECT pk, col0 FROM tab2 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)

statement ok
CREATE VIEW view_2_tab2_956 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))

statement ok
CREATE VIEW view_3_tab2_956 AS SELECT pk FROM view_1_tab2_956

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
3
18

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_956
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_956
----
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_956 UNION ALL SELECT pk, col0 FROM view_2_tab2_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_956 UNION SELECT pk, col0 FROM view_2_tab2_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) ) AS tab2_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_956

statement ok
DROP VIEW view_2_tab2_956

statement ok
DROP VIEW view_3_tab2_956

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_956 AS SELECT pk, col0 FROM tab3 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)

statement ok
CREATE VIEW view_2_tab3_956 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))

statement ok
CREATE VIEW view_3_tab3_956 AS SELECT pk FROM view_1_tab3_956

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
3
18

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_956
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_956
----
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_956 UNION ALL SELECT pk, col0 FROM view_2_tab3_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_956 UNION SELECT pk, col0 FROM view_2_tab3_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) ) AS tab3_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_956

statement ok
DROP VIEW view_2_tab3_956

statement ok
DROP VIEW view_3_tab3_956

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_956 AS SELECT pk, col0 FROM tab4 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)

statement ok
CREATE VIEW view_2_tab4_956 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))

statement ok
CREATE VIEW view_3_tab4_956 AS SELECT pk FROM view_1_tab4_956

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
3
18

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_956
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_956
----
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_956 UNION ALL SELECT pk, col0 FROM view_2_tab4_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (36,50,61) OR col4 <= 91.8))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_956 UNION SELECT pk, col0 FROM view_2_tab4_956
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 IN (36,50,61) OR col4 <= 91.8) ) AS tab4_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_956
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE (col0 IN (36,50,61) OR col4 <= 91.8)
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_956

statement ok
DROP VIEW view_2_tab4_956

statement ok
DROP VIEW view_3_tab4_956

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_957 AS SELECT pk, col0 FROM tab0 WHERE col3 = 60

statement ok
CREATE VIEW view_2_tab0_957 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 60)

statement ok
CREATE VIEW view_3_tab0_957 AS SELECT pk FROM view_1_tab0_957

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE col3 = 60
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_957
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 60 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_957 UNION ALL SELECT pk, col0 FROM view_2_tab0_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 60 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_957 UNION SELECT pk, col0 FROM view_2_tab0_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 60 ) AS tab0_957
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_957
----

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE col3 = 60
----

statement ok
DROP VIEW view_1_tab0_957

statement ok
DROP VIEW view_2_tab0_957

statement ok
DROP VIEW view_3_tab0_957

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_957 AS SELECT pk, col0 FROM tab1 WHERE col3 = 60

statement ok
CREATE VIEW view_2_tab1_957 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 60)

statement ok
CREATE VIEW view_3_tab1_957 AS SELECT pk FROM view_1_tab1_957

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE col3 = 60
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_957
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 60 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_957 UNION ALL SELECT pk, col0 FROM view_2_tab1_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 60 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_957 UNION SELECT pk, col0 FROM view_2_tab1_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 60 ) AS tab1_957
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_957
----

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE col3 = 60
----

statement ok
DROP VIEW view_1_tab1_957

statement ok
DROP VIEW view_2_tab1_957

statement ok
DROP VIEW view_3_tab1_957

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_957 AS SELECT pk, col0 FROM tab2 WHERE col3 = 60

statement ok
CREATE VIEW view_2_tab2_957 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 60)

statement ok
CREATE VIEW view_3_tab2_957 AS SELECT pk FROM view_1_tab2_957

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE col3 = 60
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_957
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 60 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_957 UNION ALL SELECT pk, col0 FROM view_2_tab2_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 60 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_957 UNION SELECT pk, col0 FROM view_2_tab2_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 60 ) AS tab2_957
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_957
----

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE col3 = 60
----

statement ok
DROP VIEW view_1_tab2_957

statement ok
DROP VIEW view_2_tab2_957

statement ok
DROP VIEW view_3_tab2_957

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_957 AS SELECT pk, col0 FROM tab3 WHERE col3 = 60

statement ok
CREATE VIEW view_2_tab3_957 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 60)

statement ok
CREATE VIEW view_3_tab3_957 AS SELECT pk FROM view_1_tab3_957

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE col3 = 60
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_957
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 60 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_957 UNION ALL SELECT pk, col0 FROM view_2_tab3_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 60 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_957 UNION SELECT pk, col0 FROM view_2_tab3_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 60 ) AS tab3_957
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_957
----

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE col3 = 60
----

statement ok
DROP VIEW view_1_tab3_957

statement ok
DROP VIEW view_2_tab3_957

statement ok
DROP VIEW view_3_tab3_957

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_957 AS SELECT pk, col0 FROM tab4 WHERE col3 = 60

statement ok
CREATE VIEW view_2_tab4_957 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 60)

statement ok
CREATE VIEW view_3_tab4_957 AS SELECT pk FROM view_1_tab4_957

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE col3 = 60
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_957
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 60 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_957 UNION ALL SELECT pk, col0 FROM view_2_tab4_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 60 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 60)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_957 UNION SELECT pk, col0 FROM view_2_tab4_957
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 60 ) AS tab4_957
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_957
----

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE col3 = 60
----

statement ok
DROP VIEW view_1_tab4_957

statement ok
DROP VIEW view_2_tab4_957

statement ok
DROP VIEW view_3_tab4_957

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_958 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 95)

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

statement ok
CREATE VIEW view_3_tab0_958 AS SELECT pk FROM view_1_tab0_958

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 95)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 95))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_958
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_958 UNION ALL SELECT pk, col0 FROM view_2_tab0_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_958 UNION SELECT pk, col0 FROM view_2_tab0_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 95) ) AS tab0_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE (col0 < 95)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_958

statement ok
DROP VIEW view_2_tab0_958

statement ok
DROP VIEW view_3_tab0_958

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_958 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 95)

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

statement ok
CREATE VIEW view_3_tab1_958 AS SELECT pk FROM view_1_tab1_958

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 95)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 95))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_958
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_958 UNION ALL SELECT pk, col0 FROM view_2_tab1_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_958 UNION SELECT pk, col0 FROM view_2_tab1_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 95) ) AS tab1_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE (col0 < 95)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_958

statement ok
DROP VIEW view_2_tab1_958

statement ok
DROP VIEW view_3_tab1_958

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_958 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 95)

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

statement ok
CREATE VIEW view_3_tab2_958 AS SELECT pk FROM view_1_tab2_958

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 95)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 95))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_958
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_958 UNION ALL SELECT pk, col0 FROM view_2_tab2_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_958 UNION SELECT pk, col0 FROM view_2_tab2_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 95) ) AS tab2_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE (col0 < 95)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_958

statement ok
DROP VIEW view_2_tab2_958

statement ok
DROP VIEW view_3_tab2_958

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_958 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 95)

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

statement ok
CREATE VIEW view_3_tab3_958 AS SELECT pk FROM view_1_tab3_958

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 95)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 95))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_958
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_958 UNION ALL SELECT pk, col0 FROM view_2_tab3_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_958 UNION SELECT pk, col0 FROM view_2_tab3_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 95) ) AS tab3_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE (col0 < 95)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_958

statement ok
DROP VIEW view_2_tab3_958

statement ok
DROP VIEW view_3_tab3_958

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_958 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 95)

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

statement ok
CREATE VIEW view_3_tab4_958 AS SELECT pk FROM view_1_tab4_958

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 95)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 95))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_958
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_958 UNION ALL SELECT pk, col0 FROM view_2_tab4_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_958 UNION SELECT pk, col0 FROM view_2_tab4_958
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 95) ) AS tab4_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_958
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE (col0 < 95)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_958

statement ok
DROP VIEW view_2_tab4_958

statement ok
DROP VIEW view_3_tab4_958

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_960 AS SELECT pk, col0 FROM tab0 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48

statement ok
CREATE VIEW view_2_tab0_960 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)

statement ok
CREATE VIEW view_3_tab0_960 AS SELECT pk FROM view_1_tab0_960

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
0
87
2
73
5
85
7
71

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_960
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_960
----
0
87
2
73
5
85
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_960 UNION ALL SELECT pk, col0 FROM view_2_tab0_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_960 UNION SELECT pk, col0 FROM view_2_tab0_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 ) AS tab0_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
1
3
4
6
8
9

statement ok
DROP VIEW view_1_tab0_960

statement ok
DROP VIEW view_2_tab0_960

statement ok
DROP VIEW view_3_tab0_960

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_960 AS SELECT pk, col0 FROM tab1 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48

statement ok
CREATE VIEW view_2_tab1_960 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)

statement ok
CREATE VIEW view_3_tab1_960 AS SELECT pk FROM view_1_tab1_960

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
0
87
2
73
5
85
7
71

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_960
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_960
----
0
87
2
73
5
85
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_960 UNION ALL SELECT pk, col0 FROM view_2_tab1_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_960 UNION SELECT pk, col0 FROM view_2_tab1_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 ) AS tab1_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
1
3
4
6
8
9

statement ok
DROP VIEW view_1_tab1_960

statement ok
DROP VIEW view_2_tab1_960

statement ok
DROP VIEW view_3_tab1_960

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_960 AS SELECT pk, col0 FROM tab2 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48

statement ok
CREATE VIEW view_2_tab2_960 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)

statement ok
CREATE VIEW view_3_tab2_960 AS SELECT pk FROM view_1_tab2_960

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
0
87
2
73
5
85
7
71

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_960
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_960
----
0
87
2
73
5
85
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_960 UNION ALL SELECT pk, col0 FROM view_2_tab2_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_960 UNION SELECT pk, col0 FROM view_2_tab2_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 ) AS tab2_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
1
3
4
6
8
9

statement ok
DROP VIEW view_1_tab2_960

statement ok
DROP VIEW view_2_tab2_960

statement ok
DROP VIEW view_3_tab2_960

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_960 AS SELECT pk, col0 FROM tab3 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48

statement ok
CREATE VIEW view_2_tab3_960 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)

statement ok
CREATE VIEW view_3_tab3_960 AS SELECT pk FROM view_1_tab3_960

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
0
87
2
73
5
85
7
71

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_960
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_960
----
0
87
2
73
5
85
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_960 UNION ALL SELECT pk, col0 FROM view_2_tab3_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_960 UNION SELECT pk, col0 FROM view_2_tab3_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 ) AS tab3_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
1
3
4
6
8
9

statement ok
DROP VIEW view_1_tab3_960

statement ok
DROP VIEW view_2_tab3_960

statement ok
DROP VIEW view_3_tab3_960

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_960 AS SELECT pk, col0 FROM tab4 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48

statement ok
CREATE VIEW view_2_tab4_960 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)

statement ok
CREATE VIEW view_3_tab4_960 AS SELECT pk FROM view_1_tab4_960

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
0
87
2
73
5
85
7
71

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_960
----
12 values hashing to 9737892e46e8c00a84b58d7bcedf135c

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_960
----
0
87
2
73
5
85
7
71

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_960 UNION ALL SELECT pk, col0 FROM view_2_tab4_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_960 UNION SELECT pk, col0 FROM view_2_tab4_960
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48 ) AS tab4_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_960
----
1
3
4
6
8
9

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col1 > 29.25 AND col4 <= 41.16 AND (((col3 >= 43) AND (((((col0 <= 75))))) AND col4 < 28.88)) AND col0 < 68 OR (col3 <= 70) AND col4 = 32.53 AND col3 < 47 OR col0 > 47 AND (((col4 <= 59.88)) AND (col3 < 72)) OR col0 < 48
----
1
3
4
6
8
9

statement ok
DROP VIEW view_1_tab4_960

statement ok
DROP VIEW view_2_tab4_960

statement ok
DROP VIEW view_3_tab4_960

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_961 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 33)

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

statement ok
CREATE VIEW view_3_tab0_961 AS SELECT pk FROM view_1_tab0_961

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 33)
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 33))
----
3
18
8
30
9
0

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_961
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_961
----
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_961 UNION ALL SELECT pk, col0 FROM view_2_tab0_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_961 UNION SELECT pk, col0 FROM view_2_tab0_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 33) ) AS tab0_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE (col0 > 33)
----
0
1
2
4
5
6
7

statement ok
DROP VIEW view_1_tab0_961

statement ok
DROP VIEW view_2_tab0_961

statement ok
DROP VIEW view_3_tab0_961

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_961 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 33)

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

statement ok
CREATE VIEW view_3_tab1_961 AS SELECT pk FROM view_1_tab1_961

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 33)
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 33))
----
3
18
8
30
9
0

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_961
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_961
----
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_961 UNION ALL SELECT pk, col0 FROM view_2_tab1_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_961 UNION SELECT pk, col0 FROM view_2_tab1_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 33) ) AS tab1_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE (col0 > 33)
----
0
1
2
4
5
6
7

statement ok
DROP VIEW view_1_tab1_961

statement ok
DROP VIEW view_2_tab1_961

statement ok
DROP VIEW view_3_tab1_961

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_961 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 33)

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

statement ok
CREATE VIEW view_3_tab2_961 AS SELECT pk FROM view_1_tab2_961

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 33)
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 33))
----
3
18
8
30
9
0

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_961
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_961
----
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_961 UNION ALL SELECT pk, col0 FROM view_2_tab2_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_961 UNION SELECT pk, col0 FROM view_2_tab2_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 33) ) AS tab2_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE (col0 > 33)
----
0
1
2
4
5
6
7

statement ok
DROP VIEW view_1_tab2_961

statement ok
DROP VIEW view_2_tab2_961

statement ok
DROP VIEW view_3_tab2_961

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_961 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 33)

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

statement ok
CREATE VIEW view_3_tab3_961 AS SELECT pk FROM view_1_tab3_961

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 33)
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 33))
----
3
18
8
30
9
0

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_961
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_961
----
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_961 UNION ALL SELECT pk, col0 FROM view_2_tab3_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_961 UNION SELECT pk, col0 FROM view_2_tab3_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 33) ) AS tab3_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE (col0 > 33)
----
0
1
2
4
5
6
7

statement ok
DROP VIEW view_1_tab3_961

statement ok
DROP VIEW view_2_tab3_961

statement ok
DROP VIEW view_3_tab3_961

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_961 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 33)

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

statement ok
CREATE VIEW view_3_tab4_961 AS SELECT pk FROM view_1_tab4_961

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 33)
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 33))
----
3
18
8
30
9
0

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_961
----
14 values hashing to 7749a85fa119e0f079eecdce53d0d9b9

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_961
----
3
18
8
30
9
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_961 UNION ALL SELECT pk, col0 FROM view_2_tab4_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_961 UNION SELECT pk, col0 FROM view_2_tab4_961
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 33) ) AS tab4_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_961
----
0
1
2
4
5
6
7

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE (col0 > 33)
----
0
1
2
4
5
6
7

statement ok
DROP VIEW view_1_tab4_961

statement ok
DROP VIEW view_2_tab4_961

statement ok
DROP VIEW view_3_tab4_961

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_962 AS SELECT pk, col0 FROM tab0 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)

statement ok
CREATE VIEW view_2_tab0_962 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))

statement ok
CREATE VIEW view_3_tab0_962 AS SELECT pk FROM view_1_tab0_962

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_962
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_962 UNION ALL SELECT pk, col0 FROM view_2_tab0_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_962 UNION SELECT pk, col0 FROM view_2_tab0_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) ) AS tab0_962
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_962
----

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

statement ok
DROP VIEW view_1_tab0_962

statement ok
DROP VIEW view_2_tab0_962

statement ok
DROP VIEW view_3_tab0_962

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_962 AS SELECT pk, col0 FROM tab1 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)

statement ok
CREATE VIEW view_2_tab1_962 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))

statement ok
CREATE VIEW view_3_tab1_962 AS SELECT pk FROM view_1_tab1_962

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_962
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_962 UNION ALL SELECT pk, col0 FROM view_2_tab1_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_962 UNION SELECT pk, col0 FROM view_2_tab1_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) ) AS tab1_962
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_962
----

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

statement ok
DROP VIEW view_1_tab1_962

statement ok
DROP VIEW view_2_tab1_962

statement ok
DROP VIEW view_3_tab1_962

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_962 AS SELECT pk, col0 FROM tab2 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)

statement ok
CREATE VIEW view_2_tab2_962 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))

statement ok
CREATE VIEW view_3_tab2_962 AS SELECT pk FROM view_1_tab2_962

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_962
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_962 UNION ALL SELECT pk, col0 FROM view_2_tab2_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_962 UNION SELECT pk, col0 FROM view_2_tab2_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) ) AS tab2_962
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_962
----

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

statement ok
DROP VIEW view_1_tab2_962

statement ok
DROP VIEW view_2_tab2_962

statement ok
DROP VIEW view_3_tab2_962

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_962 AS SELECT pk, col0 FROM tab3 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)

statement ok
CREATE VIEW view_2_tab3_962 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))

statement ok
CREATE VIEW view_3_tab3_962 AS SELECT pk FROM view_1_tab3_962

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_962
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_962 UNION ALL SELECT pk, col0 FROM view_2_tab3_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_962 UNION SELECT pk, col0 FROM view_2_tab3_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) ) AS tab3_962
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_962
----

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

statement ok
DROP VIEW view_1_tab3_962

statement ok
DROP VIEW view_2_tab3_962

statement ok
DROP VIEW view_3_tab3_962

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_962 AS SELECT pk, col0 FROM tab4 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)

statement ok
CREATE VIEW view_2_tab4_962 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))

statement ok
CREATE VIEW view_3_tab4_962 AS SELECT pk FROM view_1_tab4_962

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_962
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_962 UNION ALL SELECT pk, col0 FROM view_2_tab4_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (9.21,30.7,24.3,83.35,38.62))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_962 UNION SELECT pk, col0 FROM view_2_tab4_962
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62) ) AS tab4_962
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_962
----

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE col4 IN (9.21,30.7,24.3,83.35,38.62)
----

statement ok
DROP VIEW view_1_tab4_962

statement ok
DROP VIEW view_2_tab4_962

statement ok
DROP VIEW view_3_tab4_962

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_963 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 56) AND col1 < 34.71

statement ok
CREATE VIEW view_2_tab0_963 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 56) AND col1 < 34.71)

statement ok
CREATE VIEW view_3_tab0_963 AS SELECT pk FROM view_1_tab0_963

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 56) AND col1 < 34.71
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_963
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_963
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 56) AND col1 < 34.71 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_963 UNION ALL SELECT pk, col0 FROM view_2_tab0_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 56) AND col1 < 34.71 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_963 UNION SELECT pk, col0 FROM view_2_tab0_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 56) AND col1 < 34.71 ) AS tab0_963
----
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_963
----
8

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE (col0 < 56) AND col1 < 34.71
----
8

statement ok
DROP VIEW view_1_tab0_963

statement ok
DROP VIEW view_2_tab0_963

statement ok
DROP VIEW view_3_tab0_963

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_963 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 56) AND col1 < 34.71

statement ok
CREATE VIEW view_2_tab1_963 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 56) AND col1 < 34.71)

statement ok
CREATE VIEW view_3_tab1_963 AS SELECT pk FROM view_1_tab1_963

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 56) AND col1 < 34.71
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_963
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_963
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 56) AND col1 < 34.71 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_963 UNION ALL SELECT pk, col0 FROM view_2_tab1_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 56) AND col1 < 34.71 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_963 UNION SELECT pk, col0 FROM view_2_tab1_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 56) AND col1 < 34.71 ) AS tab1_963
----
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_963
----
8

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE (col0 < 56) AND col1 < 34.71
----
8

statement ok
DROP VIEW view_1_tab1_963

statement ok
DROP VIEW view_2_tab1_963

statement ok
DROP VIEW view_3_tab1_963

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_963 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 56) AND col1 < 34.71

statement ok
CREATE VIEW view_2_tab2_963 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 56) AND col1 < 34.71)

statement ok
CREATE VIEW view_3_tab2_963 AS SELECT pk FROM view_1_tab2_963

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 56) AND col1 < 34.71
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_963
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_963
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 56) AND col1 < 34.71 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_963 UNION ALL SELECT pk, col0 FROM view_2_tab2_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 56) AND col1 < 34.71 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_963 UNION SELECT pk, col0 FROM view_2_tab2_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 56) AND col1 < 34.71 ) AS tab2_963
----
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_963
----
8

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE (col0 < 56) AND col1 < 34.71
----
8

statement ok
DROP VIEW view_1_tab2_963

statement ok
DROP VIEW view_2_tab2_963

statement ok
DROP VIEW view_3_tab2_963

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_963 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 56) AND col1 < 34.71

statement ok
CREATE VIEW view_2_tab3_963 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 56) AND col1 < 34.71)

statement ok
CREATE VIEW view_3_tab3_963 AS SELECT pk FROM view_1_tab3_963

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 56) AND col1 < 34.71
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_963
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_963
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 56) AND col1 < 34.71 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_963 UNION ALL SELECT pk, col0 FROM view_2_tab3_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 56) AND col1 < 34.71 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_963 UNION SELECT pk, col0 FROM view_2_tab3_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 56) AND col1 < 34.71 ) AS tab3_963
----
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_963
----
8

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE (col0 < 56) AND col1 < 34.71
----
8

statement ok
DROP VIEW view_1_tab3_963

statement ok
DROP VIEW view_2_tab3_963

statement ok
DROP VIEW view_3_tab3_963

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_963 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 56) AND col1 < 34.71

statement ok
CREATE VIEW view_2_tab4_963 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 56) AND col1 < 34.71)

statement ok
CREATE VIEW view_3_tab4_963 AS SELECT pk FROM view_1_tab4_963

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 56) AND col1 < 34.71
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_963
----
8
30

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_963
----
18 values hashing to 1759a8e78f6a72828aafb2097754470c

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 56) AND col1 < 34.71 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_963 UNION ALL SELECT pk, col0 FROM view_2_tab4_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 56) AND col1 < 34.71 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 56) AND col1 < 34.71)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_963 UNION SELECT pk, col0 FROM view_2_tab4_963
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 56) AND col1 < 34.71 ) AS tab4_963
----
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_963
----
8

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE (col0 < 56) AND col1 < 34.71
----
8

statement ok
DROP VIEW view_1_tab4_963

statement ok
DROP VIEW view_2_tab4_963

statement ok
DROP VIEW view_3_tab4_963

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_964 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 60

statement ok
CREATE VIEW view_2_tab0_964 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 60)

statement ok
CREATE VIEW view_3_tab0_964 AS SELECT pk FROM view_1_tab0_964

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 60
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 60)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_964
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_964
----
10 values hashing to 022211ed41460b584f5000d1308d184f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_964 UNION ALL SELECT pk, col0 FROM view_2_tab0_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_964 UNION SELECT pk, col0 FROM view_2_tab0_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 60 ) AS tab0_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE col0 <= 60
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab0_964

statement ok
DROP VIEW view_2_tab0_964

statement ok
DROP VIEW view_3_tab0_964

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_964 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 60

statement ok
CREATE VIEW view_2_tab1_964 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 60)

statement ok
CREATE VIEW view_3_tab1_964 AS SELECT pk FROM view_1_tab1_964

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 60
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 60)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_964
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_964
----
10 values hashing to 022211ed41460b584f5000d1308d184f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_964 UNION ALL SELECT pk, col0 FROM view_2_tab1_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_964 UNION SELECT pk, col0 FROM view_2_tab1_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 60 ) AS tab1_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE col0 <= 60
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab1_964

statement ok
DROP VIEW view_2_tab1_964

statement ok
DROP VIEW view_3_tab1_964

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_964 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 60

statement ok
CREATE VIEW view_2_tab2_964 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 60)

statement ok
CREATE VIEW view_3_tab2_964 AS SELECT pk FROM view_1_tab2_964

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 60
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 60)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_964
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_964
----
10 values hashing to 022211ed41460b584f5000d1308d184f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_964 UNION ALL SELECT pk, col0 FROM view_2_tab2_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_964 UNION SELECT pk, col0 FROM view_2_tab2_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 60 ) AS tab2_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE col0 <= 60
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab2_964

statement ok
DROP VIEW view_2_tab2_964

statement ok
DROP VIEW view_3_tab2_964

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_964 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 60

statement ok
CREATE VIEW view_2_tab3_964 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 60)

statement ok
CREATE VIEW view_3_tab3_964 AS SELECT pk FROM view_1_tab3_964

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 60
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 60)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_964
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_964
----
10 values hashing to 022211ed41460b584f5000d1308d184f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_964 UNION ALL SELECT pk, col0 FROM view_2_tab3_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_964 UNION SELECT pk, col0 FROM view_2_tab3_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 60 ) AS tab3_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE col0 <= 60
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab3_964

statement ok
DROP VIEW view_2_tab3_964

statement ok
DROP VIEW view_3_tab3_964

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_964 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 60

statement ok
CREATE VIEW view_2_tab4_964 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 60)

statement ok
CREATE VIEW view_3_tab4_964 AS SELECT pk FROM view_1_tab4_964

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 60
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 60)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_964
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_964
----
10 values hashing to 022211ed41460b584f5000d1308d184f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_964 UNION ALL SELECT pk, col0 FROM view_2_tab4_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_964 UNION SELECT pk, col0 FROM view_2_tab4_964
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 60 ) AS tab4_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_964
----
1
3
6
8
9

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE col0 <= 60
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab4_964

statement ok
DROP VIEW view_2_tab4_964

statement ok
DROP VIEW view_3_tab4_964

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_965 AS SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 31 AND 31)

statement ok
CREATE VIEW view_2_tab0_965 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 31 AND 31))

statement ok
CREATE VIEW view_3_tab0_965 AS SELECT pk FROM view_1_tab0_965

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 31 AND 31)
----

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_965
----

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_965 UNION ALL SELECT pk, col0 FROM view_2_tab0_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 31 AND 31) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_965 UNION SELECT pk, col0 FROM view_2_tab0_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 31 AND 31) ) AS tab0_965
----

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_965
----

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE (col0 BETWEEN 31 AND 31)
----

statement ok
DROP VIEW view_1_tab0_965

statement ok
DROP VIEW view_2_tab0_965

statement ok
DROP VIEW view_3_tab0_965

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_965 AS SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 31 AND 31)

statement ok
CREATE VIEW view_2_tab1_965 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 31 AND 31))

statement ok
CREATE VIEW view_3_tab1_965 AS SELECT pk FROM view_1_tab1_965

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 31 AND 31)
----

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_965
----

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_965 UNION ALL SELECT pk, col0 FROM view_2_tab1_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 31 AND 31) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_965 UNION SELECT pk, col0 FROM view_2_tab1_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 31 AND 31) ) AS tab1_965
----

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_965
----

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE (col0 BETWEEN 31 AND 31)
----

statement ok
DROP VIEW view_1_tab1_965

statement ok
DROP VIEW view_2_tab1_965

statement ok
DROP VIEW view_3_tab1_965

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_965 AS SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 31 AND 31)

statement ok
CREATE VIEW view_2_tab2_965 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 31 AND 31))

statement ok
CREATE VIEW view_3_tab2_965 AS SELECT pk FROM view_1_tab2_965

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 31 AND 31)
----

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_965
----

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_965 UNION ALL SELECT pk, col0 FROM view_2_tab2_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 31 AND 31) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_965 UNION SELECT pk, col0 FROM view_2_tab2_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 31 AND 31) ) AS tab2_965
----

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_965
----

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE (col0 BETWEEN 31 AND 31)
----

statement ok
DROP VIEW view_1_tab2_965

statement ok
DROP VIEW view_2_tab2_965

statement ok
DROP VIEW view_3_tab2_965

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_965 AS SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 31 AND 31)

statement ok
CREATE VIEW view_2_tab3_965 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 31 AND 31))

statement ok
CREATE VIEW view_3_tab3_965 AS SELECT pk FROM view_1_tab3_965

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 31 AND 31)
----

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_965
----

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_965 UNION ALL SELECT pk, col0 FROM view_2_tab3_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 31 AND 31) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_965 UNION SELECT pk, col0 FROM view_2_tab3_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 31 AND 31) ) AS tab3_965
----

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_965
----

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE (col0 BETWEEN 31 AND 31)
----

statement ok
DROP VIEW view_1_tab3_965

statement ok
DROP VIEW view_2_tab3_965

statement ok
DROP VIEW view_3_tab3_965

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_965 AS SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 31 AND 31)

statement ok
CREATE VIEW view_2_tab4_965 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 31 AND 31))

statement ok
CREATE VIEW view_3_tab4_965 AS SELECT pk FROM view_1_tab4_965

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 31 AND 31)
----

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_965
----

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_965 UNION ALL SELECT pk, col0 FROM view_2_tab4_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 31 AND 31) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 31 AND 31))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_965 UNION SELECT pk, col0 FROM view_2_tab4_965
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 31 AND 31) ) AS tab4_965
----

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_965
----

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE (col0 BETWEEN 31 AND 31)
----

statement ok
DROP VIEW view_1_tab4_965

statement ok
DROP VIEW view_2_tab4_965

statement ok
DROP VIEW view_3_tab4_965

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_966 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 < 54

statement ok
CREATE VIEW view_2_tab0_966 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 < 54)

statement ok
CREATE VIEW view_3_tab0_966 AS SELECT pk FROM view_1_tab0_966

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_966
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_966
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 < 54 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_966 UNION ALL SELECT pk, col0 FROM view_2_tab0_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 < 54 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_966 UNION SELECT pk, col0 FROM view_2_tab0_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 < 54 ) AS tab0_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col0 IS NULL OR col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab0_966

statement ok
DROP VIEW view_2_tab0_966

statement ok
DROP VIEW view_3_tab0_966

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_966 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 < 54

statement ok
CREATE VIEW view_2_tab1_966 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 < 54)

statement ok
CREATE VIEW view_3_tab1_966 AS SELECT pk FROM view_1_tab1_966

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_966
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_966
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 < 54 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_966 UNION ALL SELECT pk, col0 FROM view_2_tab1_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 < 54 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_966 UNION SELECT pk, col0 FROM view_2_tab1_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 < 54 ) AS tab1_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col0 IS NULL OR col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab1_966

statement ok
DROP VIEW view_2_tab1_966

statement ok
DROP VIEW view_3_tab1_966

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_966 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 < 54

statement ok
CREATE VIEW view_2_tab2_966 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 < 54)

statement ok
CREATE VIEW view_3_tab2_966 AS SELECT pk FROM view_1_tab2_966

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_966
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_966
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 < 54 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_966 UNION ALL SELECT pk, col0 FROM view_2_tab2_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 < 54 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_966 UNION SELECT pk, col0 FROM view_2_tab2_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 < 54 ) AS tab2_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col0 IS NULL OR col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab2_966

statement ok
DROP VIEW view_2_tab2_966

statement ok
DROP VIEW view_3_tab2_966

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_966 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 < 54

statement ok
CREATE VIEW view_2_tab3_966 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 < 54)

statement ok
CREATE VIEW view_3_tab3_966 AS SELECT pk FROM view_1_tab3_966

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_966
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_966
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 < 54 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_966 UNION ALL SELECT pk, col0 FROM view_2_tab3_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 < 54 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_966 UNION SELECT pk, col0 FROM view_2_tab3_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 < 54 ) AS tab3_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col0 IS NULL OR col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab3_966

statement ok
DROP VIEW view_2_tab3_966

statement ok
DROP VIEW view_3_tab3_966

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_966 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 < 54

statement ok
CREATE VIEW view_2_tab4_966 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 < 54)

statement ok
CREATE VIEW view_3_tab4_966 AS SELECT pk FROM view_1_tab4_966

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_966
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_966
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 < 54 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_966 UNION ALL SELECT pk, col0 FROM view_2_tab4_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 < 54 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_966 UNION SELECT pk, col0 FROM view_2_tab4_966
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 < 54 ) AS tab4_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_966
----
0
3
4
5
7
8

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col0 IS NULL OR col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab4_966

statement ok
DROP VIEW view_2_tab4_966

statement ok
DROP VIEW view_3_tab4_966

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_967 AS SELECT pk, col0 FROM tab0 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)

statement ok
CREATE VIEW view_2_tab0_967 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))

statement ok
CREATE VIEW view_3_tab0_967 AS SELECT pk FROM view_1_tab0_967

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
1
35
4
84
5
85
6
59

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_967
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_967
----
1
35
4
84
5
85
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_967 UNION ALL SELECT pk, col0 FROM view_2_tab0_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_967 UNION SELECT pk, col0 FROM view_2_tab0_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) ) AS tab0_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
0
2
3
7
8
9

statement ok
DROP VIEW view_1_tab0_967

statement ok
DROP VIEW view_2_tab0_967

statement ok
DROP VIEW view_3_tab0_967

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_967 AS SELECT pk, col0 FROM tab1 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)

statement ok
CREATE VIEW view_2_tab1_967 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))

statement ok
CREATE VIEW view_3_tab1_967 AS SELECT pk FROM view_1_tab1_967

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
1
35
4
84
5
85
6
59

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_967
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_967
----
1
35
4
84
5
85
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_967 UNION ALL SELECT pk, col0 FROM view_2_tab1_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_967 UNION SELECT pk, col0 FROM view_2_tab1_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) ) AS tab1_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
0
2
3
7
8
9

statement ok
DROP VIEW view_1_tab1_967

statement ok
DROP VIEW view_2_tab1_967

statement ok
DROP VIEW view_3_tab1_967

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_967 AS SELECT pk, col0 FROM tab2 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)

statement ok
CREATE VIEW view_2_tab2_967 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))

statement ok
CREATE VIEW view_3_tab2_967 AS SELECT pk FROM view_1_tab2_967

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
1
35
4
84
5
85
6
59

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_967
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_967
----
1
35
4
84
5
85
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_967 UNION ALL SELECT pk, col0 FROM view_2_tab2_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_967 UNION SELECT pk, col0 FROM view_2_tab2_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) ) AS tab2_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
0
2
3
7
8
9

statement ok
DROP VIEW view_1_tab2_967

statement ok
DROP VIEW view_2_tab2_967

statement ok
DROP VIEW view_3_tab2_967

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_967 AS SELECT pk, col0 FROM tab3 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)

statement ok
CREATE VIEW view_2_tab3_967 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))

statement ok
CREATE VIEW view_3_tab3_967 AS SELECT pk FROM view_1_tab3_967

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
1
35
4
84
5
85
6
59

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_967
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_967
----
1
35
4
84
5
85
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_967 UNION ALL SELECT pk, col0 FROM view_2_tab3_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_967 UNION SELECT pk, col0 FROM view_2_tab3_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) ) AS tab3_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
0
2
3
7
8
9

statement ok
DROP VIEW view_1_tab3_967

statement ok
DROP VIEW view_2_tab3_967

statement ok
DROP VIEW view_3_tab3_967

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_967 AS SELECT pk, col0 FROM tab4 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)

statement ok
CREATE VIEW view_2_tab4_967 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))

statement ok
CREATE VIEW view_3_tab4_967 AS SELECT pk FROM view_1_tab4_967

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
1
35
4
84
5
85
6
59

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_967
----
12 values hashing to caa97d437092f1ee2d087874dbe7f545

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_967
----
1
35
4
84
5
85
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_967 UNION ALL SELECT pk, col0 FROM view_2_tab4_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_967 UNION SELECT pk, col0 FROM view_2_tab4_967
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81) ) AS tab4_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_967
----
0
2
3
7
8
9

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE ((col3 = 47) OR col4 > 28.79 AND col3 <= 12 OR col3 > 55 AND col0 IN (58,20,34,28) OR (col4 >= 64.18) OR (col0 <= 46) AND col1 < 0.57 AND (col0 >= 54 AND ((((col4 >= 21.36) AND ((col3 <= 39) AND ((col0 = 67))) AND (((((((col0 > 22 AND col3 > 45) AND col0 < 96))))) AND col3 <= 81 OR (col3 > 88)) OR col1 = 56.32 OR col0 = 90)) AND (col1 <= 12.64 AND col3 < 75 OR ((col3 <= 94))) OR ((((col3 IS NULL)))) OR (col1 BETWEEN 24.88 AND 15.97) OR col3 BETWEEN 60 AND 24 AND col3 < 75) AND col3 BETWEEN 58 AND 57) OR col0 >= 94 AND col1 < 8.81)
----
0
2
3
7
8
9

statement ok
DROP VIEW view_1_tab4_967

statement ok
DROP VIEW view_2_tab4_967

statement ok
DROP VIEW view_3_tab4_967

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_968 AS SELECT pk, col0 FROM tab0 WHERE (col4 = 10.83)

statement ok
CREATE VIEW view_2_tab0_968 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 10.83))

statement ok
CREATE VIEW view_3_tab0_968 AS SELECT pk FROM view_1_tab0_968

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE (col4 = 10.83)
----

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_968
----

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 10.83) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_968 UNION ALL SELECT pk, col0 FROM view_2_tab0_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 10.83) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_968 UNION SELECT pk, col0 FROM view_2_tab0_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 = 10.83) ) AS tab0_968
----

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_968
----

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE (col4 = 10.83)
----

statement ok
DROP VIEW view_1_tab0_968

statement ok
DROP VIEW view_2_tab0_968

statement ok
DROP VIEW view_3_tab0_968

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_968 AS SELECT pk, col0 FROM tab1 WHERE (col4 = 10.83)

statement ok
CREATE VIEW view_2_tab1_968 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 10.83))

statement ok
CREATE VIEW view_3_tab1_968 AS SELECT pk FROM view_1_tab1_968

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE (col4 = 10.83)
----

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_968
----

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 10.83) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_968 UNION ALL SELECT pk, col0 FROM view_2_tab1_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 10.83) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_968 UNION SELECT pk, col0 FROM view_2_tab1_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 = 10.83) ) AS tab1_968
----

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_968
----

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE (col4 = 10.83)
----

statement ok
DROP VIEW view_1_tab1_968

statement ok
DROP VIEW view_2_tab1_968

statement ok
DROP VIEW view_3_tab1_968

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_968 AS SELECT pk, col0 FROM tab2 WHERE (col4 = 10.83)

statement ok
CREATE VIEW view_2_tab2_968 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 10.83))

statement ok
CREATE VIEW view_3_tab2_968 AS SELECT pk FROM view_1_tab2_968

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE (col4 = 10.83)
----

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_968
----

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 10.83) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_968 UNION ALL SELECT pk, col0 FROM view_2_tab2_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 10.83) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_968 UNION SELECT pk, col0 FROM view_2_tab2_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 = 10.83) ) AS tab2_968
----

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_968
----

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE (col4 = 10.83)
----

statement ok
DROP VIEW view_1_tab2_968

statement ok
DROP VIEW view_2_tab2_968

statement ok
DROP VIEW view_3_tab2_968

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_968 AS SELECT pk, col0 FROM tab3 WHERE (col4 = 10.83)

statement ok
CREATE VIEW view_2_tab3_968 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 10.83))

statement ok
CREATE VIEW view_3_tab3_968 AS SELECT pk FROM view_1_tab3_968

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE (col4 = 10.83)
----

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_968
----

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 10.83) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_968 UNION ALL SELECT pk, col0 FROM view_2_tab3_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 10.83) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_968 UNION SELECT pk, col0 FROM view_2_tab3_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 = 10.83) ) AS tab3_968
----

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_968
----

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE (col4 = 10.83)
----

statement ok
DROP VIEW view_1_tab3_968

statement ok
DROP VIEW view_2_tab3_968

statement ok
DROP VIEW view_3_tab3_968

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_968 AS SELECT pk, col0 FROM tab4 WHERE (col4 = 10.83)

statement ok
CREATE VIEW view_2_tab4_968 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 10.83))

statement ok
CREATE VIEW view_3_tab4_968 AS SELECT pk FROM view_1_tab4_968

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE (col4 = 10.83)
----

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_968
----

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 10.83) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_968 UNION ALL SELECT pk, col0 FROM view_2_tab4_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 10.83) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 10.83))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_968 UNION SELECT pk, col0 FROM view_2_tab4_968
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 = 10.83) ) AS tab4_968
----

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_968
----

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE (col4 = 10.83)
----

statement ok
DROP VIEW view_1_tab4_968

statement ok
DROP VIEW view_2_tab4_968

statement ok
DROP VIEW view_3_tab4_968

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_969 AS SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL))

statement ok
CREATE VIEW view_2_tab0_969 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_969 AS SELECT pk FROM view_1_tab0_969

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL))
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_969
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_969 UNION ALL SELECT pk, col0 FROM view_2_tab0_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_969 UNION SELECT pk, col0 FROM view_2_tab0_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 IS NULL)) ) AS tab0_969
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_969
----

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE ((col1 IS NULL))
----

statement ok
DROP VIEW view_1_tab0_969

statement ok
DROP VIEW view_2_tab0_969

statement ok
DROP VIEW view_3_tab0_969

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_969 AS SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL))

statement ok
CREATE VIEW view_2_tab1_969 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_969 AS SELECT pk FROM view_1_tab1_969

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL))
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_969
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_969 UNION ALL SELECT pk, col0 FROM view_2_tab1_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_969 UNION SELECT pk, col0 FROM view_2_tab1_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 IS NULL)) ) AS tab1_969
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_969
----

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE ((col1 IS NULL))
----

statement ok
DROP VIEW view_1_tab1_969

statement ok
DROP VIEW view_2_tab1_969

statement ok
DROP VIEW view_3_tab1_969

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_969 AS SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL))

statement ok
CREATE VIEW view_2_tab2_969 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_969 AS SELECT pk FROM view_1_tab2_969

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL))
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_969
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_969 UNION ALL SELECT pk, col0 FROM view_2_tab2_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_969 UNION SELECT pk, col0 FROM view_2_tab2_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 IS NULL)) ) AS tab2_969
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_969
----

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE ((col1 IS NULL))
----

statement ok
DROP VIEW view_1_tab2_969

statement ok
DROP VIEW view_2_tab2_969

statement ok
DROP VIEW view_3_tab2_969

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_969 AS SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL))

statement ok
CREATE VIEW view_2_tab3_969 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_969 AS SELECT pk FROM view_1_tab3_969

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL))
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_969
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_969 UNION ALL SELECT pk, col0 FROM view_2_tab3_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_969 UNION SELECT pk, col0 FROM view_2_tab3_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 IS NULL)) ) AS tab3_969
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_969
----

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE ((col1 IS NULL))
----

statement ok
DROP VIEW view_1_tab3_969

statement ok
DROP VIEW view_2_tab3_969

statement ok
DROP VIEW view_3_tab3_969

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_969 AS SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL))

statement ok
CREATE VIEW view_2_tab4_969 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_969 AS SELECT pk FROM view_1_tab4_969

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL))
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_969
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_969 UNION ALL SELECT pk, col0 FROM view_2_tab4_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_969 UNION SELECT pk, col0 FROM view_2_tab4_969
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 IS NULL)) ) AS tab4_969
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_969
----

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE ((col1 IS NULL))
----

statement ok
DROP VIEW view_1_tab4_969

statement ok
DROP VIEW view_2_tab4_969

statement ok
DROP VIEW view_3_tab4_969

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_970 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 86) AND col3 >= 23

statement ok
CREATE VIEW view_2_tab0_970 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 86) AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab0_970 AS SELECT pk FROM view_1_tab0_970

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 86) AND col3 >= 23
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
0
87
3
18

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_970
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_970
----
0
87
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 86) AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_970 UNION ALL SELECT pk, col0 FROM view_2_tab0_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 86) AND col3 >= 23 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_970 UNION SELECT pk, col0 FROM view_2_tab0_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 86) AND col3 >= 23 ) AS tab0_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE (col0 < 86) AND col3 >= 23
----
1
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_970

statement ok
DROP VIEW view_2_tab0_970

statement ok
DROP VIEW view_3_tab0_970

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_970 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 86) AND col3 >= 23

statement ok
CREATE VIEW view_2_tab1_970 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 86) AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab1_970 AS SELECT pk FROM view_1_tab1_970

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 86) AND col3 >= 23
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
0
87
3
18

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_970
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_970
----
0
87
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 86) AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_970 UNION ALL SELECT pk, col0 FROM view_2_tab1_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 86) AND col3 >= 23 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_970 UNION SELECT pk, col0 FROM view_2_tab1_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 86) AND col3 >= 23 ) AS tab1_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE (col0 < 86) AND col3 >= 23
----
1
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_970

statement ok
DROP VIEW view_2_tab1_970

statement ok
DROP VIEW view_3_tab1_970

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

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

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

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_970') DROP VIEW view_3_tab2_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_970

statement ok
CREATE VIEW view_1_tab2_970 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 86) AND col3 >= 23

statement ok
CREATE VIEW view_2_tab2_970 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 86) AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab2_970 AS SELECT pk FROM view_1_tab2_970

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 86) AND col3 >= 23
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
0
87
3
18

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_970
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_970
----
0
87
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 86) AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_970 UNION ALL SELECT pk, col0 FROM view_2_tab2_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 86) AND col3 >= 23 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_970 UNION SELECT pk, col0 FROM view_2_tab2_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 86) AND col3 >= 23 ) AS tab2_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE (col0 < 86) AND col3 >= 23
----
1
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_970

statement ok
DROP VIEW view_2_tab2_970

statement ok
DROP VIEW view_3_tab2_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_970') DROP VIEW view_1_tab3_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_970') DROP VIEW view_2_tab3_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_970') DROP VIEW view_3_tab3_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_970

statement ok
CREATE VIEW view_1_tab3_970 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 86) AND col3 >= 23

statement ok
CREATE VIEW view_2_tab3_970 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 86) AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab3_970 AS SELECT pk FROM view_1_tab3_970

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 86) AND col3 >= 23
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
0
87
3
18

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_970
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_970
----
0
87
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 86) AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_970 UNION ALL SELECT pk, col0 FROM view_2_tab3_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 86) AND col3 >= 23 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_970 UNION SELECT pk, col0 FROM view_2_tab3_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 86) AND col3 >= 23 ) AS tab3_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE (col0 < 86) AND col3 >= 23
----
1
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_970

statement ok
DROP VIEW view_2_tab3_970

statement ok
DROP VIEW view_3_tab3_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_970') DROP VIEW view_1_tab4_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_970') DROP VIEW view_2_tab4_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_970') DROP VIEW view_3_tab4_970

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_970

statement ok
CREATE VIEW view_1_tab4_970 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 86) AND col3 >= 23

statement ok
CREATE VIEW view_2_tab4_970 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 86) AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab4_970 AS SELECT pk FROM view_1_tab4_970

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 86) AND col3 >= 23
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
0
87
3
18

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_970
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_970
----
0
87
3
18

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 86) AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_970 UNION ALL SELECT pk, col0 FROM view_2_tab4_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 86) AND col3 >= 23 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 86) AND col3 >= 23)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_970 UNION SELECT pk, col0 FROM view_2_tab4_970
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 86) AND col3 >= 23 ) AS tab4_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_970
----
1
2
4
5
6
7
8
9

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE (col0 < 86) AND col3 >= 23
----
1
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_970

statement ok
DROP VIEW view_2_tab4_970

statement ok
DROP VIEW view_3_tab4_970

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_971') DROP VIEW view_1_tab0_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_971') DROP VIEW view_2_tab0_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_971') DROP VIEW view_3_tab0_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_971

statement ok
CREATE VIEW view_1_tab0_971 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 37

statement ok
CREATE VIEW view_2_tab0_971 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 37)

statement ok
CREATE VIEW view_3_tab0_971 AS SELECT pk FROM view_1_tab0_971

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 37
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 37)
----
1
35
3
18
8
30
9
0

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_971
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_971
----
1
35
3
18
8
30
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 37 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_971 UNION ALL SELECT pk, col0 FROM view_2_tab0_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 37 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_971 UNION SELECT pk, col0 FROM view_2_tab0_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 37 ) AS tab0_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col0 >= 37
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab0_971

statement ok
DROP VIEW view_2_tab0_971

statement ok
DROP VIEW view_3_tab0_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_971') DROP VIEW view_1_tab1_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_971') DROP VIEW view_2_tab1_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_971') DROP VIEW view_3_tab1_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_971

statement ok
CREATE VIEW view_1_tab1_971 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 37

statement ok
CREATE VIEW view_2_tab1_971 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 37)

statement ok
CREATE VIEW view_3_tab1_971 AS SELECT pk FROM view_1_tab1_971

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 37
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 37)
----
1
35
3
18
8
30
9
0

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_971
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_971
----
1
35
3
18
8
30
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 37 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_971 UNION ALL SELECT pk, col0 FROM view_2_tab1_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 37 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_971 UNION SELECT pk, col0 FROM view_2_tab1_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 37 ) AS tab1_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col0 >= 37
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab1_971

statement ok
DROP VIEW view_2_tab1_971

statement ok
DROP VIEW view_3_tab1_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_971') DROP VIEW view_1_tab2_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_971') DROP VIEW view_2_tab2_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_971') DROP VIEW view_3_tab2_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_971

statement ok
CREATE VIEW view_1_tab2_971 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 37

statement ok
CREATE VIEW view_2_tab2_971 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 37)

statement ok
CREATE VIEW view_3_tab2_971 AS SELECT pk FROM view_1_tab2_971

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 37
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 37)
----
1
35
3
18
8
30
9
0

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_971
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_971
----
1
35
3
18
8
30
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 37 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_971 UNION ALL SELECT pk, col0 FROM view_2_tab2_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 37 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_971 UNION SELECT pk, col0 FROM view_2_tab2_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 37 ) AS tab2_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col0 >= 37
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab2_971

statement ok
DROP VIEW view_2_tab2_971

statement ok
DROP VIEW view_3_tab2_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_971') DROP VIEW view_1_tab3_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_971') DROP VIEW view_2_tab3_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_971') DROP VIEW view_3_tab3_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_971

statement ok
CREATE VIEW view_1_tab3_971 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 37

statement ok
CREATE VIEW view_2_tab3_971 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 37)

statement ok
CREATE VIEW view_3_tab3_971 AS SELECT pk FROM view_1_tab3_971

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 37
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 37)
----
1
35
3
18
8
30
9
0

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_971
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_971
----
1
35
3
18
8
30
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 37 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_971 UNION ALL SELECT pk, col0 FROM view_2_tab3_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 37 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_971 UNION SELECT pk, col0 FROM view_2_tab3_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 37 ) AS tab3_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col0 >= 37
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab3_971

statement ok
DROP VIEW view_2_tab3_971

statement ok
DROP VIEW view_3_tab3_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_971') DROP VIEW view_1_tab4_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_971') DROP VIEW view_2_tab4_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_971') DROP VIEW view_3_tab4_971

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_971

statement ok
CREATE VIEW view_1_tab4_971 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 37

statement ok
CREATE VIEW view_2_tab4_971 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 37)

statement ok
CREATE VIEW view_3_tab4_971 AS SELECT pk FROM view_1_tab4_971

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 37
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 37)
----
1
35
3
18
8
30
9
0

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_971
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_971
----
1
35
3
18
8
30
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 37 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_971 UNION ALL SELECT pk, col0 FROM view_2_tab4_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 37 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 37)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_971 UNION SELECT pk, col0 FROM view_2_tab4_971
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 37 ) AS tab4_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_971
----
0
2
4
5
6
7

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col0 >= 37
----
0
2
4
5
6
7

statement ok
DROP VIEW view_1_tab4_971

statement ok
DROP VIEW view_2_tab4_971

statement ok
DROP VIEW view_3_tab4_971

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_972') DROP VIEW view_1_tab0_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_972') DROP VIEW view_2_tab0_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_972') DROP VIEW view_3_tab0_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_972

statement ok
CREATE VIEW view_1_tab0_972 AS SELECT pk, col0 FROM tab0 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99

statement ok
CREATE VIEW view_2_tab0_972 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)

statement ok
CREATE VIEW view_3_tab0_972 AS SELECT pk FROM view_1_tab0_972

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_972
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_972 UNION ALL SELECT pk, col0 FROM view_2_tab0_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_972 UNION SELECT pk, col0 FROM view_2_tab0_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 ) AS tab0_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_972

statement ok
DROP VIEW view_2_tab0_972

statement ok
DROP VIEW view_3_tab0_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_972') DROP VIEW view_1_tab1_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_972') DROP VIEW view_2_tab1_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_972') DROP VIEW view_3_tab1_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_972

statement ok
CREATE VIEW view_1_tab1_972 AS SELECT pk, col0 FROM tab1 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99

statement ok
CREATE VIEW view_2_tab1_972 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)

statement ok
CREATE VIEW view_3_tab1_972 AS SELECT pk FROM view_1_tab1_972

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_972
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_972 UNION ALL SELECT pk, col0 FROM view_2_tab1_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_972 UNION SELECT pk, col0 FROM view_2_tab1_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 ) AS tab1_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_972

statement ok
DROP VIEW view_2_tab1_972

statement ok
DROP VIEW view_3_tab1_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_972') DROP VIEW view_1_tab2_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_972') DROP VIEW view_2_tab2_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_972') DROP VIEW view_3_tab2_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_972

statement ok
CREATE VIEW view_1_tab2_972 AS SELECT pk, col0 FROM tab2 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99

statement ok
CREATE VIEW view_2_tab2_972 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)

statement ok
CREATE VIEW view_3_tab2_972 AS SELECT pk FROM view_1_tab2_972

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_972
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_972 UNION ALL SELECT pk, col0 FROM view_2_tab2_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_972 UNION SELECT pk, col0 FROM view_2_tab2_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 ) AS tab2_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_972

statement ok
DROP VIEW view_2_tab2_972

statement ok
DROP VIEW view_3_tab2_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_972') DROP VIEW view_1_tab3_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_972') DROP VIEW view_2_tab3_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_972') DROP VIEW view_3_tab3_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_972

statement ok
CREATE VIEW view_1_tab3_972 AS SELECT pk, col0 FROM tab3 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99

statement ok
CREATE VIEW view_2_tab3_972 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)

statement ok
CREATE VIEW view_3_tab3_972 AS SELECT pk FROM view_1_tab3_972

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_972
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_972 UNION ALL SELECT pk, col0 FROM view_2_tab3_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_972 UNION SELECT pk, col0 FROM view_2_tab3_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 ) AS tab3_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_972

statement ok
DROP VIEW view_2_tab3_972

statement ok
DROP VIEW view_3_tab3_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_972') DROP VIEW view_1_tab4_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_972') DROP VIEW view_2_tab4_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_972') DROP VIEW view_3_tab4_972

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_972

statement ok
CREATE VIEW view_1_tab4_972 AS SELECT pk, col0 FROM tab4 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99

statement ok
CREATE VIEW view_2_tab4_972 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)

statement ok
CREATE VIEW view_3_tab4_972 AS SELECT pk FROM view_1_tab4_972

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_972
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_972 UNION ALL SELECT pk, col0 FROM view_2_tab4_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_972 UNION SELECT pk, col0 FROM view_2_tab4_972
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99 ) AS tab4_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_972
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE ((((col4 < 66.39 AND (col3 BETWEEN 98 AND 12 AND col4 = 54.28 OR (col0 <= 33)) AND ((col3 > 12) AND col3 > 41) OR col3 IS NULL OR col4 >= 59.96 OR (col0 IS NULL) OR col3 > 38 AND (col0 < 63 OR col3 > 15) AND (col0 <= 60) AND col1 > 54.59 AND (col1 > 35.58) OR col0 > 50) AND col0 >= 90) OR col3 >= 66)) AND col1 BETWEEN 78.56 AND 62.45 OR ((col0 < 91)) OR col3 >= 6 OR col0 > 54 OR ((col4 >= 72.56 AND col1 > 69.83)) OR col3 < 28 OR col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_972

statement ok
DROP VIEW view_2_tab4_972

statement ok
DROP VIEW view_3_tab4_972

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_973') DROP VIEW view_1_tab0_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_973') DROP VIEW view_2_tab0_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_973') DROP VIEW view_3_tab0_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_973

statement ok
CREATE VIEW view_1_tab0_973 AS SELECT pk, col0 FROM tab0 WHERE col0 > 17

statement ok
CREATE VIEW view_2_tab0_973 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 17)

statement ok
CREATE VIEW view_3_tab0_973 AS SELECT pk FROM view_1_tab0_973

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE col0 > 17
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 17)
----
9
0

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_973
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_973
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 17 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_973 UNION ALL SELECT pk, col0 FROM view_2_tab0_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 17 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_973 UNION SELECT pk, col0 FROM view_2_tab0_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 17 ) AS tab0_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE col0 > 17
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab0_973

statement ok
DROP VIEW view_2_tab0_973

statement ok
DROP VIEW view_3_tab0_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_973') DROP VIEW view_1_tab1_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_973') DROP VIEW view_2_tab1_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_973') DROP VIEW view_3_tab1_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_973

statement ok
CREATE VIEW view_1_tab1_973 AS SELECT pk, col0 FROM tab1 WHERE col0 > 17

statement ok
CREATE VIEW view_2_tab1_973 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 17)

statement ok
CREATE VIEW view_3_tab1_973 AS SELECT pk FROM view_1_tab1_973

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE col0 > 17
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 17)
----
9
0

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_973
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_973
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 17 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_973 UNION ALL SELECT pk, col0 FROM view_2_tab1_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 17 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_973 UNION SELECT pk, col0 FROM view_2_tab1_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 17 ) AS tab1_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE col0 > 17
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab1_973

statement ok
DROP VIEW view_2_tab1_973

statement ok
DROP VIEW view_3_tab1_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_973') DROP VIEW view_1_tab2_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_973') DROP VIEW view_2_tab2_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_973') DROP VIEW view_3_tab2_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_973

statement ok
CREATE VIEW view_1_tab2_973 AS SELECT pk, col0 FROM tab2 WHERE col0 > 17

statement ok
CREATE VIEW view_2_tab2_973 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 17)

statement ok
CREATE VIEW view_3_tab2_973 AS SELECT pk FROM view_1_tab2_973

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE col0 > 17
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 17)
----
9
0

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_973
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_973
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 17 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_973 UNION ALL SELECT pk, col0 FROM view_2_tab2_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 17 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_973 UNION SELECT pk, col0 FROM view_2_tab2_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 17 ) AS tab2_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE col0 > 17
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab2_973

statement ok
DROP VIEW view_2_tab2_973

statement ok
DROP VIEW view_3_tab2_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_973') DROP VIEW view_1_tab3_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_973') DROP VIEW view_2_tab3_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_973') DROP VIEW view_3_tab3_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_973

statement ok
CREATE VIEW view_1_tab3_973 AS SELECT pk, col0 FROM tab3 WHERE col0 > 17

statement ok
CREATE VIEW view_2_tab3_973 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 17)

statement ok
CREATE VIEW view_3_tab3_973 AS SELECT pk FROM view_1_tab3_973

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE col0 > 17
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 17)
----
9
0

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_973
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_973
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 17 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_973 UNION ALL SELECT pk, col0 FROM view_2_tab3_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 17 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_973 UNION SELECT pk, col0 FROM view_2_tab3_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 17 ) AS tab3_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE col0 > 17
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab3_973

statement ok
DROP VIEW view_2_tab3_973

statement ok
DROP VIEW view_3_tab3_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_973') DROP VIEW view_1_tab4_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_973') DROP VIEW view_2_tab4_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_973') DROP VIEW view_3_tab4_973

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_973

statement ok
CREATE VIEW view_1_tab4_973 AS SELECT pk, col0 FROM tab4 WHERE col0 > 17

statement ok
CREATE VIEW view_2_tab4_973 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 17)

statement ok
CREATE VIEW view_3_tab4_973 AS SELECT pk FROM view_1_tab4_973

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE col0 > 17
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 17)
----
9
0

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_973
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_973
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 17 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_973 UNION ALL SELECT pk, col0 FROM view_2_tab4_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 17 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 17)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_973 UNION SELECT pk, col0 FROM view_2_tab4_973
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 17 ) AS tab4_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_973
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE col0 > 17
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab4_973

statement ok
DROP VIEW view_2_tab4_973

statement ok
DROP VIEW view_3_tab4_973

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_974') DROP VIEW view_1_tab0_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_974') DROP VIEW view_2_tab0_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_974') DROP VIEW view_3_tab0_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_974

statement ok
CREATE VIEW view_1_tab0_974 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)

statement ok
CREATE VIEW view_2_tab0_974 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))

statement ok
CREATE VIEW view_3_tab0_974 AS SELECT pk FROM view_1_tab0_974

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_974
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_974 UNION ALL SELECT pk, col0 FROM view_2_tab0_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_974 UNION SELECT pk, col0 FROM view_2_tab0_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) ) AS tab0_974
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_974
----

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

statement ok
DROP VIEW view_1_tab0_974

statement ok
DROP VIEW view_2_tab0_974

statement ok
DROP VIEW view_3_tab0_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_974') DROP VIEW view_1_tab1_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_974') DROP VIEW view_2_tab1_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_974') DROP VIEW view_3_tab1_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_974

statement ok
CREATE VIEW view_1_tab1_974 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)

statement ok
CREATE VIEW view_2_tab1_974 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))

statement ok
CREATE VIEW view_3_tab1_974 AS SELECT pk FROM view_1_tab1_974

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_974
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_974 UNION ALL SELECT pk, col0 FROM view_2_tab1_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_974 UNION SELECT pk, col0 FROM view_2_tab1_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) ) AS tab1_974
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_974
----

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

statement ok
DROP VIEW view_1_tab1_974

statement ok
DROP VIEW view_2_tab1_974

statement ok
DROP VIEW view_3_tab1_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_974') DROP VIEW view_1_tab2_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_974') DROP VIEW view_2_tab2_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_974') DROP VIEW view_3_tab2_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_974

statement ok
CREATE VIEW view_1_tab2_974 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)

statement ok
CREATE VIEW view_2_tab2_974 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))

statement ok
CREATE VIEW view_3_tab2_974 AS SELECT pk FROM view_1_tab2_974

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_974
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_974 UNION ALL SELECT pk, col0 FROM view_2_tab2_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_974 UNION SELECT pk, col0 FROM view_2_tab2_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) ) AS tab2_974
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_974
----

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

statement ok
DROP VIEW view_1_tab2_974

statement ok
DROP VIEW view_2_tab2_974

statement ok
DROP VIEW view_3_tab2_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_974') DROP VIEW view_1_tab3_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_974') DROP VIEW view_2_tab3_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_974') DROP VIEW view_3_tab3_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_974

statement ok
CREATE VIEW view_1_tab3_974 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)

statement ok
CREATE VIEW view_2_tab3_974 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))

statement ok
CREATE VIEW view_3_tab3_974 AS SELECT pk FROM view_1_tab3_974

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_974
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_974 UNION ALL SELECT pk, col0 FROM view_2_tab3_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_974 UNION SELECT pk, col0 FROM view_2_tab3_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) ) AS tab3_974
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_974
----

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

statement ok
DROP VIEW view_1_tab3_974

statement ok
DROP VIEW view_2_tab3_974

statement ok
DROP VIEW view_3_tab3_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_974') DROP VIEW view_1_tab4_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_974') DROP VIEW view_2_tab4_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_974') DROP VIEW view_3_tab4_974

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_974

statement ok
CREATE VIEW view_1_tab4_974 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)

statement ok
CREATE VIEW view_2_tab4_974 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))

statement ok
CREATE VIEW view_3_tab4_974 AS SELECT pk FROM view_1_tab4_974

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_974
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_974 UNION ALL SELECT pk, col0 FROM view_2_tab4_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 93 OR col3 = 98 OR col4 > 97.33))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_974 UNION SELECT pk, col0 FROM view_2_tab4_974
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33) ) AS tab4_974
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_974
----

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE (col0 > 93 OR col3 = 98 OR col4 > 97.33)
----

statement ok
DROP VIEW view_1_tab4_974

statement ok
DROP VIEW view_2_tab4_974

statement ok
DROP VIEW view_3_tab4_974

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_975') DROP VIEW view_1_tab0_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_975') DROP VIEW view_2_tab0_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_975') DROP VIEW view_3_tab0_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_975

statement ok
CREATE VIEW view_1_tab0_975 AS SELECT pk, col0 FROM tab0 WHERE col1 > 60.69

statement ok
CREATE VIEW view_2_tab0_975 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 60.69)

statement ok
CREATE VIEW view_3_tab0_975 AS SELECT pk FROM view_1_tab0_975

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE col1 > 60.69
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 60.69)
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_975
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_975
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 60.69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_975 UNION ALL SELECT pk, col0 FROM view_2_tab0_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 60.69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_975 UNION SELECT pk, col0 FROM view_2_tab0_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 60.69 ) AS tab0_975
----
3
7
9

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_975
----
3
7
9

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE col1 > 60.69
----
3
7
9

statement ok
DROP VIEW view_1_tab0_975

statement ok
DROP VIEW view_2_tab0_975

statement ok
DROP VIEW view_3_tab0_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_975') DROP VIEW view_1_tab1_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_975') DROP VIEW view_2_tab1_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_975') DROP VIEW view_3_tab1_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_975

statement ok
CREATE VIEW view_1_tab1_975 AS SELECT pk, col0 FROM tab1 WHERE col1 > 60.69

statement ok
CREATE VIEW view_2_tab1_975 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 60.69)

statement ok
CREATE VIEW view_3_tab1_975 AS SELECT pk FROM view_1_tab1_975

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE col1 > 60.69
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 60.69)
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_975
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_975
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 60.69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_975 UNION ALL SELECT pk, col0 FROM view_2_tab1_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 60.69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_975 UNION SELECT pk, col0 FROM view_2_tab1_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 60.69 ) AS tab1_975
----
3
7
9

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_975
----
3
7
9

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE col1 > 60.69
----
3
7
9

statement ok
DROP VIEW view_1_tab1_975

statement ok
DROP VIEW view_2_tab1_975

statement ok
DROP VIEW view_3_tab1_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_975') DROP VIEW view_1_tab2_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_975') DROP VIEW view_2_tab2_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_975') DROP VIEW view_3_tab2_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_975

statement ok
CREATE VIEW view_1_tab2_975 AS SELECT pk, col0 FROM tab2 WHERE col1 > 60.69

statement ok
CREATE VIEW view_2_tab2_975 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 60.69)

statement ok
CREATE VIEW view_3_tab2_975 AS SELECT pk FROM view_1_tab2_975

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE col1 > 60.69
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 60.69)
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_975
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_975
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 60.69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_975 UNION ALL SELECT pk, col0 FROM view_2_tab2_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 60.69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_975 UNION SELECT pk, col0 FROM view_2_tab2_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 60.69 ) AS tab2_975
----
3
7
9

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_975
----
3
7
9

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE col1 > 60.69
----
3
7
9

statement ok
DROP VIEW view_1_tab2_975

statement ok
DROP VIEW view_2_tab2_975

statement ok
DROP VIEW view_3_tab2_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_975') DROP VIEW view_1_tab3_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_975') DROP VIEW view_2_tab3_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_975') DROP VIEW view_3_tab3_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_975

statement ok
CREATE VIEW view_1_tab3_975 AS SELECT pk, col0 FROM tab3 WHERE col1 > 60.69

statement ok
CREATE VIEW view_2_tab3_975 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 60.69)

statement ok
CREATE VIEW view_3_tab3_975 AS SELECT pk FROM view_1_tab3_975

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE col1 > 60.69
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 60.69)
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_975
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_975
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 60.69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_975 UNION ALL SELECT pk, col0 FROM view_2_tab3_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 60.69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_975 UNION SELECT pk, col0 FROM view_2_tab3_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 60.69 ) AS tab3_975
----
3
7
9

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_975
----
3
7
9

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE col1 > 60.69
----
3
7
9

statement ok
DROP VIEW view_1_tab3_975

statement ok
DROP VIEW view_2_tab3_975

statement ok
DROP VIEW view_3_tab3_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_975') DROP VIEW view_1_tab4_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_975') DROP VIEW view_2_tab4_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_975') DROP VIEW view_3_tab4_975

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_975

statement ok
CREATE VIEW view_1_tab4_975 AS SELECT pk, col0 FROM tab4 WHERE col1 > 60.69

statement ok
CREATE VIEW view_2_tab4_975 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 60.69)

statement ok
CREATE VIEW view_3_tab4_975 AS SELECT pk FROM view_1_tab4_975

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE col1 > 60.69
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 60.69)
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_975
----
3
18
7
71
9
0

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_975
----
14 values hashing to 96d5da40234ff72422ba7ec9f9e6cd54

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 60.69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_975 UNION ALL SELECT pk, col0 FROM view_2_tab4_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 60.69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 60.69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_975 UNION SELECT pk, col0 FROM view_2_tab4_975
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 60.69 ) AS tab4_975
----
3
7
9

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_975
----
3
7
9

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE col1 > 60.69
----
3
7
9

statement ok
DROP VIEW view_1_tab4_975

statement ok
DROP VIEW view_2_tab4_975

statement ok
DROP VIEW view_3_tab4_975

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_976') DROP VIEW view_1_tab0_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_976') DROP VIEW view_2_tab0_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_976') DROP VIEW view_3_tab0_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_976

statement ok
CREATE VIEW view_1_tab0_976 AS SELECT pk, col0 FROM tab0 WHERE col3 < 54

statement ok
CREATE VIEW view_2_tab0_976 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 54)

statement ok
CREATE VIEW view_3_tab0_976 AS SELECT pk FROM view_1_tab0_976

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_976
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_976
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 54 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_976 UNION ALL SELECT pk, col0 FROM view_2_tab0_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 54 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_976 UNION SELECT pk, col0 FROM view_2_tab0_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 54 ) AS tab0_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab0_976

statement ok
DROP VIEW view_2_tab0_976

statement ok
DROP VIEW view_3_tab0_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_976') DROP VIEW view_1_tab1_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_976') DROP VIEW view_2_tab1_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_976') DROP VIEW view_3_tab1_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_976

statement ok
CREATE VIEW view_1_tab1_976 AS SELECT pk, col0 FROM tab1 WHERE col3 < 54

statement ok
CREATE VIEW view_2_tab1_976 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 54)

statement ok
CREATE VIEW view_3_tab1_976 AS SELECT pk FROM view_1_tab1_976

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_976
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_976
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 54 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_976 UNION ALL SELECT pk, col0 FROM view_2_tab1_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 54 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_976 UNION SELECT pk, col0 FROM view_2_tab1_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 54 ) AS tab1_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab1_976

statement ok
DROP VIEW view_2_tab1_976

statement ok
DROP VIEW view_3_tab1_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_976') DROP VIEW view_1_tab2_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_976') DROP VIEW view_2_tab2_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_976') DROP VIEW view_3_tab2_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_976

statement ok
CREATE VIEW view_1_tab2_976 AS SELECT pk, col0 FROM tab2 WHERE col3 < 54

statement ok
CREATE VIEW view_2_tab2_976 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 54)

statement ok
CREATE VIEW view_3_tab2_976 AS SELECT pk FROM view_1_tab2_976

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_976
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_976
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 54 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_976 UNION ALL SELECT pk, col0 FROM view_2_tab2_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 54 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_976 UNION SELECT pk, col0 FROM view_2_tab2_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 54 ) AS tab2_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab2_976

statement ok
DROP VIEW view_2_tab2_976

statement ok
DROP VIEW view_3_tab2_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_976') DROP VIEW view_1_tab3_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_976') DROP VIEW view_2_tab3_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_976') DROP VIEW view_3_tab3_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_976

statement ok
CREATE VIEW view_1_tab3_976 AS SELECT pk, col0 FROM tab3 WHERE col3 < 54

statement ok
CREATE VIEW view_2_tab3_976 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 54)

statement ok
CREATE VIEW view_3_tab3_976 AS SELECT pk FROM view_1_tab3_976

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_976
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_976
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 54 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_976 UNION ALL SELECT pk, col0 FROM view_2_tab3_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 54 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_976 UNION SELECT pk, col0 FROM view_2_tab3_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 54 ) AS tab3_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab3_976

statement ok
DROP VIEW view_2_tab3_976

statement ok
DROP VIEW view_3_tab3_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_976') DROP VIEW view_1_tab4_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_976') DROP VIEW view_2_tab4_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_976') DROP VIEW view_3_tab4_976

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_976

statement ok
CREATE VIEW view_1_tab4_976 AS SELECT pk, col0 FROM tab4 WHERE col3 < 54

statement ok
CREATE VIEW view_2_tab4_976 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 54)

statement ok
CREATE VIEW view_3_tab4_976 AS SELECT pk FROM view_1_tab4_976

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE col3 < 54
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 54)
----
1
35
2
73
6
59
9
0

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_976
----
12 values hashing to faa161fb37b22b0b17dd7c27186593f3

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_976
----
1
35
2
73
6
59
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 54 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_976 UNION ALL SELECT pk, col0 FROM view_2_tab4_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 54 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 54)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_976 UNION SELECT pk, col0 FROM view_2_tab4_976
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 54 ) AS tab4_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_976
----
0
3
4
5
7
8

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE col3 < 54
----
0
3
4
5
7
8

statement ok
DROP VIEW view_1_tab4_976

statement ok
DROP VIEW view_2_tab4_976

statement ok
DROP VIEW view_3_tab4_976

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_977') DROP VIEW view_1_tab0_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_977') DROP VIEW view_2_tab0_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_977') DROP VIEW view_3_tab0_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_977

statement ok
CREATE VIEW view_1_tab0_977 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab0_977 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab0_977 AS SELECT pk FROM view_1_tab0_977

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
3
18
9
0

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_977
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_977
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_977 UNION ALL SELECT pk, col0 FROM view_2_tab0_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_977 UNION SELECT pk, col0 FROM view_2_tab0_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) ) AS tab0_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_977

statement ok
DROP VIEW view_2_tab0_977

statement ok
DROP VIEW view_3_tab0_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_977') DROP VIEW view_1_tab1_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_977') DROP VIEW view_2_tab1_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_977') DROP VIEW view_3_tab1_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_977

statement ok
CREATE VIEW view_1_tab1_977 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab1_977 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab1_977 AS SELECT pk FROM view_1_tab1_977

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
3
18
9
0

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_977
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_977
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_977 UNION ALL SELECT pk, col0 FROM view_2_tab1_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_977 UNION SELECT pk, col0 FROM view_2_tab1_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) ) AS tab1_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_977

statement ok
DROP VIEW view_2_tab1_977

statement ok
DROP VIEW view_3_tab1_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_977') DROP VIEW view_1_tab2_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_977') DROP VIEW view_2_tab2_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_977') DROP VIEW view_3_tab2_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_977

statement ok
CREATE VIEW view_1_tab2_977 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab2_977 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab2_977 AS SELECT pk FROM view_1_tab2_977

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
3
18
9
0

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_977
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_977
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_977 UNION ALL SELECT pk, col0 FROM view_2_tab2_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_977 UNION SELECT pk, col0 FROM view_2_tab2_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) ) AS tab2_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_977

statement ok
DROP VIEW view_2_tab2_977

statement ok
DROP VIEW view_3_tab2_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_977') DROP VIEW view_1_tab3_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_977') DROP VIEW view_2_tab3_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_977') DROP VIEW view_3_tab3_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_977

statement ok
CREATE VIEW view_1_tab3_977 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab3_977 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab3_977 AS SELECT pk FROM view_1_tab3_977

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
3
18
9
0

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_977
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_977
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_977 UNION ALL SELECT pk, col0 FROM view_2_tab3_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_977 UNION SELECT pk, col0 FROM view_2_tab3_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) ) AS tab3_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_977

statement ok
DROP VIEW view_2_tab3_977

statement ok
DROP VIEW view_3_tab3_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_977') DROP VIEW view_1_tab4_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_977') DROP VIEW view_2_tab4_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_977') DROP VIEW view_3_tab4_977

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_977

statement ok
CREATE VIEW view_1_tab4_977 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)

statement ok
CREATE VIEW view_2_tab4_977 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))

statement ok
CREATE VIEW view_3_tab4_977 AS SELECT pk FROM view_1_tab4_977

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
3
18
9
0

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_977
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_977
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_977 UNION ALL SELECT pk, col0 FROM view_2_tab4_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 25 OR col1 < 78.91 AND col3 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_977 UNION SELECT pk, col0 FROM view_2_tab4_977
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL) ) AS tab4_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_977
----
0
1
2
4
5
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE (col0 > 25 OR col1 < 78.91 AND col3 IS NULL)
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_977

statement ok
DROP VIEW view_2_tab4_977

statement ok
DROP VIEW view_3_tab4_977

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_978') DROP VIEW view_1_tab0_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_978') DROP VIEW view_2_tab0_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_978') DROP VIEW view_3_tab0_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_978

statement ok
CREATE VIEW view_1_tab0_978 AS SELECT pk, col0 FROM tab0 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21

statement ok
CREATE VIEW view_2_tab0_978 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)

statement ok
CREATE VIEW view_3_tab0_978 AS SELECT pk FROM view_1_tab0_978

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
3
18
9
0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_978
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_978
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_978 UNION ALL SELECT pk, col0 FROM view_2_tab0_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_978 UNION SELECT pk, col0 FROM view_2_tab0_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 ) AS tab0_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_978

statement ok
DROP VIEW view_2_tab0_978

statement ok
DROP VIEW view_3_tab0_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_978') DROP VIEW view_1_tab1_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_978') DROP VIEW view_2_tab1_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_978') DROP VIEW view_3_tab1_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_978

statement ok
CREATE VIEW view_1_tab1_978 AS SELECT pk, col0 FROM tab1 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21

statement ok
CREATE VIEW view_2_tab1_978 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)

statement ok
CREATE VIEW view_3_tab1_978 AS SELECT pk FROM view_1_tab1_978

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
3
18
9
0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_978
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_978
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_978 UNION ALL SELECT pk, col0 FROM view_2_tab1_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_978 UNION SELECT pk, col0 FROM view_2_tab1_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 ) AS tab1_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_978

statement ok
DROP VIEW view_2_tab1_978

statement ok
DROP VIEW view_3_tab1_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_978') DROP VIEW view_1_tab2_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_978') DROP VIEW view_2_tab2_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_978') DROP VIEW view_3_tab2_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_978

statement ok
CREATE VIEW view_1_tab2_978 AS SELECT pk, col0 FROM tab2 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21

statement ok
CREATE VIEW view_2_tab2_978 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)

statement ok
CREATE VIEW view_3_tab2_978 AS SELECT pk FROM view_1_tab2_978

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
3
18
9
0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_978
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_978
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_978 UNION ALL SELECT pk, col0 FROM view_2_tab2_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_978 UNION SELECT pk, col0 FROM view_2_tab2_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 ) AS tab2_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_978

statement ok
DROP VIEW view_2_tab2_978

statement ok
DROP VIEW view_3_tab2_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_978') DROP VIEW view_1_tab3_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_978') DROP VIEW view_2_tab3_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_978') DROP VIEW view_3_tab3_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_978

statement ok
CREATE VIEW view_1_tab3_978 AS SELECT pk, col0 FROM tab3 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21

statement ok
CREATE VIEW view_2_tab3_978 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)

statement ok
CREATE VIEW view_3_tab3_978 AS SELECT pk FROM view_1_tab3_978

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
3
18
9
0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_978
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_978
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_978 UNION ALL SELECT pk, col0 FROM view_2_tab3_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_978 UNION SELECT pk, col0 FROM view_2_tab3_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 ) AS tab3_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_978

statement ok
DROP VIEW view_2_tab3_978

statement ok
DROP VIEW view_3_tab3_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_978') DROP VIEW view_1_tab4_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_978') DROP VIEW view_2_tab4_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_978') DROP VIEW view_3_tab4_978

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_978

statement ok
CREATE VIEW view_1_tab4_978 AS SELECT pk, col0 FROM tab4 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21

statement ok
CREATE VIEW view_2_tab4_978 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)

statement ok
CREATE VIEW view_3_tab4_978 AS SELECT pk FROM view_1_tab4_978

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
3
18
9
0

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_978
----
16 values hashing to d8c2bc85973c74462947476140eee5e4

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_978
----
3
18
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_978 UNION ALL SELECT pk, col0 FROM view_2_tab4_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_978 UNION SELECT pk, col0 FROM view_2_tab4_978
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21 ) AS tab4_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_978
----
0
1
2
4
5
6
7
8

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col1 BETWEEN 28.63 AND 29.96 OR col0 >= 21
----
0
1
2
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_978

statement ok
DROP VIEW view_2_tab4_978

statement ok
DROP VIEW view_3_tab4_978

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_979') DROP VIEW view_1_tab0_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_979') DROP VIEW view_2_tab0_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_979') DROP VIEW view_3_tab0_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_979

statement ok
CREATE VIEW view_1_tab0_979 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)

statement ok
CREATE VIEW view_2_tab0_979 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))

statement ok
CREATE VIEW view_3_tab0_979 AS SELECT pk FROM view_1_tab0_979

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
1
35
3
18
6
59

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_979
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_979
----
1
35
3
18
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_979 UNION ALL SELECT pk, col0 FROM view_2_tab0_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_979 UNION SELECT pk, col0 FROM view_2_tab0_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) ) AS tab0_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
0
2
4
5
7
8
9

statement ok
DROP VIEW view_1_tab0_979

statement ok
DROP VIEW view_2_tab0_979

statement ok
DROP VIEW view_3_tab0_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_979') DROP VIEW view_1_tab1_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_979') DROP VIEW view_2_tab1_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_979') DROP VIEW view_3_tab1_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_979

statement ok
CREATE VIEW view_1_tab1_979 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)

statement ok
CREATE VIEW view_2_tab1_979 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))

statement ok
CREATE VIEW view_3_tab1_979 AS SELECT pk FROM view_1_tab1_979

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
1
35
3
18
6
59

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_979
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_979
----
1
35
3
18
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_979 UNION ALL SELECT pk, col0 FROM view_2_tab1_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_979 UNION SELECT pk, col0 FROM view_2_tab1_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) ) AS tab1_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
0
2
4
5
7
8
9

statement ok
DROP VIEW view_1_tab1_979

statement ok
DROP VIEW view_2_tab1_979

statement ok
DROP VIEW view_3_tab1_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_979') DROP VIEW view_1_tab2_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_979') DROP VIEW view_2_tab2_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_979') DROP VIEW view_3_tab2_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_979

statement ok
CREATE VIEW view_1_tab2_979 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)

statement ok
CREATE VIEW view_2_tab2_979 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))

statement ok
CREATE VIEW view_3_tab2_979 AS SELECT pk FROM view_1_tab2_979

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
1
35
3
18
6
59

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_979
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_979
----
1
35
3
18
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_979 UNION ALL SELECT pk, col0 FROM view_2_tab2_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_979 UNION SELECT pk, col0 FROM view_2_tab2_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) ) AS tab2_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
0
2
4
5
7
8
9

statement ok
DROP VIEW view_1_tab2_979

statement ok
DROP VIEW view_2_tab2_979

statement ok
DROP VIEW view_3_tab2_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_979') DROP VIEW view_1_tab3_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_979') DROP VIEW view_2_tab3_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_979') DROP VIEW view_3_tab3_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_979

statement ok
CREATE VIEW view_1_tab3_979 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)

statement ok
CREATE VIEW view_2_tab3_979 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))

statement ok
CREATE VIEW view_3_tab3_979 AS SELECT pk FROM view_1_tab3_979

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
1
35
3
18
6
59

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_979
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_979
----
1
35
3
18
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_979 UNION ALL SELECT pk, col0 FROM view_2_tab3_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_979 UNION SELECT pk, col0 FROM view_2_tab3_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) ) AS tab3_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
0
2
4
5
7
8
9

statement ok
DROP VIEW view_1_tab3_979

statement ok
DROP VIEW view_2_tab3_979

statement ok
DROP VIEW view_3_tab3_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_979') DROP VIEW view_1_tab4_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_979') DROP VIEW view_2_tab4_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_979') DROP VIEW view_3_tab4_979

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_979

statement ok
CREATE VIEW view_1_tab4_979 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)

statement ok
CREATE VIEW view_2_tab4_979 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))

statement ok
CREATE VIEW view_3_tab4_979 AS SELECT pk FROM view_1_tab4_979

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
1
35
3
18
6
59

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_979
----
14 values hashing to f9b14cedd2507bd737a3b38781af3783

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_979
----
1
35
3
18
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_979 UNION ALL SELECT pk, col0 FROM view_2_tab4_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_979 UNION SELECT pk, col0 FROM view_2_tab4_979
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95) ) AS tab4_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_979
----
0
2
4
5
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE (col3 > 40 AND col3 > 20 OR col0 >= 28) AND (col4 >= 36.95)
----
0
2
4
5
7
8
9

statement ok
DROP VIEW view_1_tab4_979

statement ok
DROP VIEW view_2_tab4_979

statement ok
DROP VIEW view_3_tab4_979

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_980') DROP VIEW view_1_tab0_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_980') DROP VIEW view_2_tab0_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_980') DROP VIEW view_3_tab0_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_980

statement ok
CREATE VIEW view_1_tab0_980 AS SELECT pk, col0 FROM tab0 WHERE col4 < 69.53 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab0_980 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 69.53 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab0_980 AS SELECT pk FROM view_1_tab0_980

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col4 < 69.53 OR col3 IS NULL
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_980
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_980
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 69.53 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_980 UNION ALL SELECT pk, col0 FROM view_2_tab0_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 69.53 OR col3 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_980 UNION SELECT pk, col0 FROM view_2_tab0_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 69.53 OR col3 IS NULL ) AS tab0_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col4 < 69.53 OR col3 IS NULL
----
0
1
4
5
6

statement ok
DROP VIEW view_1_tab0_980

statement ok
DROP VIEW view_2_tab0_980

statement ok
DROP VIEW view_3_tab0_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_980') DROP VIEW view_1_tab1_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_980') DROP VIEW view_2_tab1_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_980') DROP VIEW view_3_tab1_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_980

statement ok
CREATE VIEW view_1_tab1_980 AS SELECT pk, col0 FROM tab1 WHERE col4 < 69.53 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab1_980 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 69.53 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab1_980 AS SELECT pk FROM view_1_tab1_980

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col4 < 69.53 OR col3 IS NULL
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_980
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_980
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 69.53 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_980 UNION ALL SELECT pk, col0 FROM view_2_tab1_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 69.53 OR col3 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_980 UNION SELECT pk, col0 FROM view_2_tab1_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 69.53 OR col3 IS NULL ) AS tab1_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col4 < 69.53 OR col3 IS NULL
----
0
1
4
5
6

statement ok
DROP VIEW view_1_tab1_980

statement ok
DROP VIEW view_2_tab1_980

statement ok
DROP VIEW view_3_tab1_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_980') DROP VIEW view_1_tab2_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_980') DROP VIEW view_2_tab2_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_980') DROP VIEW view_3_tab2_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_980

statement ok
CREATE VIEW view_1_tab2_980 AS SELECT pk, col0 FROM tab2 WHERE col4 < 69.53 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab2_980 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 69.53 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab2_980 AS SELECT pk FROM view_1_tab2_980

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col4 < 69.53 OR col3 IS NULL
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_980
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_980
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 69.53 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_980 UNION ALL SELECT pk, col0 FROM view_2_tab2_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 69.53 OR col3 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_980 UNION SELECT pk, col0 FROM view_2_tab2_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 69.53 OR col3 IS NULL ) AS tab2_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col4 < 69.53 OR col3 IS NULL
----
0
1
4
5
6

statement ok
DROP VIEW view_1_tab2_980

statement ok
DROP VIEW view_2_tab2_980

statement ok
DROP VIEW view_3_tab2_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_980') DROP VIEW view_1_tab3_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_980') DROP VIEW view_2_tab3_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_980') DROP VIEW view_3_tab3_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_980

statement ok
CREATE VIEW view_1_tab3_980 AS SELECT pk, col0 FROM tab3 WHERE col4 < 69.53 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab3_980 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 69.53 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab3_980 AS SELECT pk FROM view_1_tab3_980

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col4 < 69.53 OR col3 IS NULL
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_980
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_980
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 69.53 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_980 UNION ALL SELECT pk, col0 FROM view_2_tab3_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 69.53 OR col3 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_980 UNION SELECT pk, col0 FROM view_2_tab3_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 69.53 OR col3 IS NULL ) AS tab3_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col4 < 69.53 OR col3 IS NULL
----
0
1
4
5
6

statement ok
DROP VIEW view_1_tab3_980

statement ok
DROP VIEW view_2_tab3_980

statement ok
DROP VIEW view_3_tab3_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_980') DROP VIEW view_1_tab4_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_980') DROP VIEW view_2_tab4_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_980') DROP VIEW view_3_tab4_980

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_980

statement ok
CREATE VIEW view_1_tab4_980 AS SELECT pk, col0 FROM tab4 WHERE col4 < 69.53 OR col3 IS NULL

statement ok
CREATE VIEW view_2_tab4_980 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 69.53 OR col3 IS NULL)

statement ok
CREATE VIEW view_3_tab4_980 AS SELECT pk FROM view_1_tab4_980

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col4 < 69.53 OR col3 IS NULL
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_980
----
10 values hashing to 82fdd73c4b052e83788d630daf1265c2

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_980
----
10 values hashing to 1a5ea2e92cfb8b6835b7904a496e4fb4

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 69.53 OR col3 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_980 UNION ALL SELECT pk, col0 FROM view_2_tab4_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 69.53 OR col3 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 69.53 OR col3 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_980 UNION SELECT pk, col0 FROM view_2_tab4_980
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 69.53 OR col3 IS NULL ) AS tab4_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_980
----
0
1
4
5
6

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col4 < 69.53 OR col3 IS NULL
----
0
1
4
5
6

statement ok
DROP VIEW view_1_tab4_980

statement ok
DROP VIEW view_2_tab4_980

statement ok
DROP VIEW view_3_tab4_980

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_981') DROP VIEW view_1_tab0_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_981') DROP VIEW view_2_tab0_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_981') DROP VIEW view_3_tab0_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_981

statement ok
CREATE VIEW view_1_tab0_981 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 24.39

statement ok
CREATE VIEW view_2_tab0_981 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 24.39)

statement ok
CREATE VIEW view_3_tab0_981 AS SELECT pk FROM view_1_tab0_981

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 24.39
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 24.39)
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_981
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_981
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 24.39 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_981 UNION ALL SELECT pk, col0 FROM view_2_tab0_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 24.39 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_981 UNION SELECT pk, col0 FROM view_2_tab0_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 24.39 ) AS tab0_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col1 <= 24.39
----
2
4
5
6
8

statement ok
DROP VIEW view_1_tab0_981

statement ok
DROP VIEW view_2_tab0_981

statement ok
DROP VIEW view_3_tab0_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_981') DROP VIEW view_1_tab1_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_981') DROP VIEW view_2_tab1_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_981') DROP VIEW view_3_tab1_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_981

statement ok
CREATE VIEW view_1_tab1_981 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 24.39

statement ok
CREATE VIEW view_2_tab1_981 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 24.39)

statement ok
CREATE VIEW view_3_tab1_981 AS SELECT pk FROM view_1_tab1_981

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 24.39
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 24.39)
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_981
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_981
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 24.39 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_981 UNION ALL SELECT pk, col0 FROM view_2_tab1_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 24.39 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_981 UNION SELECT pk, col0 FROM view_2_tab1_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 24.39 ) AS tab1_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col1 <= 24.39
----
2
4
5
6
8

statement ok
DROP VIEW view_1_tab1_981

statement ok
DROP VIEW view_2_tab1_981

statement ok
DROP VIEW view_3_tab1_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_981') DROP VIEW view_1_tab2_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_981') DROP VIEW view_2_tab2_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_981') DROP VIEW view_3_tab2_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_981

statement ok
CREATE VIEW view_1_tab2_981 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 24.39

statement ok
CREATE VIEW view_2_tab2_981 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 24.39)

statement ok
CREATE VIEW view_3_tab2_981 AS SELECT pk FROM view_1_tab2_981

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 24.39
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 24.39)
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_981
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_981
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 24.39 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_981 UNION ALL SELECT pk, col0 FROM view_2_tab2_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 24.39 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_981 UNION SELECT pk, col0 FROM view_2_tab2_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 24.39 ) AS tab2_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col1 <= 24.39
----
2
4
5
6
8

statement ok
DROP VIEW view_1_tab2_981

statement ok
DROP VIEW view_2_tab2_981

statement ok
DROP VIEW view_3_tab2_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_981') DROP VIEW view_1_tab3_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_981') DROP VIEW view_2_tab3_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_981') DROP VIEW view_3_tab3_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_981

statement ok
CREATE VIEW view_1_tab3_981 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 24.39

statement ok
CREATE VIEW view_2_tab3_981 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 24.39)

statement ok
CREATE VIEW view_3_tab3_981 AS SELECT pk FROM view_1_tab3_981

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 24.39
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 24.39)
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_981
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_981
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 24.39 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_981 UNION ALL SELECT pk, col0 FROM view_2_tab3_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 24.39 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_981 UNION SELECT pk, col0 FROM view_2_tab3_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 24.39 ) AS tab3_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col1 <= 24.39
----
2
4
5
6
8

statement ok
DROP VIEW view_1_tab3_981

statement ok
DROP VIEW view_2_tab3_981

statement ok
DROP VIEW view_3_tab3_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_981') DROP VIEW view_1_tab4_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_981') DROP VIEW view_2_tab4_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_981') DROP VIEW view_3_tab4_981

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_981

statement ok
CREATE VIEW view_1_tab4_981 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 24.39

statement ok
CREATE VIEW view_2_tab4_981 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 24.39)

statement ok
CREATE VIEW view_3_tab4_981 AS SELECT pk FROM view_1_tab4_981

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 24.39
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 24.39)
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_981
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_981
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 24.39 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_981 UNION ALL SELECT pk, col0 FROM view_2_tab4_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 24.39 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 24.39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_981 UNION SELECT pk, col0 FROM view_2_tab4_981
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 24.39 ) AS tab4_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_981
----
2
4
5
6
8

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col1 <= 24.39
----
2
4
5
6
8

statement ok
DROP VIEW view_1_tab4_981

statement ok
DROP VIEW view_2_tab4_981

statement ok
DROP VIEW view_3_tab4_981

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_982') DROP VIEW view_1_tab0_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_982') DROP VIEW view_2_tab0_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_982') DROP VIEW view_3_tab0_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_982

statement ok
CREATE VIEW view_1_tab0_982 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 50

statement ok
CREATE VIEW view_2_tab0_982 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 50)

statement ok
CREATE VIEW view_3_tab0_982 AS SELECT pk FROM view_1_tab0_982

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 50
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 50)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_982
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_982
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 50 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_982 UNION ALL SELECT pk, col0 FROM view_2_tab0_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 50 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_982 UNION SELECT pk, col0 FROM view_2_tab0_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 50 ) AS tab0_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE col3 >= 50
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab0_982

statement ok
DROP VIEW view_2_tab0_982

statement ok
DROP VIEW view_3_tab0_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_982') DROP VIEW view_1_tab1_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_982') DROP VIEW view_2_tab1_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_982') DROP VIEW view_3_tab1_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_982

statement ok
CREATE VIEW view_1_tab1_982 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 50

statement ok
CREATE VIEW view_2_tab1_982 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 50)

statement ok
CREATE VIEW view_3_tab1_982 AS SELECT pk FROM view_1_tab1_982

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 50
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 50)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_982
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_982
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 50 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_982 UNION ALL SELECT pk, col0 FROM view_2_tab1_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 50 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_982 UNION SELECT pk, col0 FROM view_2_tab1_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 50 ) AS tab1_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE col3 >= 50
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab1_982

statement ok
DROP VIEW view_2_tab1_982

statement ok
DROP VIEW view_3_tab1_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_982') DROP VIEW view_1_tab2_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_982') DROP VIEW view_2_tab2_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_982') DROP VIEW view_3_tab2_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_982

statement ok
CREATE VIEW view_1_tab2_982 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 50

statement ok
CREATE VIEW view_2_tab2_982 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 50)

statement ok
CREATE VIEW view_3_tab2_982 AS SELECT pk FROM view_1_tab2_982

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 50
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 50)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_982
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_982
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 50 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_982 UNION ALL SELECT pk, col0 FROM view_2_tab2_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 50 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_982 UNION SELECT pk, col0 FROM view_2_tab2_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 50 ) AS tab2_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE col3 >= 50
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab2_982

statement ok
DROP VIEW view_2_tab2_982

statement ok
DROP VIEW view_3_tab2_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_982') DROP VIEW view_1_tab3_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_982') DROP VIEW view_2_tab3_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_982') DROP VIEW view_3_tab3_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_982

statement ok
CREATE VIEW view_1_tab3_982 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 50

statement ok
CREATE VIEW view_2_tab3_982 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 50)

statement ok
CREATE VIEW view_3_tab3_982 AS SELECT pk FROM view_1_tab3_982

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 50
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 50)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_982
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_982
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 50 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_982 UNION ALL SELECT pk, col0 FROM view_2_tab3_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 50 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_982 UNION SELECT pk, col0 FROM view_2_tab3_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 50 ) AS tab3_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE col3 >= 50
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab3_982

statement ok
DROP VIEW view_2_tab3_982

statement ok
DROP VIEW view_3_tab3_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_982') DROP VIEW view_1_tab4_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_982') DROP VIEW view_2_tab4_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_982') DROP VIEW view_3_tab4_982

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_982

statement ok
CREATE VIEW view_1_tab4_982 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 50

statement ok
CREATE VIEW view_2_tab4_982 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 50)

statement ok
CREATE VIEW view_3_tab4_982 AS SELECT pk FROM view_1_tab4_982

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 50
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 50)
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_982
----
10 values hashing to 9627043c711cb7c92394b309c21d7357

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_982
----
10 values hashing to 45189bd6a01ec41cf8efe94b3d1a1b0f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 50 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_982 UNION ALL SELECT pk, col0 FROM view_2_tab4_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 50 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 50)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_982 UNION SELECT pk, col0 FROM view_2_tab4_982
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 50 ) AS tab4_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_982
----
1
2
5
6
9

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE col3 >= 50
----
1
2
5
6
9

statement ok
DROP VIEW view_1_tab4_982

statement ok
DROP VIEW view_2_tab4_982

statement ok
DROP VIEW view_3_tab4_982

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_983') DROP VIEW view_1_tab0_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_983') DROP VIEW view_2_tab0_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_983') DROP VIEW view_3_tab0_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_983

statement ok
CREATE VIEW view_1_tab0_983 AS SELECT pk, col0 FROM tab0 WHERE (((((((col3 <= 34)))))))

statement ok
CREATE VIEW view_2_tab0_983 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((((((col3 <= 34))))))))

statement ok
CREATE VIEW view_3_tab0_983 AS SELECT pk FROM view_1_tab0_983

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE (((((((col3 <= 34)))))))
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((((((col3 <= 34))))))))
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_983
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_983
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((((((col3 <= 34))))))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_983 UNION ALL SELECT pk, col0 FROM view_2_tab0_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((((((col3 <= 34))))))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_983 UNION SELECT pk, col0 FROM view_2_tab0_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((((((col3 <= 34))))))) ) AS tab0_983
----
0
3
4

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_983
----
0
3
4

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE (((((((col3 <= 34)))))))
----
0
3
4

statement ok
DROP VIEW view_1_tab0_983

statement ok
DROP VIEW view_2_tab0_983

statement ok
DROP VIEW view_3_tab0_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_983') DROP VIEW view_1_tab1_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_983') DROP VIEW view_2_tab1_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_983') DROP VIEW view_3_tab1_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_983

statement ok
CREATE VIEW view_1_tab1_983 AS SELECT pk, col0 FROM tab1 WHERE (((((((col3 <= 34)))))))

statement ok
CREATE VIEW view_2_tab1_983 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((((((col3 <= 34))))))))

statement ok
CREATE VIEW view_3_tab1_983 AS SELECT pk FROM view_1_tab1_983

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE (((((((col3 <= 34)))))))
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((((((col3 <= 34))))))))
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_983
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_983
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((((((col3 <= 34))))))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_983 UNION ALL SELECT pk, col0 FROM view_2_tab1_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((((((col3 <= 34))))))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_983 UNION SELECT pk, col0 FROM view_2_tab1_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((((((col3 <= 34))))))) ) AS tab1_983
----
0
3
4

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_983
----
0
3
4

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE (((((((col3 <= 34)))))))
----
0
3
4

statement ok
DROP VIEW view_1_tab1_983

statement ok
DROP VIEW view_2_tab1_983

statement ok
DROP VIEW view_3_tab1_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_983') DROP VIEW view_1_tab2_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_983') DROP VIEW view_2_tab2_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_983') DROP VIEW view_3_tab2_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_983

statement ok
CREATE VIEW view_1_tab2_983 AS SELECT pk, col0 FROM tab2 WHERE (((((((col3 <= 34)))))))

statement ok
CREATE VIEW view_2_tab2_983 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((((((col3 <= 34))))))))

statement ok
CREATE VIEW view_3_tab2_983 AS SELECT pk FROM view_1_tab2_983

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE (((((((col3 <= 34)))))))
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((((((col3 <= 34))))))))
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_983
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_983
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((((((col3 <= 34))))))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_983 UNION ALL SELECT pk, col0 FROM view_2_tab2_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((((((col3 <= 34))))))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_983 UNION SELECT pk, col0 FROM view_2_tab2_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((((((col3 <= 34))))))) ) AS tab2_983
----
0
3
4

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_983
----
0
3
4

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE (((((((col3 <= 34)))))))
----
0
3
4

statement ok
DROP VIEW view_1_tab2_983

statement ok
DROP VIEW view_2_tab2_983

statement ok
DROP VIEW view_3_tab2_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_983') DROP VIEW view_1_tab3_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_983') DROP VIEW view_2_tab3_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_983') DROP VIEW view_3_tab3_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_983

statement ok
CREATE VIEW view_1_tab3_983 AS SELECT pk, col0 FROM tab3 WHERE (((((((col3 <= 34)))))))

statement ok
CREATE VIEW view_2_tab3_983 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((((((col3 <= 34))))))))

statement ok
CREATE VIEW view_3_tab3_983 AS SELECT pk FROM view_1_tab3_983

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE (((((((col3 <= 34)))))))
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((((((col3 <= 34))))))))
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_983
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_983
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((((((col3 <= 34))))))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_983 UNION ALL SELECT pk, col0 FROM view_2_tab3_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((((((col3 <= 34))))))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_983 UNION SELECT pk, col0 FROM view_2_tab3_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((((((col3 <= 34))))))) ) AS tab3_983
----
0
3
4

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_983
----
0
3
4

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE (((((((col3 <= 34)))))))
----
0
3
4

statement ok
DROP VIEW view_1_tab3_983

statement ok
DROP VIEW view_2_tab3_983

statement ok
DROP VIEW view_3_tab3_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_983') DROP VIEW view_1_tab4_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_983') DROP VIEW view_2_tab4_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_983') DROP VIEW view_3_tab4_983

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_983

statement ok
CREATE VIEW view_1_tab4_983 AS SELECT pk, col0 FROM tab4 WHERE (((((((col3 <= 34)))))))

statement ok
CREATE VIEW view_2_tab4_983 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((((((col3 <= 34))))))))

statement ok
CREATE VIEW view_3_tab4_983 AS SELECT pk FROM view_1_tab4_983

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE (((((((col3 <= 34)))))))
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((((((col3 <= 34))))))))
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_983
----
0
87
3
18
4
84

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_983
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((((((col3 <= 34))))))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_983 UNION ALL SELECT pk, col0 FROM view_2_tab4_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((((((col3 <= 34))))))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((((((col3 <= 34))))))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_983 UNION SELECT pk, col0 FROM view_2_tab4_983
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((((((col3 <= 34))))))) ) AS tab4_983
----
0
3
4

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_983
----
0
3
4

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE (((((((col3 <= 34)))))))
----
0
3
4

statement ok
DROP VIEW view_1_tab4_983

statement ok
DROP VIEW view_2_tab4_983

statement ok
DROP VIEW view_3_tab4_983

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_984') DROP VIEW view_1_tab0_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_984') DROP VIEW view_2_tab0_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_984') DROP VIEW view_3_tab0_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_984

statement ok
CREATE VIEW view_1_tab0_984 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91

statement ok
CREATE VIEW view_2_tab0_984 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)

statement ok
CREATE VIEW view_3_tab0_984 AS SELECT pk FROM view_1_tab0_984

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_984
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_984
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_984 UNION ALL SELECT pk, col0 FROM view_2_tab0_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_984 UNION SELECT pk, col0 FROM view_2_tab0_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 ) AS tab0_984
----
1
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_984
----
1
9

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab0 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
9

statement ok
DROP VIEW view_1_tab0_984

statement ok
DROP VIEW view_2_tab0_984

statement ok
DROP VIEW view_3_tab0_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_984') DROP VIEW view_1_tab1_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_984') DROP VIEW view_2_tab1_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_984') DROP VIEW view_3_tab1_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_984

statement ok
CREATE VIEW view_1_tab1_984 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91

statement ok
CREATE VIEW view_2_tab1_984 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)

statement ok
CREATE VIEW view_3_tab1_984 AS SELECT pk FROM view_1_tab1_984

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_984
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_984
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_984 UNION ALL SELECT pk, col0 FROM view_2_tab1_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_984 UNION SELECT pk, col0 FROM view_2_tab1_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 ) AS tab1_984
----
1
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_984
----
1
9

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab1 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
9

statement ok
DROP VIEW view_1_tab1_984

statement ok
DROP VIEW view_2_tab1_984

statement ok
DROP VIEW view_3_tab1_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_984') DROP VIEW view_1_tab2_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_984') DROP VIEW view_2_tab2_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_984') DROP VIEW view_3_tab2_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_984

statement ok
CREATE VIEW view_1_tab2_984 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91

statement ok
CREATE VIEW view_2_tab2_984 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)

statement ok
CREATE VIEW view_3_tab2_984 AS SELECT pk FROM view_1_tab2_984

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_984
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_984
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_984 UNION ALL SELECT pk, col0 FROM view_2_tab2_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_984 UNION SELECT pk, col0 FROM view_2_tab2_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 ) AS tab2_984
----
1
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_984
----
1
9

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab2 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
9

statement ok
DROP VIEW view_1_tab2_984

statement ok
DROP VIEW view_2_tab2_984

statement ok
DROP VIEW view_3_tab2_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_984') DROP VIEW view_1_tab3_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_984') DROP VIEW view_2_tab3_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_984') DROP VIEW view_3_tab3_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_984

statement ok
CREATE VIEW view_1_tab3_984 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91

statement ok
CREATE VIEW view_2_tab3_984 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)

statement ok
CREATE VIEW view_3_tab3_984 AS SELECT pk FROM view_1_tab3_984

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_984
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_984
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_984 UNION ALL SELECT pk, col0 FROM view_2_tab3_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_984 UNION SELECT pk, col0 FROM view_2_tab3_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 ) AS tab3_984
----
1
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_984
----
1
9

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab3 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
9

statement ok
DROP VIEW view_1_tab3_984

statement ok
DROP VIEW view_2_tab3_984

statement ok
DROP VIEW view_3_tab3_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_984') DROP VIEW view_1_tab4_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_984') DROP VIEW view_2_tab4_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_984') DROP VIEW view_3_tab4_984

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_984

statement ok
CREATE VIEW view_1_tab4_984 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91

statement ok
CREATE VIEW view_2_tab4_984 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)

statement ok
CREATE VIEW view_3_tab4_984 AS SELECT pk FROM view_1_tab4_984

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_984
----
1
35
9
0

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_984
----
16 values hashing to 84b0ded68f3e7a827c9c2db23bc4523f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_984 UNION ALL SELECT pk, col0 FROM view_2_tab4_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_984 UNION SELECT pk, col0 FROM view_2_tab4_984
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91 ) AS tab4_984
----
1
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_984
----
1
9

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE (col0 > 42) AND ((col1 IS NULL)) OR ((((col3 > 72)))) OR (((col3 <= 90) AND ((col0 > 68)) AND (col0 IN (45,3,50,1) OR col4 < 9.99 OR col3 IN (76,97,24) AND col1 > 8.58 AND (col0 = 3) AND (col0 >= 50 AND col0 IN (SELECT col3 FROM tab4 WHERE ((col3 <= 60)))) OR (col0 > 40) OR col0 < 72) AND (col3 <= 99)) AND ((col3 IS NULL) OR ((((((col4 >= 86.47) OR ((col0 < 99) AND col3 IS NULL)))))) OR col1 < 21.99)) AND col4 < 9.77 AND col4 = 9.91
----
1
9

statement ok
DROP VIEW view_1_tab4_984

statement ok
DROP VIEW view_2_tab4_984

statement ok
DROP VIEW view_3_tab4_984

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_985') DROP VIEW view_1_tab0_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_985') DROP VIEW view_2_tab0_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_985') DROP VIEW view_3_tab0_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_985

statement ok
CREATE VIEW view_1_tab0_985 AS SELECT pk, col0 FROM tab0 WHERE col0 < 69

statement ok
CREATE VIEW view_2_tab0_985 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 69)

statement ok
CREATE VIEW view_3_tab0_985 AS SELECT pk FROM view_1_tab0_985

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE col0 < 69
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 69)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_985
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_985
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_985 UNION ALL SELECT pk, col0 FROM view_2_tab0_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_985 UNION SELECT pk, col0 FROM view_2_tab0_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 69 ) AS tab0_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE col0 < 69
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab0_985

statement ok
DROP VIEW view_2_tab0_985

statement ok
DROP VIEW view_3_tab0_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_985') DROP VIEW view_1_tab1_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_985') DROP VIEW view_2_tab1_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_985') DROP VIEW view_3_tab1_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_985

statement ok
CREATE VIEW view_1_tab1_985 AS SELECT pk, col0 FROM tab1 WHERE col0 < 69

statement ok
CREATE VIEW view_2_tab1_985 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 69)

statement ok
CREATE VIEW view_3_tab1_985 AS SELECT pk FROM view_1_tab1_985

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE col0 < 69
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 69)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_985
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_985
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_985 UNION ALL SELECT pk, col0 FROM view_2_tab1_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_985 UNION SELECT pk, col0 FROM view_2_tab1_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 69 ) AS tab1_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE col0 < 69
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab1_985

statement ok
DROP VIEW view_2_tab1_985

statement ok
DROP VIEW view_3_tab1_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_985') DROP VIEW view_1_tab2_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_985') DROP VIEW view_2_tab2_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_985') DROP VIEW view_3_tab2_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_985

statement ok
CREATE VIEW view_1_tab2_985 AS SELECT pk, col0 FROM tab2 WHERE col0 < 69

statement ok
CREATE VIEW view_2_tab2_985 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 69)

statement ok
CREATE VIEW view_3_tab2_985 AS SELECT pk FROM view_1_tab2_985

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE col0 < 69
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 69)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_985
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_985
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_985 UNION ALL SELECT pk, col0 FROM view_2_tab2_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_985 UNION SELECT pk, col0 FROM view_2_tab2_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 69 ) AS tab2_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE col0 < 69
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab2_985

statement ok
DROP VIEW view_2_tab2_985

statement ok
DROP VIEW view_3_tab2_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_985') DROP VIEW view_1_tab3_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_985') DROP VIEW view_2_tab3_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_985') DROP VIEW view_3_tab3_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_985

statement ok
CREATE VIEW view_1_tab3_985 AS SELECT pk, col0 FROM tab3 WHERE col0 < 69

statement ok
CREATE VIEW view_2_tab3_985 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 69)

statement ok
CREATE VIEW view_3_tab3_985 AS SELECT pk FROM view_1_tab3_985

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE col0 < 69
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 69)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_985
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_985
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_985 UNION ALL SELECT pk, col0 FROM view_2_tab3_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_985 UNION SELECT pk, col0 FROM view_2_tab3_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 69 ) AS tab3_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE col0 < 69
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab3_985

statement ok
DROP VIEW view_2_tab3_985

statement ok
DROP VIEW view_3_tab3_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_985') DROP VIEW view_1_tab4_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_985') DROP VIEW view_2_tab4_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_985') DROP VIEW view_3_tab4_985

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_985

statement ok
CREATE VIEW view_1_tab4_985 AS SELECT pk, col0 FROM tab4 WHERE col0 < 69

statement ok
CREATE VIEW view_2_tab4_985 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 69)

statement ok
CREATE VIEW view_3_tab4_985 AS SELECT pk FROM view_1_tab4_985

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE col0 < 69
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 69)
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_985
----
10 values hashing to 1ba94aa1b9a247eceb7b7f95b82a24c4

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_985
----
10 values hashing to 022211ed41460b584f5000d1308d184f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_985 UNION ALL SELECT pk, col0 FROM view_2_tab4_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 69)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_985 UNION SELECT pk, col0 FROM view_2_tab4_985
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 69 ) AS tab4_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_985
----
1
3
6
8
9

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE col0 < 69
----
1
3
6
8
9

statement ok
DROP VIEW view_1_tab4_985

statement ok
DROP VIEW view_2_tab4_985

statement ok
DROP VIEW view_3_tab4_985

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_986') DROP VIEW view_1_tab0_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_986') DROP VIEW view_2_tab0_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_986') DROP VIEW view_3_tab0_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_986

statement ok
CREATE VIEW view_1_tab0_986 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 54.76)

statement ok
CREATE VIEW view_2_tab0_986 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 54.76))

statement ok
CREATE VIEW view_3_tab0_986 AS SELECT pk FROM view_1_tab0_986

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 54.76)
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 54.76))
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_986
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_986
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 54.76) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_986 UNION ALL SELECT pk, col0 FROM view_2_tab0_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 54.76) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_986 UNION SELECT pk, col0 FROM view_2_tab0_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 54.76) ) AS tab0_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE (col1 > 54.76)
----
1
3
7
9

statement ok
DROP VIEW view_1_tab0_986

statement ok
DROP VIEW view_2_tab0_986

statement ok
DROP VIEW view_3_tab0_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_986') DROP VIEW view_1_tab1_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_986') DROP VIEW view_2_tab1_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_986') DROP VIEW view_3_tab1_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_986

statement ok
CREATE VIEW view_1_tab1_986 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 54.76)

statement ok
CREATE VIEW view_2_tab1_986 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 54.76))

statement ok
CREATE VIEW view_3_tab1_986 AS SELECT pk FROM view_1_tab1_986

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 54.76)
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 54.76))
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_986
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_986
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 54.76) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_986 UNION ALL SELECT pk, col0 FROM view_2_tab1_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 54.76) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_986 UNION SELECT pk, col0 FROM view_2_tab1_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 54.76) ) AS tab1_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE (col1 > 54.76)
----
1
3
7
9

statement ok
DROP VIEW view_1_tab1_986

statement ok
DROP VIEW view_2_tab1_986

statement ok
DROP VIEW view_3_tab1_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_986') DROP VIEW view_1_tab2_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_986') DROP VIEW view_2_tab2_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_986') DROP VIEW view_3_tab2_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_986

statement ok
CREATE VIEW view_1_tab2_986 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 54.76)

statement ok
CREATE VIEW view_2_tab2_986 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 54.76))

statement ok
CREATE VIEW view_3_tab2_986 AS SELECT pk FROM view_1_tab2_986

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 54.76)
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 54.76))
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_986
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_986
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 54.76) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_986 UNION ALL SELECT pk, col0 FROM view_2_tab2_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 54.76) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_986 UNION SELECT pk, col0 FROM view_2_tab2_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 54.76) ) AS tab2_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE (col1 > 54.76)
----
1
3
7
9

statement ok
DROP VIEW view_1_tab2_986

statement ok
DROP VIEW view_2_tab2_986

statement ok
DROP VIEW view_3_tab2_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_986') DROP VIEW view_1_tab3_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_986') DROP VIEW view_2_tab3_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_986') DROP VIEW view_3_tab3_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_986

statement ok
CREATE VIEW view_1_tab3_986 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 54.76)

statement ok
CREATE VIEW view_2_tab3_986 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 54.76))

statement ok
CREATE VIEW view_3_tab3_986 AS SELECT pk FROM view_1_tab3_986

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 54.76)
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 54.76))
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_986
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_986
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 54.76) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_986 UNION ALL SELECT pk, col0 FROM view_2_tab3_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 54.76) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_986 UNION SELECT pk, col0 FROM view_2_tab3_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 54.76) ) AS tab3_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE (col1 > 54.76)
----
1
3
7
9

statement ok
DROP VIEW view_1_tab3_986

statement ok
DROP VIEW view_2_tab3_986

statement ok
DROP VIEW view_3_tab3_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_986') DROP VIEW view_1_tab4_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_986') DROP VIEW view_2_tab4_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_986') DROP VIEW view_3_tab4_986

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_986

statement ok
CREATE VIEW view_1_tab4_986 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 54.76)

statement ok
CREATE VIEW view_2_tab4_986 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 54.76))

statement ok
CREATE VIEW view_3_tab4_986 AS SELECT pk FROM view_1_tab4_986

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 54.76)
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 54.76))
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_986
----
1
35
3
18
7
71
9
0

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_986
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 54.76) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_986 UNION ALL SELECT pk, col0 FROM view_2_tab4_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 54.76) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 54.76))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_986 UNION SELECT pk, col0 FROM view_2_tab4_986
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 54.76) ) AS tab4_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_986
----
1
3
7
9

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE (col1 > 54.76)
----
1
3
7
9

statement ok
DROP VIEW view_1_tab4_986

statement ok
DROP VIEW view_2_tab4_986

statement ok
DROP VIEW view_3_tab4_986

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_987') DROP VIEW view_1_tab0_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_987') DROP VIEW view_2_tab0_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_987') DROP VIEW view_3_tab0_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_987

statement ok
CREATE VIEW view_1_tab0_987 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 75

statement ok
CREATE VIEW view_2_tab0_987 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 75)

statement ok
CREATE VIEW view_3_tab0_987 AS SELECT pk FROM view_1_tab0_987

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 75
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 75)
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_987
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_987
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 75 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_987 UNION ALL SELECT pk, col0 FROM view_2_tab0_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 75 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_987 UNION SELECT pk, col0 FROM view_2_tab0_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 75 ) AS tab0_987
----
0
4
5

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_987
----
0
4
5

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE col0 >= 75
----
0
4
5

statement ok
DROP VIEW view_1_tab0_987

statement ok
DROP VIEW view_2_tab0_987

statement ok
DROP VIEW view_3_tab0_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_987') DROP VIEW view_1_tab1_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_987') DROP VIEW view_2_tab1_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_987') DROP VIEW view_3_tab1_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_987

statement ok
CREATE VIEW view_1_tab1_987 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 75

statement ok
CREATE VIEW view_2_tab1_987 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 75)

statement ok
CREATE VIEW view_3_tab1_987 AS SELECT pk FROM view_1_tab1_987

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 75
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 75)
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_987
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_987
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 75 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_987 UNION ALL SELECT pk, col0 FROM view_2_tab1_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 75 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_987 UNION SELECT pk, col0 FROM view_2_tab1_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 75 ) AS tab1_987
----
0
4
5

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_987
----
0
4
5

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE col0 >= 75
----
0
4
5

statement ok
DROP VIEW view_1_tab1_987

statement ok
DROP VIEW view_2_tab1_987

statement ok
DROP VIEW view_3_tab1_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_987') DROP VIEW view_1_tab2_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_987') DROP VIEW view_2_tab2_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_987') DROP VIEW view_3_tab2_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_987

statement ok
CREATE VIEW view_1_tab2_987 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 75

statement ok
CREATE VIEW view_2_tab2_987 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 75)

statement ok
CREATE VIEW view_3_tab2_987 AS SELECT pk FROM view_1_tab2_987

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 75
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 75)
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_987
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_987
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 75 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_987 UNION ALL SELECT pk, col0 FROM view_2_tab2_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 75 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_987 UNION SELECT pk, col0 FROM view_2_tab2_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 75 ) AS tab2_987
----
0
4
5

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_987
----
0
4
5

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE col0 >= 75
----
0
4
5

statement ok
DROP VIEW view_1_tab2_987

statement ok
DROP VIEW view_2_tab2_987

statement ok
DROP VIEW view_3_tab2_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_987') DROP VIEW view_1_tab3_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_987') DROP VIEW view_2_tab3_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_987') DROP VIEW view_3_tab3_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_987

statement ok
CREATE VIEW view_1_tab3_987 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 75

statement ok
CREATE VIEW view_2_tab3_987 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 75)

statement ok
CREATE VIEW view_3_tab3_987 AS SELECT pk FROM view_1_tab3_987

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 75
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 75)
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_987
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_987
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 75 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_987 UNION ALL SELECT pk, col0 FROM view_2_tab3_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 75 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_987 UNION SELECT pk, col0 FROM view_2_tab3_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 75 ) AS tab3_987
----
0
4
5

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_987
----
0
4
5

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE col0 >= 75
----
0
4
5

statement ok
DROP VIEW view_1_tab3_987

statement ok
DROP VIEW view_2_tab3_987

statement ok
DROP VIEW view_3_tab3_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_987') DROP VIEW view_1_tab4_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_987') DROP VIEW view_2_tab4_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_987') DROP VIEW view_3_tab4_987

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_987

statement ok
CREATE VIEW view_1_tab4_987 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 75

statement ok
CREATE VIEW view_2_tab4_987 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 75)

statement ok
CREATE VIEW view_3_tab4_987 AS SELECT pk FROM view_1_tab4_987

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 75
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 75)
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_987
----
0
87
4
84
5
85

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_987
----
14 values hashing to 0d3367cc7e6a5a77d3bb1524a56735c4

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 75 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_987 UNION ALL SELECT pk, col0 FROM view_2_tab4_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 75 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 75)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_987 UNION SELECT pk, col0 FROM view_2_tab4_987
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 75 ) AS tab4_987
----
0
4
5

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_987
----
0
4
5

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE col0 >= 75
----
0
4
5

statement ok
DROP VIEW view_1_tab4_987

statement ok
DROP VIEW view_2_tab4_987

statement ok
DROP VIEW view_3_tab4_987

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_988') DROP VIEW view_1_tab0_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_988') DROP VIEW view_2_tab0_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_988') DROP VIEW view_3_tab0_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_988

statement ok
CREATE VIEW view_1_tab0_988 AS SELECT pk, col0 FROM tab0 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85

statement ok
CREATE VIEW view_2_tab0_988 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)

statement ok
CREATE VIEW view_3_tab0_988 AS SELECT pk FROM view_1_tab0_988

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_988
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_988
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_988 UNION ALL SELECT pk, col0 FROM view_2_tab0_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_988 UNION SELECT pk, col0 FROM view_2_tab0_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 ) AS tab0_988
----
0

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_988
----
0

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0

statement ok
DROP VIEW view_1_tab0_988

statement ok
DROP VIEW view_2_tab0_988

statement ok
DROP VIEW view_3_tab0_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_988') DROP VIEW view_1_tab1_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_988') DROP VIEW view_2_tab1_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_988') DROP VIEW view_3_tab1_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_988

statement ok
CREATE VIEW view_1_tab1_988 AS SELECT pk, col0 FROM tab1 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85

statement ok
CREATE VIEW view_2_tab1_988 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)

statement ok
CREATE VIEW view_3_tab1_988 AS SELECT pk FROM view_1_tab1_988

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_988
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_988
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_988 UNION ALL SELECT pk, col0 FROM view_2_tab1_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_988 UNION SELECT pk, col0 FROM view_2_tab1_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 ) AS tab1_988
----
0

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_988
----
0

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0

statement ok
DROP VIEW view_1_tab1_988

statement ok
DROP VIEW view_2_tab1_988

statement ok
DROP VIEW view_3_tab1_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_988') DROP VIEW view_1_tab2_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_988') DROP VIEW view_2_tab2_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_988') DROP VIEW view_3_tab2_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_988

statement ok
CREATE VIEW view_1_tab2_988 AS SELECT pk, col0 FROM tab2 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85

statement ok
CREATE VIEW view_2_tab2_988 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)

statement ok
CREATE VIEW view_3_tab2_988 AS SELECT pk FROM view_1_tab2_988

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_988
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_988
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_988 UNION ALL SELECT pk, col0 FROM view_2_tab2_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_988 UNION SELECT pk, col0 FROM view_2_tab2_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 ) AS tab2_988
----
0

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_988
----
0

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0

statement ok
DROP VIEW view_1_tab2_988

statement ok
DROP VIEW view_2_tab2_988

statement ok
DROP VIEW view_3_tab2_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_988') DROP VIEW view_1_tab3_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_988') DROP VIEW view_2_tab3_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_988') DROP VIEW view_3_tab3_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_988

statement ok
CREATE VIEW view_1_tab3_988 AS SELECT pk, col0 FROM tab3 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85

statement ok
CREATE VIEW view_2_tab3_988 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)

statement ok
CREATE VIEW view_3_tab3_988 AS SELECT pk FROM view_1_tab3_988

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_988
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_988
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_988 UNION ALL SELECT pk, col0 FROM view_2_tab3_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_988 UNION SELECT pk, col0 FROM view_2_tab3_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 ) AS tab3_988
----
0

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_988
----
0

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0

statement ok
DROP VIEW view_1_tab3_988

statement ok
DROP VIEW view_2_tab3_988

statement ok
DROP VIEW view_3_tab3_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_988') DROP VIEW view_1_tab4_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_988') DROP VIEW view_2_tab4_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_988') DROP VIEW view_3_tab4_988

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_988

statement ok
CREATE VIEW view_1_tab4_988 AS SELECT pk, col0 FROM tab4 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85

statement ok
CREATE VIEW view_2_tab4_988 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)

statement ok
CREATE VIEW view_3_tab4_988 AS SELECT pk FROM view_1_tab4_988

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_988
----
0
87

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_988
----
18 values hashing to 5cb89a7d27c2e02568ce1581816fd638

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_988 UNION ALL SELECT pk, col0 FROM view_2_tab4_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_988 UNION SELECT pk, col0 FROM view_2_tab4_988
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85 ) AS tab4_988
----
0

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_988
----
0

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE ((((col0 < 82) AND ((col4 > 45.53 OR col4 > 29.60 OR col3 IS NULL AND ((((col0 <= 74) AND col0 IS NULL))) AND (((col0 > 76))) AND col3 < 26 AND (col0 < 99) OR col3 > 18 AND col3 IS NULL AND col1 IS NULL)) OR col3 > 18 AND col0 <= 1) AND (col0 BETWEEN 87 AND 39))) OR col0 > 85
----
0

statement ok
DROP VIEW view_1_tab4_988

statement ok
DROP VIEW view_2_tab4_988

statement ok
DROP VIEW view_3_tab4_988

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_989') DROP VIEW view_1_tab0_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_989') DROP VIEW view_2_tab0_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_989') DROP VIEW view_3_tab0_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_989

statement ok
CREATE VIEW view_1_tab0_989 AS SELECT pk, col0 FROM tab0 WHERE col3 > 33

statement ok
CREATE VIEW view_2_tab0_989 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 33)

statement ok
CREATE VIEW view_3_tab0_989 AS SELECT pk FROM view_1_tab0_989

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE col3 > 33
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 33)
----
0
87
3
18
4
84

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_989
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_989
----
0
87
3
18
4
84

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 33 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_989 UNION ALL SELECT pk, col0 FROM view_2_tab0_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 33 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_989 UNION SELECT pk, col0 FROM view_2_tab0_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 33 ) AS tab0_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE col3 > 33
----
1
2
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_989

statement ok
DROP VIEW view_2_tab0_989

statement ok
DROP VIEW view_3_tab0_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_989') DROP VIEW view_1_tab1_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_989') DROP VIEW view_2_tab1_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_989') DROP VIEW view_3_tab1_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_989

statement ok
CREATE VIEW view_1_tab1_989 AS SELECT pk, col0 FROM tab1 WHERE col3 > 33

statement ok
CREATE VIEW view_2_tab1_989 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 33)

statement ok
CREATE VIEW view_3_tab1_989 AS SELECT pk FROM view_1_tab1_989

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE col3 > 33
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 33)
----
0
87
3
18
4
84

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_989
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_989
----
0
87
3
18
4
84

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 33 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_989 UNION ALL SELECT pk, col0 FROM view_2_tab1_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 33 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_989 UNION SELECT pk, col0 FROM view_2_tab1_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 33 ) AS tab1_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE col3 > 33
----
1
2
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_989

statement ok
DROP VIEW view_2_tab1_989

statement ok
DROP VIEW view_3_tab1_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_989') DROP VIEW view_1_tab2_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_989') DROP VIEW view_2_tab2_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_989') DROP VIEW view_3_tab2_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_989

statement ok
CREATE VIEW view_1_tab2_989 AS SELECT pk, col0 FROM tab2 WHERE col3 > 33

statement ok
CREATE VIEW view_2_tab2_989 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 33)

statement ok
CREATE VIEW view_3_tab2_989 AS SELECT pk FROM view_1_tab2_989

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE col3 > 33
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 33)
----
0
87
3
18
4
84

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_989
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_989
----
0
87
3
18
4
84

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 33 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_989 UNION ALL SELECT pk, col0 FROM view_2_tab2_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 33 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_989 UNION SELECT pk, col0 FROM view_2_tab2_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 33 ) AS tab2_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE col3 > 33
----
1
2
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_989

statement ok
DROP VIEW view_2_tab2_989

statement ok
DROP VIEW view_3_tab2_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_989') DROP VIEW view_1_tab3_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_989') DROP VIEW view_2_tab3_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_989') DROP VIEW view_3_tab3_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_989

statement ok
CREATE VIEW view_1_tab3_989 AS SELECT pk, col0 FROM tab3 WHERE col3 > 33

statement ok
CREATE VIEW view_2_tab3_989 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 33)

statement ok
CREATE VIEW view_3_tab3_989 AS SELECT pk FROM view_1_tab3_989

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE col3 > 33
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 33)
----
0
87
3
18
4
84

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_989
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_989
----
0
87
3
18
4
84

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 33 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_989 UNION ALL SELECT pk, col0 FROM view_2_tab3_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 33 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_989 UNION SELECT pk, col0 FROM view_2_tab3_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 33 ) AS tab3_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE col3 > 33
----
1
2
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_989

statement ok
DROP VIEW view_2_tab3_989

statement ok
DROP VIEW view_3_tab3_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_989') DROP VIEW view_1_tab4_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_989') DROP VIEW view_2_tab4_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_989') DROP VIEW view_3_tab4_989

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_989

statement ok
CREATE VIEW view_1_tab4_989 AS SELECT pk, col0 FROM tab4 WHERE col3 > 33

statement ok
CREATE VIEW view_2_tab4_989 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 33)

statement ok
CREATE VIEW view_3_tab4_989 AS SELECT pk FROM view_1_tab4_989

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE col3 > 33
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 33)
----
0
87
3
18
4
84

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_989
----
14 values hashing to f9ed0880d0483fbbca5bf4f2357c601f

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_989
----
0
87
3
18
4
84

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 33 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_989 UNION ALL SELECT pk, col0 FROM view_2_tab4_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 33 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 33)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_989 UNION SELECT pk, col0 FROM view_2_tab4_989
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 33 ) AS tab4_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_989
----
1
2
5
6
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE col3 > 33
----
1
2
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_989

statement ok
DROP VIEW view_2_tab4_989

statement ok
DROP VIEW view_3_tab4_989

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_990') DROP VIEW view_1_tab0_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_990') DROP VIEW view_2_tab0_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_990') DROP VIEW view_3_tab0_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_990

statement ok
CREATE VIEW view_1_tab0_990 AS SELECT pk, col0 FROM tab0 WHERE (col3 <= 3)

statement ok
CREATE VIEW view_2_tab0_990 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3))

statement ok
CREATE VIEW view_3_tab0_990 AS SELECT pk FROM view_1_tab0_990

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE (col3 <= 3)
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3))
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_990
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_990
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_990 UNION ALL SELECT pk, col0 FROM view_2_tab0_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_990 UNION SELECT pk, col0 FROM view_2_tab0_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) ) AS tab0_990
----
3

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_990
----
3

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE (col3 <= 3)
----
3

statement ok
DROP VIEW view_1_tab0_990

statement ok
DROP VIEW view_2_tab0_990

statement ok
DROP VIEW view_3_tab0_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_990') DROP VIEW view_1_tab1_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_990') DROP VIEW view_2_tab1_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_990') DROP VIEW view_3_tab1_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_990

statement ok
CREATE VIEW view_1_tab1_990 AS SELECT pk, col0 FROM tab1 WHERE (col3 <= 3)

statement ok
CREATE VIEW view_2_tab1_990 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3))

statement ok
CREATE VIEW view_3_tab1_990 AS SELECT pk FROM view_1_tab1_990

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE (col3 <= 3)
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3))
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_990
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_990
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_990 UNION ALL SELECT pk, col0 FROM view_2_tab1_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_990 UNION SELECT pk, col0 FROM view_2_tab1_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) ) AS tab1_990
----
3

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_990
----
3

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE (col3 <= 3)
----
3

statement ok
DROP VIEW view_1_tab1_990

statement ok
DROP VIEW view_2_tab1_990

statement ok
DROP VIEW view_3_tab1_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_990') DROP VIEW view_1_tab2_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_990') DROP VIEW view_2_tab2_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_990') DROP VIEW view_3_tab2_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_990

statement ok
CREATE VIEW view_1_tab2_990 AS SELECT pk, col0 FROM tab2 WHERE (col3 <= 3)

statement ok
CREATE VIEW view_2_tab2_990 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3))

statement ok
CREATE VIEW view_3_tab2_990 AS SELECT pk FROM view_1_tab2_990

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE (col3 <= 3)
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3))
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_990
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_990
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_990 UNION ALL SELECT pk, col0 FROM view_2_tab2_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_990 UNION SELECT pk, col0 FROM view_2_tab2_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) ) AS tab2_990
----
3

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_990
----
3

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE (col3 <= 3)
----
3

statement ok
DROP VIEW view_1_tab2_990

statement ok
DROP VIEW view_2_tab2_990

statement ok
DROP VIEW view_3_tab2_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_990') DROP VIEW view_1_tab3_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_990') DROP VIEW view_2_tab3_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_990') DROP VIEW view_3_tab3_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_990

statement ok
CREATE VIEW view_1_tab3_990 AS SELECT pk, col0 FROM tab3 WHERE (col3 <= 3)

statement ok
CREATE VIEW view_2_tab3_990 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3))

statement ok
CREATE VIEW view_3_tab3_990 AS SELECT pk FROM view_1_tab3_990

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE (col3 <= 3)
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3))
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_990
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_990
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_990 UNION ALL SELECT pk, col0 FROM view_2_tab3_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_990 UNION SELECT pk, col0 FROM view_2_tab3_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) ) AS tab3_990
----
3

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_990
----
3

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE (col3 <= 3)
----
3

statement ok
DROP VIEW view_1_tab3_990

statement ok
DROP VIEW view_2_tab3_990

statement ok
DROP VIEW view_3_tab3_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_990') DROP VIEW view_1_tab4_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_990') DROP VIEW view_2_tab4_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_990') DROP VIEW view_3_tab4_990

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_990

statement ok
CREATE VIEW view_1_tab4_990 AS SELECT pk, col0 FROM tab4 WHERE (col3 <= 3)

statement ok
CREATE VIEW view_2_tab4_990 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3))

statement ok
CREATE VIEW view_3_tab4_990 AS SELECT pk FROM view_1_tab4_990

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE (col3 <= 3)
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3))
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_990
----
3
18

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_990
----
18 values hashing to e586173de9d86eb671a6c44a116db490

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_990 UNION ALL SELECT pk, col0 FROM view_2_tab4_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_990 UNION SELECT pk, col0 FROM view_2_tab4_990
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) ) AS tab4_990
----
3

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_990
----
3

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE (col3 <= 3)
----
3

statement ok
DROP VIEW view_1_tab4_990

statement ok
DROP VIEW view_2_tab4_990

statement ok
DROP VIEW view_3_tab4_990

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_991') DROP VIEW view_1_tab0_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_991') DROP VIEW view_2_tab0_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_991') DROP VIEW view_3_tab0_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_991

statement ok
CREATE VIEW view_1_tab0_991 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 4 OR col0 IN (2,19,4,56))

statement ok
CREATE VIEW view_2_tab0_991 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))

statement ok
CREATE VIEW view_3_tab0_991 AS SELECT pk FROM view_1_tab0_991

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_991
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_991
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_991 UNION ALL SELECT pk, col0 FROM view_2_tab0_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_991 UNION SELECT pk, col0 FROM view_2_tab0_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) ) AS tab0_991
----
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_991
----
9

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9

statement ok
DROP VIEW view_1_tab0_991

statement ok
DROP VIEW view_2_tab0_991

statement ok
DROP VIEW view_3_tab0_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_991') DROP VIEW view_1_tab1_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_991') DROP VIEW view_2_tab1_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_991') DROP VIEW view_3_tab1_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_991

statement ok
CREATE VIEW view_1_tab1_991 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 4 OR col0 IN (2,19,4,56))

statement ok
CREATE VIEW view_2_tab1_991 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))

statement ok
CREATE VIEW view_3_tab1_991 AS SELECT pk FROM view_1_tab1_991

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_991
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_991
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_991 UNION ALL SELECT pk, col0 FROM view_2_tab1_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_991 UNION SELECT pk, col0 FROM view_2_tab1_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) ) AS tab1_991
----
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_991
----
9

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9

statement ok
DROP VIEW view_1_tab1_991

statement ok
DROP VIEW view_2_tab1_991

statement ok
DROP VIEW view_3_tab1_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_991') DROP VIEW view_1_tab2_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_991') DROP VIEW view_2_tab2_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_991') DROP VIEW view_3_tab2_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_991

statement ok
CREATE VIEW view_1_tab2_991 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 4 OR col0 IN (2,19,4,56))

statement ok
CREATE VIEW view_2_tab2_991 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))

statement ok
CREATE VIEW view_3_tab2_991 AS SELECT pk FROM view_1_tab2_991

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_991
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_991
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_991 UNION ALL SELECT pk, col0 FROM view_2_tab2_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_991 UNION SELECT pk, col0 FROM view_2_tab2_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) ) AS tab2_991
----
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_991
----
9

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9

statement ok
DROP VIEW view_1_tab2_991

statement ok
DROP VIEW view_2_tab2_991

statement ok
DROP VIEW view_3_tab2_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_991') DROP VIEW view_1_tab3_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_991') DROP VIEW view_2_tab3_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_991') DROP VIEW view_3_tab3_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_991

statement ok
CREATE VIEW view_1_tab3_991 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 4 OR col0 IN (2,19,4,56))

statement ok
CREATE VIEW view_2_tab3_991 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))

statement ok
CREATE VIEW view_3_tab3_991 AS SELECT pk FROM view_1_tab3_991

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_991
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_991
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_991 UNION ALL SELECT pk, col0 FROM view_2_tab3_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_991 UNION SELECT pk, col0 FROM view_2_tab3_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) ) AS tab3_991
----
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_991
----
9

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9

statement ok
DROP VIEW view_1_tab3_991

statement ok
DROP VIEW view_2_tab3_991

statement ok
DROP VIEW view_3_tab3_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_991') DROP VIEW view_1_tab4_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_991') DROP VIEW view_2_tab4_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_991') DROP VIEW view_3_tab4_991

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_991

statement ok
CREATE VIEW view_1_tab4_991 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 4 OR col0 IN (2,19,4,56))

statement ok
CREATE VIEW view_2_tab4_991 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))

statement ok
CREATE VIEW view_3_tab4_991 AS SELECT pk FROM view_1_tab4_991

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_991
----
9
0

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_991
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_991 UNION ALL SELECT pk, col0 FROM view_2_tab4_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 4 OR col0 IN (2,19,4,56)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_991 UNION SELECT pk, col0 FROM view_2_tab4_991
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 4 OR col0 IN (2,19,4,56)) ) AS tab4_991
----
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_991
----
9

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE (col0 < 4 OR col0 IN (2,19,4,56))
----
9

statement ok
DROP VIEW view_1_tab4_991

statement ok
DROP VIEW view_2_tab4_991

statement ok
DROP VIEW view_3_tab4_991

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_993') DROP VIEW view_1_tab0_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_993') DROP VIEW view_2_tab0_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_993') DROP VIEW view_3_tab0_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_993

statement ok
CREATE VIEW view_1_tab0_993 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 25

statement ok
CREATE VIEW view_2_tab0_993 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 25)

statement ok
CREATE VIEW view_3_tab0_993 AS SELECT pk FROM view_1_tab0_993

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 25
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 25)
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_993
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_993
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 25 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_993 UNION ALL SELECT pk, col0 FROM view_2_tab0_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 25 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_993 UNION SELECT pk, col0 FROM view_2_tab0_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 25 ) AS tab0_993
----
0
3

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_993
----
0
3

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col3 <= 25
----
0
3

statement ok
DROP VIEW view_1_tab0_993

statement ok
DROP VIEW view_2_tab0_993

statement ok
DROP VIEW view_3_tab0_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_993') DROP VIEW view_1_tab1_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_993') DROP VIEW view_2_tab1_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_993') DROP VIEW view_3_tab1_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_993

statement ok
CREATE VIEW view_1_tab1_993 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 25

statement ok
CREATE VIEW view_2_tab1_993 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 25)

statement ok
CREATE VIEW view_3_tab1_993 AS SELECT pk FROM view_1_tab1_993

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 25
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 25)
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_993
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_993
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 25 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_993 UNION ALL SELECT pk, col0 FROM view_2_tab1_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 25 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_993 UNION SELECT pk, col0 FROM view_2_tab1_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 25 ) AS tab1_993
----
0
3

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_993
----
0
3

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col3 <= 25
----
0
3

statement ok
DROP VIEW view_1_tab1_993

statement ok
DROP VIEW view_2_tab1_993

statement ok
DROP VIEW view_3_tab1_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_993') DROP VIEW view_1_tab2_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_993') DROP VIEW view_2_tab2_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_993') DROP VIEW view_3_tab2_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_993

statement ok
CREATE VIEW view_1_tab2_993 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 25

statement ok
CREATE VIEW view_2_tab2_993 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 25)

statement ok
CREATE VIEW view_3_tab2_993 AS SELECT pk FROM view_1_tab2_993

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 25
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 25)
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_993
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_993
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 25 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_993 UNION ALL SELECT pk, col0 FROM view_2_tab2_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 25 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_993 UNION SELECT pk, col0 FROM view_2_tab2_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 25 ) AS tab2_993
----
0
3

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_993
----
0
3

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col3 <= 25
----
0
3

statement ok
DROP VIEW view_1_tab2_993

statement ok
DROP VIEW view_2_tab2_993

statement ok
DROP VIEW view_3_tab2_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_993') DROP VIEW view_1_tab3_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_993') DROP VIEW view_2_tab3_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_993') DROP VIEW view_3_tab3_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_993

statement ok
CREATE VIEW view_1_tab3_993 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 25

statement ok
CREATE VIEW view_2_tab3_993 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 25)

statement ok
CREATE VIEW view_3_tab3_993 AS SELECT pk FROM view_1_tab3_993

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 25
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 25)
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_993
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_993
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 25 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_993 UNION ALL SELECT pk, col0 FROM view_2_tab3_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 25 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_993 UNION SELECT pk, col0 FROM view_2_tab3_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 25 ) AS tab3_993
----
0
3

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_993
----
0
3

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col3 <= 25
----
0
3

statement ok
DROP VIEW view_1_tab3_993

statement ok
DROP VIEW view_2_tab3_993

statement ok
DROP VIEW view_3_tab3_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_993') DROP VIEW view_1_tab4_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_993') DROP VIEW view_2_tab4_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_993') DROP VIEW view_3_tab4_993

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_993

statement ok
CREATE VIEW view_1_tab4_993 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 25

statement ok
CREATE VIEW view_2_tab4_993 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 25)

statement ok
CREATE VIEW view_3_tab4_993 AS SELECT pk FROM view_1_tab4_993

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 25
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 25)
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_993
----
0
87
3
18

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_993
----
16 values hashing to 77dabd822fa80cf2834cf15eef3d660e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 25 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_993 UNION ALL SELECT pk, col0 FROM view_2_tab4_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 25 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_993 UNION SELECT pk, col0 FROM view_2_tab4_993
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 25 ) AS tab4_993
----
0
3

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_993
----
0
3

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col3 <= 25
----
0
3

statement ok
DROP VIEW view_1_tab4_993

statement ok
DROP VIEW view_2_tab4_993

statement ok
DROP VIEW view_3_tab4_993

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_994') DROP VIEW view_1_tab0_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_994') DROP VIEW view_2_tab0_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_994') DROP VIEW view_3_tab0_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_994

statement ok
CREATE VIEW view_1_tab0_994 AS SELECT pk, col0 FROM tab0 WHERE ((col4 >= 49.48 AND col3 < 75))

statement ok
CREATE VIEW view_2_tab0_994 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))

statement ok
CREATE VIEW view_3_tab0_994 AS SELECT pk FROM view_1_tab0_994

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 49.48 AND col3 < 75))
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
1
35
4
84
6
59

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_994
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_994
----
1
35
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_994 UNION ALL SELECT pk, col0 FROM view_2_tab0_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_994 UNION SELECT pk, col0 FROM view_2_tab0_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 >= 49.48 AND col3 < 75)) ) AS tab0_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE ((col4 >= 49.48 AND col3 < 75))
----
0
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab0_994

statement ok
DROP VIEW view_2_tab0_994

statement ok
DROP VIEW view_3_tab0_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_994') DROP VIEW view_1_tab1_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_994') DROP VIEW view_2_tab1_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_994') DROP VIEW view_3_tab1_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_994

statement ok
CREATE VIEW view_1_tab1_994 AS SELECT pk, col0 FROM tab1 WHERE ((col4 >= 49.48 AND col3 < 75))

statement ok
CREATE VIEW view_2_tab1_994 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))

statement ok
CREATE VIEW view_3_tab1_994 AS SELECT pk FROM view_1_tab1_994

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 49.48 AND col3 < 75))
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
1
35
4
84
6
59

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_994
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_994
----
1
35
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_994 UNION ALL SELECT pk, col0 FROM view_2_tab1_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_994 UNION SELECT pk, col0 FROM view_2_tab1_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 >= 49.48 AND col3 < 75)) ) AS tab1_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE ((col4 >= 49.48 AND col3 < 75))
----
0
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab1_994

statement ok
DROP VIEW view_2_tab1_994

statement ok
DROP VIEW view_3_tab1_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_994') DROP VIEW view_1_tab2_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_994') DROP VIEW view_2_tab2_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_994') DROP VIEW view_3_tab2_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_994

statement ok
CREATE VIEW view_1_tab2_994 AS SELECT pk, col0 FROM tab2 WHERE ((col4 >= 49.48 AND col3 < 75))

statement ok
CREATE VIEW view_2_tab2_994 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))

statement ok
CREATE VIEW view_3_tab2_994 AS SELECT pk FROM view_1_tab2_994

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 49.48 AND col3 < 75))
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
1
35
4
84
6
59

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_994
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_994
----
1
35
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_994 UNION ALL SELECT pk, col0 FROM view_2_tab2_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_994 UNION SELECT pk, col0 FROM view_2_tab2_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 >= 49.48 AND col3 < 75)) ) AS tab2_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE ((col4 >= 49.48 AND col3 < 75))
----
0
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab2_994

statement ok
DROP VIEW view_2_tab2_994

statement ok
DROP VIEW view_3_tab2_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_994') DROP VIEW view_1_tab3_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_994') DROP VIEW view_2_tab3_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_994') DROP VIEW view_3_tab3_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_994

statement ok
CREATE VIEW view_1_tab3_994 AS SELECT pk, col0 FROM tab3 WHERE ((col4 >= 49.48 AND col3 < 75))

statement ok
CREATE VIEW view_2_tab3_994 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))

statement ok
CREATE VIEW view_3_tab3_994 AS SELECT pk FROM view_1_tab3_994

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 49.48 AND col3 < 75))
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
1
35
4
84
6
59

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_994
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_994
----
1
35
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_994 UNION ALL SELECT pk, col0 FROM view_2_tab3_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_994 UNION SELECT pk, col0 FROM view_2_tab3_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 >= 49.48 AND col3 < 75)) ) AS tab3_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE ((col4 >= 49.48 AND col3 < 75))
----
0
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab3_994

statement ok
DROP VIEW view_2_tab3_994

statement ok
DROP VIEW view_3_tab3_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_994') DROP VIEW view_1_tab4_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_994') DROP VIEW view_2_tab4_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_994') DROP VIEW view_3_tab4_994

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_994

statement ok
CREATE VIEW view_1_tab4_994 AS SELECT pk, col0 FROM tab4 WHERE ((col4 >= 49.48 AND col3 < 75))

statement ok
CREATE VIEW view_2_tab4_994 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))

statement ok
CREATE VIEW view_3_tab4_994 AS SELECT pk FROM view_1_tab4_994

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 49.48 AND col3 < 75))
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
1
35
4
84
6
59

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_994
----
14 values hashing to 3c9fbf745e901e22c2a5ea4272bd1e58

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_994
----
1
35
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_994 UNION ALL SELECT pk, col0 FROM view_2_tab4_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 49.48 AND col3 < 75)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 49.48 AND col3 < 75)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_994 UNION SELECT pk, col0 FROM view_2_tab4_994
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 >= 49.48 AND col3 < 75)) ) AS tab4_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_994
----
0
2
3
5
7
8
9

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE ((col4 >= 49.48 AND col3 < 75))
----
0
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab4_994

statement ok
DROP VIEW view_2_tab4_994

statement ok
DROP VIEW view_3_tab4_994

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_995') DROP VIEW view_1_tab0_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_995') DROP VIEW view_2_tab0_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_995') DROP VIEW view_3_tab0_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_995

statement ok
CREATE VIEW view_1_tab0_995 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)

statement ok
CREATE VIEW view_2_tab0_995 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))

statement ok
CREATE VIEW view_3_tab0_995 AS SELECT pk FROM view_1_tab0_995

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
9
0

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_995
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_995
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_995 UNION ALL SELECT pk, col0 FROM view_2_tab0_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_995 UNION SELECT pk, col0 FROM view_2_tab0_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) ) AS tab0_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab0_995

statement ok
DROP VIEW view_2_tab0_995

statement ok
DROP VIEW view_3_tab0_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_995') DROP VIEW view_1_tab1_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_995') DROP VIEW view_2_tab1_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_995') DROP VIEW view_3_tab1_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_995

statement ok
CREATE VIEW view_1_tab1_995 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)

statement ok
CREATE VIEW view_2_tab1_995 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))

statement ok
CREATE VIEW view_3_tab1_995 AS SELECT pk FROM view_1_tab1_995

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
9
0

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_995
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_995
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_995 UNION ALL SELECT pk, col0 FROM view_2_tab1_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_995 UNION SELECT pk, col0 FROM view_2_tab1_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) ) AS tab1_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab1_995

statement ok
DROP VIEW view_2_tab1_995

statement ok
DROP VIEW view_3_tab1_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_995') DROP VIEW view_1_tab2_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_995') DROP VIEW view_2_tab2_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_995') DROP VIEW view_3_tab2_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_995

statement ok
CREATE VIEW view_1_tab2_995 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)

statement ok
CREATE VIEW view_2_tab2_995 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))

statement ok
CREATE VIEW view_3_tab2_995 AS SELECT pk FROM view_1_tab2_995

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
9
0

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_995
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_995
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_995 UNION ALL SELECT pk, col0 FROM view_2_tab2_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_995 UNION SELECT pk, col0 FROM view_2_tab2_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) ) AS tab2_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab2_995

statement ok
DROP VIEW view_2_tab2_995

statement ok
DROP VIEW view_3_tab2_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_995') DROP VIEW view_1_tab3_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_995') DROP VIEW view_2_tab3_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_995') DROP VIEW view_3_tab3_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_995

statement ok
CREATE VIEW view_1_tab3_995 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)

statement ok
CREATE VIEW view_2_tab3_995 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))

statement ok
CREATE VIEW view_3_tab3_995 AS SELECT pk FROM view_1_tab3_995

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
9
0

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_995
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_995
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_995 UNION ALL SELECT pk, col0 FROM view_2_tab3_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_995 UNION SELECT pk, col0 FROM view_2_tab3_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) ) AS tab3_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab3_995

statement ok
DROP VIEW view_2_tab3_995

statement ok
DROP VIEW view_3_tab3_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_995') DROP VIEW view_1_tab4_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_995') DROP VIEW view_2_tab4_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_995') DROP VIEW view_3_tab4_995

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_995

statement ok
CREATE VIEW view_1_tab4_995 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)

statement ok
CREATE VIEW view_2_tab4_995 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))

statement ok
CREATE VIEW view_3_tab4_995 AS SELECT pk FROM view_1_tab4_995

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
9
0

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_995
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_995
----
9
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_995 UNION ALL SELECT pk, col0 FROM view_2_tab4_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 4 OR col3 >= 69 AND col4 = 33.10))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_995 UNION SELECT pk, col0 FROM view_2_tab4_995
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10) ) AS tab4_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_995
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE (col0 > 4 OR col3 >= 69 AND col4 = 33.10)
----
9 values hashing to 6ba058c53c08bb0173bcc14ce59aeeff

statement ok
DROP VIEW view_1_tab4_995

statement ok
DROP VIEW view_2_tab4_995

statement ok
DROP VIEW view_3_tab4_995

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_996') DROP VIEW view_1_tab0_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_996') DROP VIEW view_2_tab0_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_996') DROP VIEW view_3_tab0_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_996

statement ok
CREATE VIEW view_1_tab0_996 AS SELECT pk, col0 FROM tab0 WHERE col1 > 33.28

statement ok
CREATE VIEW view_2_tab0_996 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 33.28)

statement ok
CREATE VIEW view_3_tab0_996 AS SELECT pk FROM view_1_tab0_996

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE col1 > 33.28
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 33.28)
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_996
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_996
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 33.28 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_996 UNION ALL SELECT pk, col0 FROM view_2_tab0_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 33.28 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_996 UNION SELECT pk, col0 FROM view_2_tab0_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 33.28 ) AS tab0_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE col1 > 33.28
----
0
1
3
7
9

statement ok
DROP VIEW view_1_tab0_996

statement ok
DROP VIEW view_2_tab0_996

statement ok
DROP VIEW view_3_tab0_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_996') DROP VIEW view_1_tab1_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_996') DROP VIEW view_2_tab1_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_996') DROP VIEW view_3_tab1_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_996

statement ok
CREATE VIEW view_1_tab1_996 AS SELECT pk, col0 FROM tab1 WHERE col1 > 33.28

statement ok
CREATE VIEW view_2_tab1_996 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 33.28)

statement ok
CREATE VIEW view_3_tab1_996 AS SELECT pk FROM view_1_tab1_996

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE col1 > 33.28
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 33.28)
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_996
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_996
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 33.28 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_996 UNION ALL SELECT pk, col0 FROM view_2_tab1_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 33.28 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_996 UNION SELECT pk, col0 FROM view_2_tab1_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 33.28 ) AS tab1_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE col1 > 33.28
----
0
1
3
7
9

statement ok
DROP VIEW view_1_tab1_996

statement ok
DROP VIEW view_2_tab1_996

statement ok
DROP VIEW view_3_tab1_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_996') DROP VIEW view_1_tab2_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_996') DROP VIEW view_2_tab2_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_996') DROP VIEW view_3_tab2_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_996

statement ok
CREATE VIEW view_1_tab2_996 AS SELECT pk, col0 FROM tab2 WHERE col1 > 33.28

statement ok
CREATE VIEW view_2_tab2_996 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 33.28)

statement ok
CREATE VIEW view_3_tab2_996 AS SELECT pk FROM view_1_tab2_996

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE col1 > 33.28
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 33.28)
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_996
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_996
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 33.28 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_996 UNION ALL SELECT pk, col0 FROM view_2_tab2_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 33.28 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_996 UNION SELECT pk, col0 FROM view_2_tab2_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 33.28 ) AS tab2_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE col1 > 33.28
----
0
1
3
7
9

statement ok
DROP VIEW view_1_tab2_996

statement ok
DROP VIEW view_2_tab2_996

statement ok
DROP VIEW view_3_tab2_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_996') DROP VIEW view_1_tab3_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_996') DROP VIEW view_2_tab3_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_996') DROP VIEW view_3_tab3_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_996

statement ok
CREATE VIEW view_1_tab3_996 AS SELECT pk, col0 FROM tab3 WHERE col1 > 33.28

statement ok
CREATE VIEW view_2_tab3_996 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 33.28)

statement ok
CREATE VIEW view_3_tab3_996 AS SELECT pk FROM view_1_tab3_996

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE col1 > 33.28
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 33.28)
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_996
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_996
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 33.28 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_996 UNION ALL SELECT pk, col0 FROM view_2_tab3_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 33.28 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_996 UNION SELECT pk, col0 FROM view_2_tab3_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 33.28 ) AS tab3_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE col1 > 33.28
----
0
1
3
7
9

statement ok
DROP VIEW view_1_tab3_996

statement ok
DROP VIEW view_2_tab3_996

statement ok
DROP VIEW view_3_tab3_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_996') DROP VIEW view_1_tab4_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_996') DROP VIEW view_2_tab4_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_996') DROP VIEW view_3_tab4_996

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_996

statement ok
CREATE VIEW view_1_tab4_996 AS SELECT pk, col0 FROM tab4 WHERE col1 > 33.28

statement ok
CREATE VIEW view_2_tab4_996 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 33.28)

statement ok
CREATE VIEW view_3_tab4_996 AS SELECT pk FROM view_1_tab4_996

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE col1 > 33.28
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 33.28)
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_996
----
10 values hashing to a042915a20233a52cb5a8948a7e03841

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_996
----
10 values hashing to 2c15d95917ef1e85d59f2314047c532e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 33.28 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_996 UNION ALL SELECT pk, col0 FROM view_2_tab4_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 33.28 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 33.28)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_996 UNION SELECT pk, col0 FROM view_2_tab4_996
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 33.28 ) AS tab4_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_996
----
0
1
3
7
9

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE col1 > 33.28
----
0
1
3
7
9

statement ok
DROP VIEW view_1_tab4_996

statement ok
DROP VIEW view_2_tab4_996

statement ok
DROP VIEW view_3_tab4_996

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_997') DROP VIEW view_1_tab0_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_997') DROP VIEW view_2_tab0_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_997') DROP VIEW view_3_tab0_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_997

statement ok
CREATE VIEW view_1_tab0_997 AS SELECT pk, col0 FROM tab0 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61

statement ok
CREATE VIEW view_2_tab0_997 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)

statement ok
CREATE VIEW view_3_tab0_997 AS SELECT pk FROM view_1_tab0_997

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_997
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_997
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_997 UNION ALL SELECT pk, col0 FROM view_2_tab0_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_997 UNION SELECT pk, col0 FROM view_2_tab0_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 ) AS tab0_997
----
2
6

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_997
----
2
6

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
6

statement ok
DROP VIEW view_1_tab0_997

statement ok
DROP VIEW view_2_tab0_997

statement ok
DROP VIEW view_3_tab0_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_997') DROP VIEW view_1_tab1_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_997') DROP VIEW view_2_tab1_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_997') DROP VIEW view_3_tab1_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_997

statement ok
CREATE VIEW view_1_tab1_997 AS SELECT pk, col0 FROM tab1 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61

statement ok
CREATE VIEW view_2_tab1_997 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)

statement ok
CREATE VIEW view_3_tab1_997 AS SELECT pk FROM view_1_tab1_997

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_997
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_997
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_997 UNION ALL SELECT pk, col0 FROM view_2_tab1_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_997 UNION SELECT pk, col0 FROM view_2_tab1_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 ) AS tab1_997
----
2
6

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_997
----
2
6

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
6

statement ok
DROP VIEW view_1_tab1_997

statement ok
DROP VIEW view_2_tab1_997

statement ok
DROP VIEW view_3_tab1_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_997') DROP VIEW view_1_tab2_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_997') DROP VIEW view_2_tab2_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_997') DROP VIEW view_3_tab2_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_997

statement ok
CREATE VIEW view_1_tab2_997 AS SELECT pk, col0 FROM tab2 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61

statement ok
CREATE VIEW view_2_tab2_997 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)

statement ok
CREATE VIEW view_3_tab2_997 AS SELECT pk FROM view_1_tab2_997

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_997
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_997
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_997 UNION ALL SELECT pk, col0 FROM view_2_tab2_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_997 UNION SELECT pk, col0 FROM view_2_tab2_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 ) AS tab2_997
----
2
6

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_997
----
2
6

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
6

statement ok
DROP VIEW view_1_tab2_997

statement ok
DROP VIEW view_2_tab2_997

statement ok
DROP VIEW view_3_tab2_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_997') DROP VIEW view_1_tab3_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_997') DROP VIEW view_2_tab3_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_997') DROP VIEW view_3_tab3_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_997

statement ok
CREATE VIEW view_1_tab3_997 AS SELECT pk, col0 FROM tab3 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61

statement ok
CREATE VIEW view_2_tab3_997 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)

statement ok
CREATE VIEW view_3_tab3_997 AS SELECT pk FROM view_1_tab3_997

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_997
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_997
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_997 UNION ALL SELECT pk, col0 FROM view_2_tab3_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_997 UNION SELECT pk, col0 FROM view_2_tab3_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 ) AS tab3_997
----
2
6

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_997
----
2
6

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
6

statement ok
DROP VIEW view_1_tab3_997

statement ok
DROP VIEW view_2_tab3_997

statement ok
DROP VIEW view_3_tab3_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_997') DROP VIEW view_1_tab4_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_997') DROP VIEW view_2_tab4_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_997') DROP VIEW view_3_tab4_997

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_997

statement ok
CREATE VIEW view_1_tab4_997 AS SELECT pk, col0 FROM tab4 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61

statement ok
CREATE VIEW view_2_tab4_997 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)

statement ok
CREATE VIEW view_3_tab4_997 AS SELECT pk FROM view_1_tab4_997

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_997
----
2
73
6
59

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_997
----
16 values hashing to d933625a2060a6c9f8974c1a35f48c2b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_997 UNION ALL SELECT pk, col0 FROM view_2_tab4_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_997 UNION SELECT pk, col0 FROM view_2_tab4_997
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61 ) AS tab4_997
----
2
6

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_997
----
2
6

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE col0 = 52 OR col3 >= 30 AND col1 < 12.24 AND col3 > 61
----
2
6

statement ok
DROP VIEW view_1_tab4_997

statement ok
DROP VIEW view_2_tab4_997

statement ok
DROP VIEW view_3_tab4_997

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_998') DROP VIEW view_1_tab0_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_998') DROP VIEW view_2_tab0_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_998') DROP VIEW view_3_tab0_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_998

statement ok
CREATE VIEW view_1_tab0_998 AS SELECT pk, col0 FROM tab0 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL

statement ok
CREATE VIEW view_2_tab0_998 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)

statement ok
CREATE VIEW view_3_tab0_998 AS SELECT pk FROM view_1_tab0_998

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_998
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_998 UNION ALL SELECT pk, col0 FROM view_2_tab0_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_998 UNION SELECT pk, col0 FROM view_2_tab0_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL ) AS tab0_998
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_998
----

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

statement ok
DROP VIEW view_1_tab0_998

statement ok
DROP VIEW view_2_tab0_998

statement ok
DROP VIEW view_3_tab0_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_998') DROP VIEW view_1_tab1_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_998') DROP VIEW view_2_tab1_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_998') DROP VIEW view_3_tab1_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_998

statement ok
CREATE VIEW view_1_tab1_998 AS SELECT pk, col0 FROM tab1 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL

statement ok
CREATE VIEW view_2_tab1_998 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)

statement ok
CREATE VIEW view_3_tab1_998 AS SELECT pk FROM view_1_tab1_998

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_998
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_998 UNION ALL SELECT pk, col0 FROM view_2_tab1_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_998 UNION SELECT pk, col0 FROM view_2_tab1_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL ) AS tab1_998
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_998
----

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

statement ok
DROP VIEW view_1_tab1_998

statement ok
DROP VIEW view_2_tab1_998

statement ok
DROP VIEW view_3_tab1_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_998') DROP VIEW view_1_tab2_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_998') DROP VIEW view_2_tab2_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_998') DROP VIEW view_3_tab2_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_998

statement ok
CREATE VIEW view_1_tab2_998 AS SELECT pk, col0 FROM tab2 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL

statement ok
CREATE VIEW view_2_tab2_998 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)

statement ok
CREATE VIEW view_3_tab2_998 AS SELECT pk FROM view_1_tab2_998

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_998
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_998 UNION ALL SELECT pk, col0 FROM view_2_tab2_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_998 UNION SELECT pk, col0 FROM view_2_tab2_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL ) AS tab2_998
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_998
----

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

statement ok
DROP VIEW view_1_tab2_998

statement ok
DROP VIEW view_2_tab2_998

statement ok
DROP VIEW view_3_tab2_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_998') DROP VIEW view_1_tab3_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_998') DROP VIEW view_2_tab3_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_998') DROP VIEW view_3_tab3_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_998

statement ok
CREATE VIEW view_1_tab3_998 AS SELECT pk, col0 FROM tab3 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL

statement ok
CREATE VIEW view_2_tab3_998 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)

statement ok
CREATE VIEW view_3_tab3_998 AS SELECT pk FROM view_1_tab3_998

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_998
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_998 UNION ALL SELECT pk, col0 FROM view_2_tab3_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_998 UNION SELECT pk, col0 FROM view_2_tab3_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL ) AS tab3_998
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_998
----

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

statement ok
DROP VIEW view_1_tab3_998

statement ok
DROP VIEW view_2_tab3_998

statement ok
DROP VIEW view_3_tab3_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_998') DROP VIEW view_1_tab4_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_998') DROP VIEW view_2_tab4_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_998') DROP VIEW view_3_tab4_998

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_998

statement ok
CREATE VIEW view_1_tab4_998 AS SELECT pk, col0 FROM tab4 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL

statement ok
CREATE VIEW view_2_tab4_998 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)

statement ok
CREATE VIEW view_3_tab4_998 AS SELECT pk FROM view_1_tab4_998

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_998
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_998 UNION ALL SELECT pk, col0 FROM view_2_tab4_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_998 UNION SELECT pk, col0 FROM view_2_tab4_998
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL ) AS tab4_998
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_998
----

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE (col4 <= 32.24) AND col3 >= 16 AND col3 IN (35,45,28,30,47,60) AND col0 IS NULL
----

statement ok
DROP VIEW view_1_tab4_998

statement ok
DROP VIEW view_2_tab4_998

statement ok
DROP VIEW view_3_tab4_998

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_999') DROP VIEW view_1_tab0_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_999') DROP VIEW view_2_tab0_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_999') DROP VIEW view_3_tab0_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_999

statement ok
CREATE VIEW view_1_tab0_999 AS SELECT pk, col0 FROM tab0 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))

statement ok
CREATE VIEW view_2_tab0_999 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))

statement ok
CREATE VIEW view_3_tab0_999 AS SELECT pk FROM view_1_tab0_999

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
4
84
5
85
8
30

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_999
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_999
----
4
84
5
85
8
30

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_999 UNION ALL SELECT pk, col0 FROM view_2_tab0_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_999 UNION SELECT pk, col0 FROM view_2_tab0_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) ) AS tab0_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
0
1
2
3
6
7
9

statement ok
DROP VIEW view_1_tab0_999

statement ok
DROP VIEW view_2_tab0_999

statement ok
DROP VIEW view_3_tab0_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_999') DROP VIEW view_1_tab1_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_999') DROP VIEW view_2_tab1_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_999') DROP VIEW view_3_tab1_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_999

statement ok
CREATE VIEW view_1_tab1_999 AS SELECT pk, col0 FROM tab1 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))

statement ok
CREATE VIEW view_2_tab1_999 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))

statement ok
CREATE VIEW view_3_tab1_999 AS SELECT pk FROM view_1_tab1_999

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
4
84
5
85
8
30

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_999
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_999
----
4
84
5
85
8
30

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_999 UNION ALL SELECT pk, col0 FROM view_2_tab1_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_999 UNION SELECT pk, col0 FROM view_2_tab1_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) ) AS tab1_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
0
1
2
3
6
7
9

statement ok
DROP VIEW view_1_tab1_999

statement ok
DROP VIEW view_2_tab1_999

statement ok
DROP VIEW view_3_tab1_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_999') DROP VIEW view_1_tab2_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_999') DROP VIEW view_2_tab2_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_999') DROP VIEW view_3_tab2_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_999

statement ok
CREATE VIEW view_1_tab2_999 AS SELECT pk, col0 FROM tab2 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))

statement ok
CREATE VIEW view_2_tab2_999 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))

statement ok
CREATE VIEW view_3_tab2_999 AS SELECT pk FROM view_1_tab2_999

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
4
84
5
85
8
30

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_999
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_999
----
4
84
5
85
8
30

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_999 UNION ALL SELECT pk, col0 FROM view_2_tab2_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_999 UNION SELECT pk, col0 FROM view_2_tab2_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) ) AS tab2_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
0
1
2
3
6
7
9

statement ok
DROP VIEW view_1_tab2_999

statement ok
DROP VIEW view_2_tab2_999

statement ok
DROP VIEW view_3_tab2_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_999') DROP VIEW view_1_tab3_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_999') DROP VIEW view_2_tab3_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_999') DROP VIEW view_3_tab3_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_999

statement ok
CREATE VIEW view_1_tab3_999 AS SELECT pk, col0 FROM tab3 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))

statement ok
CREATE VIEW view_2_tab3_999 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))

statement ok
CREATE VIEW view_3_tab3_999 AS SELECT pk FROM view_1_tab3_999

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
4
84
5
85
8
30

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_999
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_999
----
4
84
5
85
8
30

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_999 UNION ALL SELECT pk, col0 FROM view_2_tab3_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_999 UNION SELECT pk, col0 FROM view_2_tab3_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) ) AS tab3_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
0
1
2
3
6
7
9

statement ok
DROP VIEW view_1_tab3_999

statement ok
DROP VIEW view_2_tab3_999

statement ok
DROP VIEW view_3_tab3_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_999') DROP VIEW view_1_tab4_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_999') DROP VIEW view_2_tab4_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_999') DROP VIEW view_3_tab4_999

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_999

statement ok
CREATE VIEW view_1_tab4_999 AS SELECT pk, col0 FROM tab4 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))

statement ok
CREATE VIEW view_2_tab4_999 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))

statement ok
CREATE VIEW view_3_tab4_999 AS SELECT pk FROM view_1_tab4_999

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
4
84
5
85
8
30

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_999
----
14 values hashing to 3a41ef5c295cfff332f4c9344cee46d6

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_999
----
4
84
5
85
8
30

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_999 UNION ALL SELECT pk, col0 FROM view_2_tab4_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_999 UNION SELECT pk, col0 FROM view_2_tab4_999
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70)))) ) AS tab4_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_999
----
0
1
2
3
6
7
9

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col3 > 55 OR ((col0 >= 0 AND ((col3 <= 33 AND (col3 > 13) AND col1 > 55.14 AND col0 < 66 OR (col3 < 48) AND col1 >= 26.70))))
----
0
1
2
3
6
7
9

statement ok
DROP VIEW view_1_tab4_999

statement ok
DROP VIEW view_2_tab4_999

statement ok
DROP VIEW view_3_tab4_999

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1000') DROP VIEW view_1_tab0_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1000') DROP VIEW view_2_tab0_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1000') DROP VIEW view_3_tab0_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1000

statement ok
CREATE VIEW view_1_tab0_1000 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 0 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab0_1000 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 0 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_1000 AS SELECT pk FROM view_1_tab0_1000

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 0 OR col0 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_1000
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 0 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1000 UNION ALL SELECT pk, col0 FROM view_2_tab0_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 > 0 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1000 UNION SELECT pk, col0 FROM view_2_tab0_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 0 OR col0 IS NULL)) ) AS tab0_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE ((col3 > 0 OR col0 IS NULL))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_1000

statement ok
DROP VIEW view_2_tab0_1000

statement ok
DROP VIEW view_3_tab0_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1000') DROP VIEW view_1_tab1_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1000') DROP VIEW view_2_tab1_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1000') DROP VIEW view_3_tab1_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1000

statement ok
CREATE VIEW view_1_tab1_1000 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 0 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab1_1000 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 0 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_1000 AS SELECT pk FROM view_1_tab1_1000

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 0 OR col0 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_1000
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 0 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1000 UNION ALL SELECT pk, col0 FROM view_2_tab1_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 0 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1000 UNION SELECT pk, col0 FROM view_2_tab1_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 0 OR col0 IS NULL)) ) AS tab1_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE ((col3 > 0 OR col0 IS NULL))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_1000

statement ok
DROP VIEW view_2_tab1_1000

statement ok
DROP VIEW view_3_tab1_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1000') DROP VIEW view_1_tab2_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1000') DROP VIEW view_2_tab2_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1000') DROP VIEW view_3_tab2_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1000

statement ok
CREATE VIEW view_1_tab2_1000 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 0 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab2_1000 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 0 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_1000 AS SELECT pk FROM view_1_tab2_1000

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 0 OR col0 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_1000
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 0 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1000 UNION ALL SELECT pk, col0 FROM view_2_tab2_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 0 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1000 UNION SELECT pk, col0 FROM view_2_tab2_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 0 OR col0 IS NULL)) ) AS tab2_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE ((col3 > 0 OR col0 IS NULL))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_1000

statement ok
DROP VIEW view_2_tab2_1000

statement ok
DROP VIEW view_3_tab2_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1000') DROP VIEW view_1_tab3_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1000') DROP VIEW view_2_tab3_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1000') DROP VIEW view_3_tab3_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1000

statement ok
CREATE VIEW view_1_tab3_1000 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 0 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab3_1000 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 0 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_1000 AS SELECT pk FROM view_1_tab3_1000

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 0 OR col0 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_1000
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 0 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1000 UNION ALL SELECT pk, col0 FROM view_2_tab3_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 0 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1000 UNION SELECT pk, col0 FROM view_2_tab3_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 0 OR col0 IS NULL)) ) AS tab3_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE ((col3 > 0 OR col0 IS NULL))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_1000

statement ok
DROP VIEW view_2_tab3_1000

statement ok
DROP VIEW view_3_tab3_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1000') DROP VIEW view_1_tab4_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1000') DROP VIEW view_2_tab4_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1000') DROP VIEW view_3_tab4_1000

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1000

statement ok
CREATE VIEW view_1_tab4_1000 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 0 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab4_1000 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 0 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_1000 AS SELECT pk FROM view_1_tab4_1000

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 0 OR col0 IS NULL))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_1000
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 0 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1000 UNION ALL SELECT pk, col0 FROM view_2_tab4_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 0 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 0 OR col0 IS NULL)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1000 UNION SELECT pk, col0 FROM view_2_tab4_1000
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 0 OR col0 IS NULL)) ) AS tab4_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_1000
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE ((col3 > 0 OR col0 IS NULL))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_1000

statement ok
DROP VIEW view_2_tab4_1000

statement ok
DROP VIEW view_3_tab4_1000

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1001') DROP VIEW view_1_tab0_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1001') DROP VIEW view_2_tab0_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1001') DROP VIEW view_3_tab0_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1001

statement ok
CREATE VIEW view_1_tab0_1001 AS SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))

statement ok
CREATE VIEW view_2_tab0_1001 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))

statement ok
CREATE VIEW view_3_tab0_1001 AS SELECT pk FROM view_1_tab0_1001

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_1001
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_1001
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1001 UNION ALL SELECT pk, col0 FROM view_2_tab0_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1001 UNION SELECT pk, col0 FROM view_2_tab0_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) ) AS tab0_1001
----
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_1001
----
9

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9

statement ok
DROP VIEW view_1_tab0_1001

statement ok
DROP VIEW view_2_tab0_1001

statement ok
DROP VIEW view_3_tab0_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1001') DROP VIEW view_1_tab1_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1001') DROP VIEW view_2_tab1_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1001') DROP VIEW view_3_tab1_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1001

statement ok
CREATE VIEW view_1_tab1_1001 AS SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))

statement ok
CREATE VIEW view_2_tab1_1001 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))

statement ok
CREATE VIEW view_3_tab1_1001 AS SELECT pk FROM view_1_tab1_1001

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_1001
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_1001
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1001 UNION ALL SELECT pk, col0 FROM view_2_tab1_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1001 UNION SELECT pk, col0 FROM view_2_tab1_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) ) AS tab1_1001
----
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_1001
----
9

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9

statement ok
DROP VIEW view_1_tab1_1001

statement ok
DROP VIEW view_2_tab1_1001

statement ok
DROP VIEW view_3_tab1_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1001') DROP VIEW view_1_tab2_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1001') DROP VIEW view_2_tab2_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1001') DROP VIEW view_3_tab2_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1001

statement ok
CREATE VIEW view_1_tab2_1001 AS SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))

statement ok
CREATE VIEW view_2_tab2_1001 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))

statement ok
CREATE VIEW view_3_tab2_1001 AS SELECT pk FROM view_1_tab2_1001

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_1001
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_1001
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1001 UNION ALL SELECT pk, col0 FROM view_2_tab2_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1001 UNION SELECT pk, col0 FROM view_2_tab2_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) ) AS tab2_1001
----
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_1001
----
9

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9

statement ok
DROP VIEW view_1_tab2_1001

statement ok
DROP VIEW view_2_tab2_1001

statement ok
DROP VIEW view_3_tab2_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1001') DROP VIEW view_1_tab3_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1001') DROP VIEW view_2_tab3_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1001') DROP VIEW view_3_tab3_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1001

statement ok
CREATE VIEW view_1_tab3_1001 AS SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))

statement ok
CREATE VIEW view_2_tab3_1001 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))

statement ok
CREATE VIEW view_3_tab3_1001 AS SELECT pk FROM view_1_tab3_1001

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_1001
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_1001
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1001 UNION ALL SELECT pk, col0 FROM view_2_tab3_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1001 UNION SELECT pk, col0 FROM view_2_tab3_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) ) AS tab3_1001
----
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_1001
----
9

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9

statement ok
DROP VIEW view_1_tab3_1001

statement ok
DROP VIEW view_2_tab3_1001

statement ok
DROP VIEW view_3_tab3_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1001') DROP VIEW view_1_tab4_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1001') DROP VIEW view_2_tab4_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1001') DROP VIEW view_3_tab4_1001

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1001

statement ok
CREATE VIEW view_1_tab4_1001 AS SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))

statement ok
CREATE VIEW view_2_tab4_1001 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))

statement ok
CREATE VIEW view_3_tab4_1001 AS SELECT pk FROM view_1_tab4_1001

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_1001
----
9
0

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_1001
----
18 values hashing to 12d5ca9b7a38e411da82f63c19ed3ef9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1001 UNION ALL SELECT pk, col0 FROM view_2_tab4_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1001 UNION SELECT pk, col0 FROM view_2_tab4_1001
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42)) ) AS tab4_1001
----
9

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_1001
----
9

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE (col3 IS NULL OR (col4 <= 97.38 AND col4 >= 37.35 AND ((col4 <= 25.88))) OR ((((col3 > 14)) AND (col1 >= 60.52))) AND col0 < 34 OR (((col0 > 2 OR col1 BETWEEN 37.68 AND 97.4)) AND ((col0 > 49))) AND (col3 = 58) AND col0 IN (8,33,0,12,74,42))
----
9

statement ok
DROP VIEW view_1_tab4_1001

statement ok
DROP VIEW view_2_tab4_1001

statement ok
DROP VIEW view_3_tab4_1001

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1002') DROP VIEW view_1_tab0_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1002') DROP VIEW view_2_tab0_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1002') DROP VIEW view_3_tab0_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1002

statement ok
CREATE VIEW view_1_tab0_1002 AS SELECT pk, col0 FROM tab0 WHERE ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39

statement ok
CREATE VIEW view_2_tab0_1002 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)

statement ok
CREATE VIEW view_3_tab0_1002 AS SELECT pk FROM view_1_tab0_1002

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_1002
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1002 UNION ALL SELECT pk, col0 FROM view_2_tab0_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1002 UNION SELECT pk, col0 FROM view_2_tab0_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 ) AS tab0_1002
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_1002
----

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab0 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

statement ok
DROP VIEW view_1_tab0_1002

statement ok
DROP VIEW view_2_tab0_1002

statement ok
DROP VIEW view_3_tab0_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1002') DROP VIEW view_1_tab1_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1002') DROP VIEW view_2_tab1_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1002') DROP VIEW view_3_tab1_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1002

statement ok
CREATE VIEW view_1_tab1_1002 AS SELECT pk, col0 FROM tab1 WHERE ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39

statement ok
CREATE VIEW view_2_tab1_1002 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)

statement ok
CREATE VIEW view_3_tab1_1002 AS SELECT pk FROM view_1_tab1_1002

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_1002
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1002 UNION ALL SELECT pk, col0 FROM view_2_tab1_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1002 UNION SELECT pk, col0 FROM view_2_tab1_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 ) AS tab1_1002
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_1002
----

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab1 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

statement ok
DROP VIEW view_1_tab1_1002

statement ok
DROP VIEW view_2_tab1_1002

statement ok
DROP VIEW view_3_tab1_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1002') DROP VIEW view_1_tab2_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1002') DROP VIEW view_2_tab2_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1002') DROP VIEW view_3_tab2_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1002

statement ok
CREATE VIEW view_1_tab2_1002 AS SELECT pk, col0 FROM tab2 WHERE ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39

statement ok
CREATE VIEW view_2_tab2_1002 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)

statement ok
CREATE VIEW view_3_tab2_1002 AS SELECT pk FROM view_1_tab2_1002

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_1002
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1002 UNION ALL SELECT pk, col0 FROM view_2_tab2_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1002 UNION SELECT pk, col0 FROM view_2_tab2_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 ) AS tab2_1002
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_1002
----

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab2 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

statement ok
DROP VIEW view_1_tab2_1002

statement ok
DROP VIEW view_2_tab2_1002

statement ok
DROP VIEW view_3_tab2_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1002') DROP VIEW view_1_tab3_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1002') DROP VIEW view_2_tab3_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1002') DROP VIEW view_3_tab3_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1002

statement ok
CREATE VIEW view_1_tab3_1002 AS SELECT pk, col0 FROM tab3 WHERE ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39

statement ok
CREATE VIEW view_2_tab3_1002 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)

statement ok
CREATE VIEW view_3_tab3_1002 AS SELECT pk FROM view_1_tab3_1002

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_1002
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1002 UNION ALL SELECT pk, col0 FROM view_2_tab3_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1002 UNION SELECT pk, col0 FROM view_2_tab3_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 ) AS tab3_1002
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_1002
----

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab3 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

statement ok
DROP VIEW view_1_tab3_1002

statement ok
DROP VIEW view_2_tab3_1002

statement ok
DROP VIEW view_3_tab3_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1002') DROP VIEW view_1_tab4_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1002') DROP VIEW view_2_tab4_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1002') DROP VIEW view_3_tab4_1002

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1002

statement ok
CREATE VIEW view_1_tab4_1002 AS SELECT pk, col0 FROM tab4 WHERE ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39

statement ok
CREATE VIEW view_2_tab4_1002 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)

statement ok
CREATE VIEW view_3_tab4_1002 AS SELECT pk FROM view_1_tab4_1002

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_1002
----

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1002 UNION ALL SELECT pk, col0 FROM view_2_tab4_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1002 UNION SELECT pk, col0 FROM view_2_tab4_1002
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39 ) AS tab4_1002
----

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_1002
----

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 IS NULL OR (((col3 <= 32)))) OR (col4 > 43.71 AND col4 > 26.46 AND ((((col4 >= 23.8) AND ((col3 >= 47)) OR (col0 >= 79) OR (col3 > 28) OR (((col4 >= 12.10 OR ((col3 IN (SELECT col0 FROM tab4 WHERE col0 >= 30) AND col3 <= 35 OR (col3 > 31) AND ((col0 > 77) AND col0 > 91 AND col0 <= 48) AND col0 > 6 OR (col0 <= 92 AND (((col3 IS NULL))) AND (col0 <= 65) AND col3 > 97 OR col1 > 57.36 AND ((((col1 <= 78.71) OR (((((col1 = 20.70))))) AND ((col3 IN (84))))) AND (col0 < 96)) OR (col3 BETWEEN 7 AND 49) OR (col3 > 64) OR (col1 < 42.5) AND col4 >= 76.60 AND col0 = 76 AND (col0 > 70) OR col0 IS NULL OR (col1 >= 52.53) AND (((((col3 IN (51,64) OR col0 > 63) AND col0 = 84 AND col3 >= 94)))) OR col1 > 51.23 OR col1 BETWEEN 39.92 AND 61.20 AND (col0 >= 0 AND ((col1 IS NULL) OR (col0 < 37 AND col4 <= 41.92 OR (col1 >= 65.14) OR col0 IN (42,56)) OR col1 < 55.30 OR (col0 > 69 AND col0 < 84) AND (col3 < 29) OR col4 < 19.55 AND (col4 >= 47.58) AND ((((col0 >= 73)) OR (col0 BETWEEN 38 AND 47) OR ((col3 <= 98)) AND col3 >= 99 AND col0 > 94 AND (col3 = 59) AND col4 > 49.41 OR col0 < 92 AND col0 BETWEEN 33 AND 76 AND col0 <= 68 OR col4 BETWEEN 72.87 AND 2.49 AND col3 IN (84,91,53,11))))) OR ((col3 BETWEEN 22 AND 10)) AND (col1 < 5.4) OR (col4 >= 44.55) AND ((col3 < 36)))) AND (((col3 IS NULL) OR (col4 IS NULL) OR col1 > 42.97))) OR ((col1 >= 20.41) AND col3 > 42) OR (col0 = 31) AND col3 < 46 AND col0 < 78 OR ((col0 < 4)) AND ((col3 > 90 OR (((col3 <= 29))))) OR col1 > 37.60 AND (col3 < 79) OR col4 < 41.8 OR col0 > 43 OR col4 = 51.29 AND (col3 IN (51,92,26,64))))) OR col4 > 68.98 AND ((col4 < 87.44 AND col1 <= 83.0 AND (col3 > 58) OR col1 > 65.25 AND col0 > 0)) AND (col4 <= 61.33 OR col3 <= 65 AND (col1 < 72.56 AND ((col3 IN (99,54))) AND (((col1 < 60.68 OR col3 > 64)) AND ((col3 > 24 AND (col1 <= 49.56 OR col3 > 96 AND col3 <= 16 AND col4 < 98.0 AND (col0 >= 11 OR col1 = 46.36) AND col0 >= 41))) AND col3 >= 55 AND (col0 > 51 OR (col0 > 16)) OR ((col3 <= 77))) AND ((col0 <= 52) OR ((((((col1 < 60.0) OR (((col3 <= 18) AND col0 = 66 OR ((((((((col3 IS NULL)) OR col4 < 48.79)) OR col0 > 63 OR (col3 >= 57 AND col3 <= 89 AND ((col3 > 47))) AND (col3 > 47))))) OR col0 = 12 OR ((((col3 > 15)) AND col0 < 78 AND col4 > 75.14 AND (col0 < 1) AND col3 IS NULL)) AND col1 IS NULL OR col0 = 15)) AND (col3 > 90)))))))) AND (col4 > 71.15 OR ((col3 IS NULL OR col1 IS NULL OR (((col3 >= 30) AND col0 >= 2 AND col3 >= 45 AND (col0 <= 95))) AND col4 <= 71.78 OR (col4 = 95.76 AND ((col3 > 93)) OR col0 < 41 AND col3 IS NULL AND (col0 >= 61)) AND col0 <= 74)) AND ((col3 >= 94 OR col3 IN (22,94,37)))) AND col0 > 49 AND (col3 >= 95 AND col3 = 28) AND (col0 < 21) AND col1 > 29.84 AND (col0 <= 56) OR (col0 > 2) OR col4 <= 51.84 OR (col0 > 62) AND col3 > 18 AND ((col0 > 8) OR col3 > 55) AND col3 > 18 AND col4 >= 97.99 AND ((col1 BETWEEN 16.69 AND 34.54)) OR col3 IS NULL AND ((col1 < 78.90)) OR col0 < 83 OR ((col3 > 39 OR ((col3 >= 55) AND col0 <= 32)) OR col4 BETWEEN 41.64 AND 92.0 OR col3 > 44) OR col1 = 87.36 AND col0 = 53 AND col0 >= 35) OR col3 < 61 OR col3 >= 19 OR col3 >= 0) AND col0 > 54 AND col4 IN (11.6,7.61,98.26,24.65,81.81,48.50)) AND col1 <= 57.49) OR (col3 > 27))))) AND col0 = 54 AND col0 < 39
----

statement ok
DROP VIEW view_1_tab4_1002

statement ok
DROP VIEW view_2_tab4_1002

statement ok
DROP VIEW view_3_tab4_1002

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1003') DROP VIEW view_1_tab0_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1003') DROP VIEW view_2_tab0_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1003') DROP VIEW view_3_tab0_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1003

statement ok
CREATE VIEW view_1_tab0_1003 AS SELECT pk, col0 FROM tab0 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25

statement ok
CREATE VIEW view_2_tab0_1003 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)

statement ok
CREATE VIEW view_3_tab0_1003 AS SELECT pk FROM view_1_tab0_1003

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_1003
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_1003
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1003 UNION ALL SELECT pk, col0 FROM view_2_tab0_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1003 UNION SELECT pk, col0 FROM view_2_tab0_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 ) AS tab0_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
3
7
9

statement ok
DROP VIEW view_1_tab0_1003

statement ok
DROP VIEW view_2_tab0_1003

statement ok
DROP VIEW view_3_tab0_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1003') DROP VIEW view_1_tab1_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1003') DROP VIEW view_2_tab1_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1003') DROP VIEW view_3_tab1_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1003

statement ok
CREATE VIEW view_1_tab1_1003 AS SELECT pk, col0 FROM tab1 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25

statement ok
CREATE VIEW view_2_tab1_1003 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)

statement ok
CREATE VIEW view_3_tab1_1003 AS SELECT pk FROM view_1_tab1_1003

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_1003
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_1003
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1003 UNION ALL SELECT pk, col0 FROM view_2_tab1_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1003 UNION SELECT pk, col0 FROM view_2_tab1_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 ) AS tab1_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
3
7
9

statement ok
DROP VIEW view_1_tab1_1003

statement ok
DROP VIEW view_2_tab1_1003

statement ok
DROP VIEW view_3_tab1_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1003') DROP VIEW view_1_tab2_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1003') DROP VIEW view_2_tab2_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1003') DROP VIEW view_3_tab2_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1003

statement ok
CREATE VIEW view_1_tab2_1003 AS SELECT pk, col0 FROM tab2 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25

statement ok
CREATE VIEW view_2_tab2_1003 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)

statement ok
CREATE VIEW view_3_tab2_1003 AS SELECT pk FROM view_1_tab2_1003

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_1003
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_1003
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1003 UNION ALL SELECT pk, col0 FROM view_2_tab2_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1003 UNION SELECT pk, col0 FROM view_2_tab2_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 ) AS tab2_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
3
7
9

statement ok
DROP VIEW view_1_tab2_1003

statement ok
DROP VIEW view_2_tab2_1003

statement ok
DROP VIEW view_3_tab2_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1003') DROP VIEW view_1_tab3_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1003') DROP VIEW view_2_tab3_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1003') DROP VIEW view_3_tab3_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1003

statement ok
CREATE VIEW view_1_tab3_1003 AS SELECT pk, col0 FROM tab3 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25

statement ok
CREATE VIEW view_2_tab3_1003 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)

statement ok
CREATE VIEW view_3_tab3_1003 AS SELECT pk FROM view_1_tab3_1003

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_1003
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_1003
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1003 UNION ALL SELECT pk, col0 FROM view_2_tab3_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1003 UNION SELECT pk, col0 FROM view_2_tab3_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 ) AS tab3_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
3
7
9

statement ok
DROP VIEW view_1_tab3_1003

statement ok
DROP VIEW view_2_tab3_1003

statement ok
DROP VIEW view_3_tab3_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1003') DROP VIEW view_1_tab4_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1003') DROP VIEW view_2_tab4_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1003') DROP VIEW view_3_tab4_1003

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1003

statement ok
CREATE VIEW view_1_tab4_1003 AS SELECT pk, col0 FROM tab4 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25

statement ok
CREATE VIEW view_2_tab4_1003 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)

statement ok
CREATE VIEW view_3_tab4_1003 AS SELECT pk FROM view_1_tab4_1003

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_1003
----
1
35
3
18
7
71
9
0

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_1003
----
12 values hashing to f676d03dbc760209be67694514e03556

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1003 UNION ALL SELECT pk, col0 FROM view_2_tab4_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1003 UNION SELECT pk, col0 FROM view_2_tab4_1003
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25 ) AS tab4_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_1003
----
1
3
7
9

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE ((col4 = 20.77) OR col1 >= 58.59) AND col4 > 9.52 AND col4 > 1.25
----
1
3
7
9

statement ok
DROP VIEW view_1_tab4_1003

statement ok
DROP VIEW view_2_tab4_1003

statement ok
DROP VIEW view_3_tab4_1003

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1004') DROP VIEW view_1_tab0_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1004') DROP VIEW view_2_tab0_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1004') DROP VIEW view_3_tab0_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1004

statement ok
CREATE VIEW view_1_tab0_1004 AS SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)

statement ok
CREATE VIEW view_2_tab0_1004 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))

statement ok
CREATE VIEW view_3_tab0_1004 AS SELECT pk FROM view_1_tab0_1004

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
4
84
6
59

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_1004
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_1004
----
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1004 UNION ALL SELECT pk, col0 FROM view_2_tab0_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1004 UNION SELECT pk, col0 FROM view_2_tab0_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) ) AS tab0_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
0
1
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab0_1004

statement ok
DROP VIEW view_2_tab0_1004

statement ok
DROP VIEW view_3_tab0_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1004') DROP VIEW view_1_tab1_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1004') DROP VIEW view_2_tab1_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1004') DROP VIEW view_3_tab1_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1004

statement ok
CREATE VIEW view_1_tab1_1004 AS SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)

statement ok
CREATE VIEW view_2_tab1_1004 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))

statement ok
CREATE VIEW view_3_tab1_1004 AS SELECT pk FROM view_1_tab1_1004

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
4
84
6
59

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_1004
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_1004
----
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1004 UNION ALL SELECT pk, col0 FROM view_2_tab1_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1004 UNION SELECT pk, col0 FROM view_2_tab1_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) ) AS tab1_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
0
1
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab1_1004

statement ok
DROP VIEW view_2_tab1_1004

statement ok
DROP VIEW view_3_tab1_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1004') DROP VIEW view_1_tab2_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1004') DROP VIEW view_2_tab2_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1004') DROP VIEW view_3_tab2_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1004

statement ok
CREATE VIEW view_1_tab2_1004 AS SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)

statement ok
CREATE VIEW view_2_tab2_1004 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))

statement ok
CREATE VIEW view_3_tab2_1004 AS SELECT pk FROM view_1_tab2_1004

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
4
84
6
59

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_1004
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_1004
----
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1004 UNION ALL SELECT pk, col0 FROM view_2_tab2_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1004 UNION SELECT pk, col0 FROM view_2_tab2_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) ) AS tab2_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
0
1
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab2_1004

statement ok
DROP VIEW view_2_tab2_1004

statement ok
DROP VIEW view_3_tab2_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1004') DROP VIEW view_1_tab3_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1004') DROP VIEW view_2_tab3_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1004') DROP VIEW view_3_tab3_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1004

statement ok
CREATE VIEW view_1_tab3_1004 AS SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)

statement ok
CREATE VIEW view_2_tab3_1004 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))

statement ok
CREATE VIEW view_3_tab3_1004 AS SELECT pk FROM view_1_tab3_1004

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
4
84
6
59

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_1004
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_1004
----
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1004 UNION ALL SELECT pk, col0 FROM view_2_tab3_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1004 UNION SELECT pk, col0 FROM view_2_tab3_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) ) AS tab3_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
0
1
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab3_1004

statement ok
DROP VIEW view_2_tab3_1004

statement ok
DROP VIEW view_3_tab3_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1004') DROP VIEW view_1_tab4_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1004') DROP VIEW view_2_tab4_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1004') DROP VIEW view_3_tab4_1004

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1004

statement ok
CREATE VIEW view_1_tab4_1004 AS SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)

statement ok
CREATE VIEW view_2_tab4_1004 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))

statement ok
CREATE VIEW view_3_tab4_1004 AS SELECT pk FROM view_1_tab4_1004

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
4
84
6
59

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_1004
----
16 values hashing to 8358a61a1cfef6c0ac671cefd6ae4719

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_1004
----
4
84
6
59

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1004 UNION ALL SELECT pk, col0 FROM view_2_tab4_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1004 UNION SELECT pk, col0 FROM view_2_tab4_1004
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42) ) AS tab4_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_1004
----
0
1
2
3
5
7
8
9

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE (col0 BETWEEN 13 AND 71 AND col0 BETWEEN 65 AND 39 OR (col0 >= 60) AND col3 = 69 AND col4 >= 48.72 OR (col0 = 96) AND col3 > 64 OR (col4 > 51.66)) OR (col3 = 63 OR col4 IS NULL) AND col1 = 31.58 OR (col0 <= 42)
----
0
1
2
3
5
7
8
9

statement ok
DROP VIEW view_1_tab4_1004

statement ok
DROP VIEW view_2_tab4_1004

statement ok
DROP VIEW view_3_tab4_1004

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1005') DROP VIEW view_1_tab0_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1005') DROP VIEW view_2_tab0_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1005') DROP VIEW view_3_tab0_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1005

statement ok
CREATE VIEW view_1_tab0_1005 AS SELECT pk, col0 FROM tab0 WHERE col0 IN (98,75,73)

statement ok
CREATE VIEW view_2_tab0_1005 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (98,75,73))

statement ok
CREATE VIEW view_3_tab0_1005 AS SELECT pk FROM view_1_tab0_1005

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE col0 IN (98,75,73)
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (98,75,73))
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_1005
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_1005
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (98,75,73) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1005 UNION ALL SELECT pk, col0 FROM view_2_tab0_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (98,75,73) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1005 UNION SELECT pk, col0 FROM view_2_tab0_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IN (98,75,73) ) AS tab0_1005
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_1005
----
2

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE col0 IN (98,75,73)
----
2

statement ok
DROP VIEW view_1_tab0_1005

statement ok
DROP VIEW view_2_tab0_1005

statement ok
DROP VIEW view_3_tab0_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1005') DROP VIEW view_1_tab1_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1005') DROP VIEW view_2_tab1_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1005') DROP VIEW view_3_tab1_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1005

statement ok
CREATE VIEW view_1_tab1_1005 AS SELECT pk, col0 FROM tab1 WHERE col0 IN (98,75,73)

statement ok
CREATE VIEW view_2_tab1_1005 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (98,75,73))

statement ok
CREATE VIEW view_3_tab1_1005 AS SELECT pk FROM view_1_tab1_1005

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE col0 IN (98,75,73)
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (98,75,73))
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_1005
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_1005
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (98,75,73) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1005 UNION ALL SELECT pk, col0 FROM view_2_tab1_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (98,75,73) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1005 UNION SELECT pk, col0 FROM view_2_tab1_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IN (98,75,73) ) AS tab1_1005
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_1005
----
2

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE col0 IN (98,75,73)
----
2

statement ok
DROP VIEW view_1_tab1_1005

statement ok
DROP VIEW view_2_tab1_1005

statement ok
DROP VIEW view_3_tab1_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1005') DROP VIEW view_1_tab2_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1005') DROP VIEW view_2_tab2_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1005') DROP VIEW view_3_tab2_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1005

statement ok
CREATE VIEW view_1_tab2_1005 AS SELECT pk, col0 FROM tab2 WHERE col0 IN (98,75,73)

statement ok
CREATE VIEW view_2_tab2_1005 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (98,75,73))

statement ok
CREATE VIEW view_3_tab2_1005 AS SELECT pk FROM view_1_tab2_1005

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE col0 IN (98,75,73)
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (98,75,73))
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_1005
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_1005
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (98,75,73) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1005 UNION ALL SELECT pk, col0 FROM view_2_tab2_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (98,75,73) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1005 UNION SELECT pk, col0 FROM view_2_tab2_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IN (98,75,73) ) AS tab2_1005
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_1005
----
2

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE col0 IN (98,75,73)
----
2

statement ok
DROP VIEW view_1_tab2_1005

statement ok
DROP VIEW view_2_tab2_1005

statement ok
DROP VIEW view_3_tab2_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1005') DROP VIEW view_1_tab3_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1005') DROP VIEW view_2_tab3_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1005') DROP VIEW view_3_tab3_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1005

statement ok
CREATE VIEW view_1_tab3_1005 AS SELECT pk, col0 FROM tab3 WHERE col0 IN (98,75,73)

statement ok
CREATE VIEW view_2_tab3_1005 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (98,75,73))

statement ok
CREATE VIEW view_3_tab3_1005 AS SELECT pk FROM view_1_tab3_1005

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE col0 IN (98,75,73)
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (98,75,73))
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_1005
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_1005
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (98,75,73) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1005 UNION ALL SELECT pk, col0 FROM view_2_tab3_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (98,75,73) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1005 UNION SELECT pk, col0 FROM view_2_tab3_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IN (98,75,73) ) AS tab3_1005
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_1005
----
2

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE col0 IN (98,75,73)
----
2

statement ok
DROP VIEW view_1_tab3_1005

statement ok
DROP VIEW view_2_tab3_1005

statement ok
DROP VIEW view_3_tab3_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1005') DROP VIEW view_1_tab4_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1005') DROP VIEW view_2_tab4_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1005') DROP VIEW view_3_tab4_1005

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1005

statement ok
CREATE VIEW view_1_tab4_1005 AS SELECT pk, col0 FROM tab4 WHERE col0 IN (98,75,73)

statement ok
CREATE VIEW view_2_tab4_1005 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (98,75,73))

statement ok
CREATE VIEW view_3_tab4_1005 AS SELECT pk FROM view_1_tab4_1005

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE col0 IN (98,75,73)
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (98,75,73))
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_1005
----
2
73

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_1005
----
18 values hashing to 72e422bf468a5dedbfcfb743f5b4c0c1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (98,75,73) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1005 UNION ALL SELECT pk, col0 FROM view_2_tab4_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (98,75,73) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (98,75,73))
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1005 UNION SELECT pk, col0 FROM view_2_tab4_1005
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IN (98,75,73) ) AS tab4_1005
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_1005
----
2

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE col0 IN (98,75,73)
----
2

statement ok
DROP VIEW view_1_tab4_1005

statement ok
DROP VIEW view_2_tab4_1005

statement ok
DROP VIEW view_3_tab4_1005

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1006') DROP VIEW view_1_tab0_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1006') DROP VIEW view_2_tab0_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1006') DROP VIEW view_3_tab0_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1006

statement ok
CREATE VIEW view_1_tab0_1006 AS SELECT pk, col0 FROM tab0 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42

statement ok
CREATE VIEW view_2_tab0_1006 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)

statement ok
CREATE VIEW view_3_tab0_1006 AS SELECT pk FROM view_1_tab0_1006

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_1006
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1006 UNION ALL SELECT pk, col0 FROM view_2_tab0_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1006 UNION SELECT pk, col0 FROM view_2_tab0_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 ) AS tab0_1006
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_1006
----

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

statement ok
DROP VIEW view_1_tab0_1006

statement ok
DROP VIEW view_2_tab0_1006

statement ok
DROP VIEW view_3_tab0_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1006') DROP VIEW view_1_tab1_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1006') DROP VIEW view_2_tab1_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1006') DROP VIEW view_3_tab1_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1006

statement ok
CREATE VIEW view_1_tab1_1006 AS SELECT pk, col0 FROM tab1 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42

statement ok
CREATE VIEW view_2_tab1_1006 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)

statement ok
CREATE VIEW view_3_tab1_1006 AS SELECT pk FROM view_1_tab1_1006

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_1006
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1006 UNION ALL SELECT pk, col0 FROM view_2_tab1_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1006 UNION SELECT pk, col0 FROM view_2_tab1_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 ) AS tab1_1006
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_1006
----

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

statement ok
DROP VIEW view_1_tab1_1006

statement ok
DROP VIEW view_2_tab1_1006

statement ok
DROP VIEW view_3_tab1_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1006') DROP VIEW view_1_tab2_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1006') DROP VIEW view_2_tab2_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1006') DROP VIEW view_3_tab2_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1006

statement ok
CREATE VIEW view_1_tab2_1006 AS SELECT pk, col0 FROM tab2 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42

statement ok
CREATE VIEW view_2_tab2_1006 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)

statement ok
CREATE VIEW view_3_tab2_1006 AS SELECT pk FROM view_1_tab2_1006

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_1006
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1006 UNION ALL SELECT pk, col0 FROM view_2_tab2_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1006 UNION SELECT pk, col0 FROM view_2_tab2_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 ) AS tab2_1006
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_1006
----

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

statement ok
DROP VIEW view_1_tab2_1006

statement ok
DROP VIEW view_2_tab2_1006

statement ok
DROP VIEW view_3_tab2_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1006') DROP VIEW view_1_tab3_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1006') DROP VIEW view_2_tab3_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1006') DROP VIEW view_3_tab3_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1006

statement ok
CREATE VIEW view_1_tab3_1006 AS SELECT pk, col0 FROM tab3 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42

statement ok
CREATE VIEW view_2_tab3_1006 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)

statement ok
CREATE VIEW view_3_tab3_1006 AS SELECT pk FROM view_1_tab3_1006

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_1006
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1006 UNION ALL SELECT pk, col0 FROM view_2_tab3_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1006 UNION SELECT pk, col0 FROM view_2_tab3_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 ) AS tab3_1006
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_1006
----

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

statement ok
DROP VIEW view_1_tab3_1006

statement ok
DROP VIEW view_2_tab3_1006

statement ok
DROP VIEW view_3_tab3_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1006') DROP VIEW view_1_tab4_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1006') DROP VIEW view_2_tab4_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1006') DROP VIEW view_3_tab4_1006

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1006

statement ok
CREATE VIEW view_1_tab4_1006 AS SELECT pk, col0 FROM tab4 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42

statement ok
CREATE VIEW view_2_tab4_1006 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)

statement ok
CREATE VIEW view_3_tab4_1006 AS SELECT pk FROM view_1_tab4_1006

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_1006
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1006 UNION ALL SELECT pk, col0 FROM view_2_tab4_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1006 UNION SELECT pk, col0 FROM view_2_tab4_1006
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42 ) AS tab4_1006
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_1006
----

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE col4 IN (90.48,34.88,77.27,13.89,23.92,22.77) AND col0 > 42
----

statement ok
DROP VIEW view_1_tab4_1006

statement ok
DROP VIEW view_2_tab4_1006

statement ok
DROP VIEW view_3_tab4_1006

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1007') DROP VIEW view_1_tab0_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1007') DROP VIEW view_2_tab0_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1007') DROP VIEW view_3_tab0_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1007

statement ok
CREATE VIEW view_1_tab0_1007 AS SELECT pk, col0 FROM tab0 WHERE col0 = 43

statement ok
CREATE VIEW view_2_tab0_1007 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 43)

statement ok
CREATE VIEW view_3_tab0_1007 AS SELECT pk FROM view_1_tab0_1007

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE col0 = 43
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_1007
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 43 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1007 UNION ALL SELECT pk, col0 FROM view_2_tab0_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 43 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1007 UNION SELECT pk, col0 FROM view_2_tab0_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 43 ) AS tab0_1007
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_1007
----

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE col0 = 43
----

statement ok
DROP VIEW view_1_tab0_1007

statement ok
DROP VIEW view_2_tab0_1007

statement ok
DROP VIEW view_3_tab0_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1007') DROP VIEW view_1_tab1_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1007') DROP VIEW view_2_tab1_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1007') DROP VIEW view_3_tab1_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1007

statement ok
CREATE VIEW view_1_tab1_1007 AS SELECT pk, col0 FROM tab1 WHERE col0 = 43

statement ok
CREATE VIEW view_2_tab1_1007 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 43)

statement ok
CREATE VIEW view_3_tab1_1007 AS SELECT pk FROM view_1_tab1_1007

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE col0 = 43
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_1007
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 43 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1007 UNION ALL SELECT pk, col0 FROM view_2_tab1_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 43 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1007 UNION SELECT pk, col0 FROM view_2_tab1_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 43 ) AS tab1_1007
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_1007
----

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE col0 = 43
----

statement ok
DROP VIEW view_1_tab1_1007

statement ok
DROP VIEW view_2_tab1_1007

statement ok
DROP VIEW view_3_tab1_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1007') DROP VIEW view_1_tab2_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1007') DROP VIEW view_2_tab2_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1007') DROP VIEW view_3_tab2_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1007

statement ok
CREATE VIEW view_1_tab2_1007 AS SELECT pk, col0 FROM tab2 WHERE col0 = 43

statement ok
CREATE VIEW view_2_tab2_1007 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 43)

statement ok
CREATE VIEW view_3_tab2_1007 AS SELECT pk FROM view_1_tab2_1007

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE col0 = 43
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_1007
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 43 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1007 UNION ALL SELECT pk, col0 FROM view_2_tab2_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 43 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1007 UNION SELECT pk, col0 FROM view_2_tab2_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 43 ) AS tab2_1007
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_1007
----

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE col0 = 43
----

statement ok
DROP VIEW view_1_tab2_1007

statement ok
DROP VIEW view_2_tab2_1007

statement ok
DROP VIEW view_3_tab2_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1007') DROP VIEW view_1_tab3_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1007') DROP VIEW view_2_tab3_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1007') DROP VIEW view_3_tab3_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1007

statement ok
CREATE VIEW view_1_tab3_1007 AS SELECT pk, col0 FROM tab3 WHERE col0 = 43

statement ok
CREATE VIEW view_2_tab3_1007 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 43)

statement ok
CREATE VIEW view_3_tab3_1007 AS SELECT pk FROM view_1_tab3_1007

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE col0 = 43
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_1007
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 43 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1007 UNION ALL SELECT pk, col0 FROM view_2_tab3_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 43 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1007 UNION SELECT pk, col0 FROM view_2_tab3_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 43 ) AS tab3_1007
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_1007
----

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE col0 = 43
----

statement ok
DROP VIEW view_1_tab3_1007

statement ok
DROP VIEW view_2_tab3_1007

statement ok
DROP VIEW view_3_tab3_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1007') DROP VIEW view_1_tab4_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1007') DROP VIEW view_2_tab4_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1007') DROP VIEW view_3_tab4_1007

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1007

statement ok
CREATE VIEW view_1_tab4_1007 AS SELECT pk, col0 FROM tab4 WHERE col0 = 43

statement ok
CREATE VIEW view_2_tab4_1007 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 43)

statement ok
CREATE VIEW view_3_tab4_1007 AS SELECT pk FROM view_1_tab4_1007

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE col0 = 43
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_1007
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 43 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1007 UNION ALL SELECT pk, col0 FROM view_2_tab4_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 43 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 43)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1007 UNION SELECT pk, col0 FROM view_2_tab4_1007
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 43 ) AS tab4_1007
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab4_1007
----

query I rowsort label-5900-3
SELECT pk FROM tab4 WHERE col0 = 43
----

statement ok
DROP VIEW view_1_tab4_1007

statement ok
DROP VIEW view_2_tab4_1007

statement ok
DROP VIEW view_3_tab4_1007

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_1008') DROP VIEW view_1_tab0_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_1008') DROP VIEW view_2_tab0_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_1008') DROP VIEW view_3_tab0_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_1008

statement ok
CREATE VIEW view_1_tab0_1008 AS SELECT pk, col0 FROM tab0 WHERE col0 < 51

statement ok
CREATE VIEW view_2_tab0_1008 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 51)

statement ok
CREATE VIEW view_3_tab0_1008 AS SELECT pk FROM view_1_tab0_1008

query II rowsort label-6000-1
SELECT pk, col0 FROM tab0 WHERE col0 < 51
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 51)
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab0_1008
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab0_1008
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 51 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1008 UNION ALL SELECT pk, col0 FROM view_2_tab0_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 51 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_1008 UNION SELECT pk, col0 FROM view_2_tab0_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 51 ) AS tab0_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab0_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT pk FROM tab0 WHERE col0 < 51
----
1
3
8
9

statement ok
DROP VIEW view_1_tab0_1008

statement ok
DROP VIEW view_2_tab0_1008

statement ok
DROP VIEW view_3_tab0_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_1008') DROP VIEW view_1_tab1_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_1008') DROP VIEW view_2_tab1_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_1008') DROP VIEW view_3_tab1_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_1008

statement ok
CREATE VIEW view_1_tab1_1008 AS SELECT pk, col0 FROM tab1 WHERE col0 < 51

statement ok
CREATE VIEW view_2_tab1_1008 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 51)

statement ok
CREATE VIEW view_3_tab1_1008 AS SELECT pk FROM view_1_tab1_1008

query II rowsort label-6000-1
SELECT pk, col0 FROM tab1 WHERE col0 < 51
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 51)
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab1_1008
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab1_1008
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 51 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1008 UNION ALL SELECT pk, col0 FROM view_2_tab1_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 51 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_1008 UNION SELECT pk, col0 FROM view_2_tab1_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 51 ) AS tab1_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab1_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT pk FROM tab1 WHERE col0 < 51
----
1
3
8
9

statement ok
DROP VIEW view_1_tab1_1008

statement ok
DROP VIEW view_2_tab1_1008

statement ok
DROP VIEW view_3_tab1_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_1008') DROP VIEW view_1_tab2_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_1008') DROP VIEW view_2_tab2_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_1008') DROP VIEW view_3_tab2_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_1008

statement ok
CREATE VIEW view_1_tab2_1008 AS SELECT pk, col0 FROM tab2 WHERE col0 < 51

statement ok
CREATE VIEW view_2_tab2_1008 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 51)

statement ok
CREATE VIEW view_3_tab2_1008 AS SELECT pk FROM view_1_tab2_1008

query II rowsort label-6000-1
SELECT pk, col0 FROM tab2 WHERE col0 < 51
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 51)
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab2_1008
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab2_1008
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 51 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1008 UNION ALL SELECT pk, col0 FROM view_2_tab2_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 51 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_1008 UNION SELECT pk, col0 FROM view_2_tab2_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 51 ) AS tab2_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab2_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT pk FROM tab2 WHERE col0 < 51
----
1
3
8
9

statement ok
DROP VIEW view_1_tab2_1008

statement ok
DROP VIEW view_2_tab2_1008

statement ok
DROP VIEW view_3_tab2_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_1008') DROP VIEW view_1_tab3_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_1008') DROP VIEW view_2_tab3_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_1008') DROP VIEW view_3_tab3_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_1008

statement ok
CREATE VIEW view_1_tab3_1008 AS SELECT pk, col0 FROM tab3 WHERE col0 < 51

statement ok
CREATE VIEW view_2_tab3_1008 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 51)

statement ok
CREATE VIEW view_3_tab3_1008 AS SELECT pk FROM view_1_tab3_1008

query II rowsort label-6000-1
SELECT pk, col0 FROM tab3 WHERE col0 < 51
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 51)
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab3_1008
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab3_1008
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 51 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1008 UNION ALL SELECT pk, col0 FROM view_2_tab3_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 51 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_1008 UNION SELECT pk, col0 FROM view_2_tab3_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 51 ) AS tab3_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab3_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT pk FROM tab3 WHERE col0 < 51
----
1
3
8
9

statement ok
DROP VIEW view_1_tab3_1008

statement ok
DROP VIEW view_2_tab3_1008

statement ok
DROP VIEW view_3_tab3_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_1008') DROP VIEW view_1_tab4_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_1008') DROP VIEW view_2_tab4_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_1008

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_1008') DROP VIEW view_3_tab4_1008

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_1008

statement ok
CREATE VIEW view_1_tab4_1008 AS SELECT pk, col0 FROM tab4 WHERE col0 < 51

statement ok
CREATE VIEW view_2_tab4_1008 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 51)

statement ok
CREATE VIEW view_3_tab4_1008 AS SELECT pk FROM view_1_tab4_1008

query II rowsort label-6000-1
SELECT pk, col0 FROM tab4 WHERE col0 < 51
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 51)
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab4_1008
----
1
35
3
18
8
30
9
0

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab4_1008
----
12 values hashing to 05959327b5da571f3824c01b17a6a4ec

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 51 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1008 UNION ALL SELECT pk, col0 FROM view_2_tab4_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 51 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 51)
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_1008 UNION SELECT pk, col0 FROM view_2_tab4_1008
----
20 values hashing to d4ae738bdf2c57c7b49cfb7b94e649a7

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 51 ) AS tab4_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT * FROM view_3_tab4_1008
----
1
3
8
9

query I rowsort label-6000-3
SELECT pk FROM tab4 WHERE col0 < 51
----
1
3
8
9

statement ok
DROP VIEW view_1_tab4_1008

statement ok
DROP VIEW view_2_tab4_1008

statement ok
DROP VIEW view_3_tab4_1008

