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,48,12.1,'spbrq',15,33.83,'ldiuf')

statement ok
INSERT INTO tab0 VALUES(1,2,81.35,'eqrdl',65,28.35,'uneey')

statement ok
INSERT INTO tab0 VALUES(2,85,71.44,'wyyuc',61,84.54,'dccsk')

statement ok
INSERT INTO tab0 VALUES(3,93,31.52,'suznr',3,43.89,'uciej')

statement ok
INSERT INTO tab0 VALUES(4,44,51.69,'cbayx',41,94.50,'asgpq')

statement ok
INSERT INTO tab0 VALUES(5,36,73.51,'axpoc',42,83.78,'gqocg')

statement ok
INSERT INTO tab0 VALUES(6,16,99.63,'efswf',45,26.6,'ftoho')

statement ok
INSERT INTO tab0 VALUES(7,37,11.44,'aoxmg',33,21.18,'buaxi')

statement ok
INSERT INTO tab0 VALUES(8,23,77.65,'clggb',87,59.14,'iwmpw')

statement ok
INSERT INTO tab0 VALUES(9,32,66.97,'yfvor',55,41.73,'kdkle')

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 INDEX idx_tab2_0 ON tab2 (col3 DESC)

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

statement ok
CREATE INDEX idx_tab2_2 ON tab2 (col1)

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 UNIQUE INDEX idx_tab3_0 ON tab3 (col3 DESC,col0 DESC)

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

statement ok
CREATE INDEX idx_tab3_2 ON tab3 (col0 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab3_3 ON tab3 (col1 DESC,col3,col4 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,col4,col1 DESC)

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

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

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

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

statement ok
INSERT INTO tab4 SELECT * FROM tab0

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_660 AS SELECT pk, col0 FROM tab0 WHERE ((col0 <= 62))

statement ok
CREATE VIEW view_2_tab0_660 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 62)))

statement ok
CREATE VIEW view_3_tab0_660 AS SELECT pk FROM view_1_tab0_660

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 62))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 62)))
----
2
85
3
93

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_660
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_660
----
2
85
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_660 UNION ALL SELECT pk, col0 FROM view_2_tab0_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_660 UNION SELECT pk, col0 FROM view_2_tab0_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 <= 62)) ) AS tab0_660
----
0
1
4
5
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE ((col0 <= 62))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_660

statement ok
DROP VIEW view_2_tab0_660

statement ok
DROP VIEW view_3_tab0_660

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_660 AS SELECT pk, col0 FROM tab1 WHERE ((col0 <= 62))

statement ok
CREATE VIEW view_2_tab1_660 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 62)))

statement ok
CREATE VIEW view_3_tab1_660 AS SELECT pk FROM view_1_tab1_660

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 62))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 62)))
----
2
85
3
93

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_660
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_660
----
2
85
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_660 UNION ALL SELECT pk, col0 FROM view_2_tab1_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_660 UNION SELECT pk, col0 FROM view_2_tab1_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 <= 62)) ) AS tab1_660
----
0
1
4
5
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE ((col0 <= 62))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_660

statement ok
DROP VIEW view_2_tab1_660

statement ok
DROP VIEW view_3_tab1_660

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_660 AS SELECT pk, col0 FROM tab2 WHERE ((col0 <= 62))

statement ok
CREATE VIEW view_2_tab2_660 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 62)))

statement ok
CREATE VIEW view_3_tab2_660 AS SELECT pk FROM view_1_tab2_660

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 62))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 62)))
----
2
85
3
93

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_660
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_660
----
2
85
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_660 UNION ALL SELECT pk, col0 FROM view_2_tab2_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_660 UNION SELECT pk, col0 FROM view_2_tab2_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 <= 62)) ) AS tab2_660
----
0
1
4
5
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE ((col0 <= 62))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_660

statement ok
DROP VIEW view_2_tab2_660

statement ok
DROP VIEW view_3_tab2_660

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_660 AS SELECT pk, col0 FROM tab3 WHERE ((col0 <= 62))

statement ok
CREATE VIEW view_2_tab3_660 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 62)))

statement ok
CREATE VIEW view_3_tab3_660 AS SELECT pk FROM view_1_tab3_660

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 62))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 62)))
----
2
85
3
93

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_660
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_660
----
2
85
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_660 UNION ALL SELECT pk, col0 FROM view_2_tab3_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_660 UNION SELECT pk, col0 FROM view_2_tab3_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 <= 62)) ) AS tab3_660
----
0
1
4
5
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE ((col0 <= 62))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_660

statement ok
DROP VIEW view_2_tab3_660

statement ok
DROP VIEW view_3_tab3_660

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_660 AS SELECT pk, col0 FROM tab4 WHERE ((col0 <= 62))

statement ok
CREATE VIEW view_2_tab4_660 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 62)))

statement ok
CREATE VIEW view_3_tab4_660 AS SELECT pk FROM view_1_tab4_660

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 62))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 62)))
----
2
85
3
93

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_660
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_660
----
2
85
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_660 UNION ALL SELECT pk, col0 FROM view_2_tab4_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_660 UNION SELECT pk, col0 FROM view_2_tab4_660
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 <= 62)) ) AS tab4_660
----
0
1
4
5
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE ((col0 <= 62))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_660

statement ok
DROP VIEW view_2_tab4_660

statement ok
DROP VIEW view_3_tab4_660

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_661 AS SELECT pk, col0 FROM tab0 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))

statement ok
CREATE VIEW view_2_tab0_661 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))

statement ok
CREATE VIEW view_3_tab0_661 AS SELECT pk FROM view_1_tab0_661

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_661
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_661
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_661 UNION ALL SELECT pk, col0 FROM view_2_tab0_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_661 UNION SELECT pk, col0 FROM view_2_tab0_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) ) AS tab0_661
----
0
2
3

query I rowsort label-100-3
SELECT * FROM view_3_tab0_661
----
0
2
3

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
2
3

statement ok
DROP VIEW view_1_tab0_661

statement ok
DROP VIEW view_2_tab0_661

statement ok
DROP VIEW view_3_tab0_661

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_661 AS SELECT pk, col0 FROM tab1 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))

statement ok
CREATE VIEW view_2_tab1_661 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))

statement ok
CREATE VIEW view_3_tab1_661 AS SELECT pk FROM view_1_tab1_661

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_661
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_661
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_661 UNION ALL SELECT pk, col0 FROM view_2_tab1_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_661 UNION SELECT pk, col0 FROM view_2_tab1_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) ) AS tab1_661
----
0
2
3

query I rowsort label-100-3
SELECT * FROM view_3_tab1_661
----
0
2
3

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
2
3

statement ok
DROP VIEW view_1_tab1_661

statement ok
DROP VIEW view_2_tab1_661

statement ok
DROP VIEW view_3_tab1_661

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_661 AS SELECT pk, col0 FROM tab2 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))

statement ok
CREATE VIEW view_2_tab2_661 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))

statement ok
CREATE VIEW view_3_tab2_661 AS SELECT pk FROM view_1_tab2_661

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_661
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_661
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_661 UNION ALL SELECT pk, col0 FROM view_2_tab2_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_661 UNION SELECT pk, col0 FROM view_2_tab2_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) ) AS tab2_661
----
0
2
3

query I rowsort label-100-3
SELECT * FROM view_3_tab2_661
----
0
2
3

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
2
3

statement ok
DROP VIEW view_1_tab2_661

statement ok
DROP VIEW view_2_tab2_661

statement ok
DROP VIEW view_3_tab2_661

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_661 AS SELECT pk, col0 FROM tab3 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))

statement ok
CREATE VIEW view_2_tab3_661 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))

statement ok
CREATE VIEW view_3_tab3_661 AS SELECT pk FROM view_1_tab3_661

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_661
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_661
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_661 UNION ALL SELECT pk, col0 FROM view_2_tab3_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_661 UNION SELECT pk, col0 FROM view_2_tab3_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) ) AS tab3_661
----
0
2
3

query I rowsort label-100-3
SELECT * FROM view_3_tab3_661
----
0
2
3

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
2
3

statement ok
DROP VIEW view_1_tab3_661

statement ok
DROP VIEW view_2_tab3_661

statement ok
DROP VIEW view_3_tab3_661

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_661 AS SELECT pk, col0 FROM tab4 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))

statement ok
CREATE VIEW view_2_tab4_661 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))

statement ok
CREATE VIEW view_3_tab4_661 AS SELECT pk FROM view_1_tab4_661

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_661
----
0
48
2
85
3
93

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_661
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_661 UNION ALL SELECT pk, col0 FROM view_2_tab4_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_661 UNION SELECT pk, col0 FROM view_2_tab4_661
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47)) ) AS tab4_661
----
0
2
3

query I rowsort label-100-3
SELECT * FROM view_3_tab4_661
----
0
2
3

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col0 < 47 AND col0 >= 59 AND col3 > 28 AND col0 < 26 AND col0 = 48 OR (col0 >= 51 OR (col3 <= 34) OR col3 = 51 AND (col4 <= 36.25) AND col0 > 57 AND ((col3 > 48))) AND ((((col3 > 33 OR col0 < 57 OR col1 >= 64.11 OR col4 >= 97.82) AND col0 >= 40 AND col1 < 80.88) OR col4 >= 25.47))
----
0
2
3

statement ok
DROP VIEW view_1_tab4_661

statement ok
DROP VIEW view_2_tab4_661

statement ok
DROP VIEW view_3_tab4_661

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab0_662 AS SELECT pk FROM view_1_tab0_662

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 74)
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 74))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_662
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_662
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_662 UNION ALL SELECT pk, col0 FROM view_2_tab0_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_662 UNION SELECT pk, col0 FROM view_2_tab0_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 74) ) AS tab0_662
----
2
3

query I rowsort label-200-3
SELECT * FROM view_3_tab0_662
----
2
3

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE (col0 >= 74)
----
2
3

statement ok
DROP VIEW view_1_tab0_662

statement ok
DROP VIEW view_2_tab0_662

statement ok
DROP VIEW view_3_tab0_662

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab1_662 AS SELECT pk FROM view_1_tab1_662

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 74)
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 74))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_662
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_662
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_662 UNION ALL SELECT pk, col0 FROM view_2_tab1_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_662 UNION SELECT pk, col0 FROM view_2_tab1_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 74) ) AS tab1_662
----
2
3

query I rowsort label-200-3
SELECT * FROM view_3_tab1_662
----
2
3

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE (col0 >= 74)
----
2
3

statement ok
DROP VIEW view_1_tab1_662

statement ok
DROP VIEW view_2_tab1_662

statement ok
DROP VIEW view_3_tab1_662

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab2_662 AS SELECT pk FROM view_1_tab2_662

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 74)
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 74))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_662
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_662
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_662 UNION ALL SELECT pk, col0 FROM view_2_tab2_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_662 UNION SELECT pk, col0 FROM view_2_tab2_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 74) ) AS tab2_662
----
2
3

query I rowsort label-200-3
SELECT * FROM view_3_tab2_662
----
2
3

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE (col0 >= 74)
----
2
3

statement ok
DROP VIEW view_1_tab2_662

statement ok
DROP VIEW view_2_tab2_662

statement ok
DROP VIEW view_3_tab2_662

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab3_662 AS SELECT pk FROM view_1_tab3_662

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 74)
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 74))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_662
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_662
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_662 UNION ALL SELECT pk, col0 FROM view_2_tab3_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_662 UNION SELECT pk, col0 FROM view_2_tab3_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 74) ) AS tab3_662
----
2
3

query I rowsort label-200-3
SELECT * FROM view_3_tab3_662
----
2
3

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE (col0 >= 74)
----
2
3

statement ok
DROP VIEW view_1_tab3_662

statement ok
DROP VIEW view_2_tab3_662

statement ok
DROP VIEW view_3_tab3_662

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab4_662 AS SELECT pk FROM view_1_tab4_662

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 74)
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 74))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_662
----
2
85
3
93

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_662
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_662 UNION ALL SELECT pk, col0 FROM view_2_tab4_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_662 UNION SELECT pk, col0 FROM view_2_tab4_662
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 74) ) AS tab4_662
----
2
3

query I rowsort label-200-3
SELECT * FROM view_3_tab4_662
----
2
3

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE (col0 >= 74)
----
2
3

statement ok
DROP VIEW view_1_tab4_662

statement ok
DROP VIEW view_2_tab4_662

statement ok
DROP VIEW view_3_tab4_662

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_664 AS SELECT pk, col0 FROM tab0 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)

statement ok
CREATE VIEW view_2_tab0_664 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))

statement ok
CREATE VIEW view_3_tab0_664 AS SELECT pk FROM view_1_tab0_664

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_664 UNION ALL SELECT pk, col0 FROM view_2_tab0_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_664 UNION SELECT pk, col0 FROM view_2_tab0_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) ) AS tab0_664
----

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

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

statement ok
DROP VIEW view_1_tab0_664

statement ok
DROP VIEW view_2_tab0_664

statement ok
DROP VIEW view_3_tab0_664

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_664 AS SELECT pk, col0 FROM tab1 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)

statement ok
CREATE VIEW view_2_tab1_664 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))

statement ok
CREATE VIEW view_3_tab1_664 AS SELECT pk FROM view_1_tab1_664

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_664 UNION ALL SELECT pk, col0 FROM view_2_tab1_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_664 UNION SELECT pk, col0 FROM view_2_tab1_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) ) AS tab1_664
----

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

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

statement ok
DROP VIEW view_1_tab1_664

statement ok
DROP VIEW view_2_tab1_664

statement ok
DROP VIEW view_3_tab1_664

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_664 AS SELECT pk, col0 FROM tab2 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)

statement ok
CREATE VIEW view_2_tab2_664 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))

statement ok
CREATE VIEW view_3_tab2_664 AS SELECT pk FROM view_1_tab2_664

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_664 UNION ALL SELECT pk, col0 FROM view_2_tab2_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_664 UNION SELECT pk, col0 FROM view_2_tab2_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) ) AS tab2_664
----

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

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

statement ok
DROP VIEW view_1_tab2_664

statement ok
DROP VIEW view_2_tab2_664

statement ok
DROP VIEW view_3_tab2_664

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_664 AS SELECT pk, col0 FROM tab3 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)

statement ok
CREATE VIEW view_2_tab3_664 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))

statement ok
CREATE VIEW view_3_tab3_664 AS SELECT pk FROM view_1_tab3_664

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_664 UNION ALL SELECT pk, col0 FROM view_2_tab3_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_664 UNION SELECT pk, col0 FROM view_2_tab3_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) ) AS tab3_664
----

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

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

statement ok
DROP VIEW view_1_tab3_664

statement ok
DROP VIEW view_2_tab3_664

statement ok
DROP VIEW view_3_tab3_664

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_664 AS SELECT pk, col0 FROM tab4 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)

statement ok
CREATE VIEW view_2_tab4_664 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))

statement ok
CREATE VIEW view_3_tab4_664 AS SELECT pk FROM view_1_tab4_664

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_664 UNION ALL SELECT pk, col0 FROM view_2_tab4_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((((col3 = 22)))) AND col3 BETWEEN 60 AND 24))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_664 UNION SELECT pk, col0 FROM view_2_tab4_664
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24) ) AS tab4_664
----

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

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE (((((col3 = 22)))) AND col3 BETWEEN 60 AND 24)
----

statement ok
DROP VIEW view_1_tab4_664

statement ok
DROP VIEW view_2_tab4_664

statement ok
DROP VIEW view_3_tab4_664

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_665 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 54

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

statement ok
CREATE VIEW view_3_tab0_665 AS SELECT pk FROM view_1_tab0_665

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 54
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 54)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_665
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_665
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_665 UNION ALL SELECT pk, col0 FROM view_2_tab0_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_665 UNION SELECT pk, col0 FROM view_2_tab0_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 54 ) AS tab0_665
----
1
2
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab0_665
----
1
2
8
9

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE col3 >= 54
----
1
2
8
9

statement ok
DROP VIEW view_1_tab0_665

statement ok
DROP VIEW view_2_tab0_665

statement ok
DROP VIEW view_3_tab0_665

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_665 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 54

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

statement ok
CREATE VIEW view_3_tab1_665 AS SELECT pk FROM view_1_tab1_665

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 54
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 54)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_665
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_665
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_665 UNION ALL SELECT pk, col0 FROM view_2_tab1_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_665 UNION SELECT pk, col0 FROM view_2_tab1_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 54 ) AS tab1_665
----
1
2
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab1_665
----
1
2
8
9

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE col3 >= 54
----
1
2
8
9

statement ok
DROP VIEW view_1_tab1_665

statement ok
DROP VIEW view_2_tab1_665

statement ok
DROP VIEW view_3_tab1_665

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_665 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 54

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

statement ok
CREATE VIEW view_3_tab2_665 AS SELECT pk FROM view_1_tab2_665

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 54
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 54)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_665
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_665
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_665 UNION ALL SELECT pk, col0 FROM view_2_tab2_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_665 UNION SELECT pk, col0 FROM view_2_tab2_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 54 ) AS tab2_665
----
1
2
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab2_665
----
1
2
8
9

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE col3 >= 54
----
1
2
8
9

statement ok
DROP VIEW view_1_tab2_665

statement ok
DROP VIEW view_2_tab2_665

statement ok
DROP VIEW view_3_tab2_665

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_665 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 54

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

statement ok
CREATE VIEW view_3_tab3_665 AS SELECT pk FROM view_1_tab3_665

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 54
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 54)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_665
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_665
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_665 UNION ALL SELECT pk, col0 FROM view_2_tab3_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_665 UNION SELECT pk, col0 FROM view_2_tab3_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 54 ) AS tab3_665
----
1
2
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab3_665
----
1
2
8
9

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE col3 >= 54
----
1
2
8
9

statement ok
DROP VIEW view_1_tab3_665

statement ok
DROP VIEW view_2_tab3_665

statement ok
DROP VIEW view_3_tab3_665

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_665 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 54

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

statement ok
CREATE VIEW view_3_tab4_665 AS SELECT pk FROM view_1_tab4_665

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 54
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 54)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_665
----
1
2
2
85
8
23
9
32

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_665
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_665 UNION ALL SELECT pk, col0 FROM view_2_tab4_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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 c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_665 UNION SELECT pk, col0 FROM view_2_tab4_665
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 54 ) AS tab4_665
----
1
2
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab4_665
----
1
2
8
9

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE col3 >= 54
----
1
2
8
9

statement ok
DROP VIEW view_1_tab4_665

statement ok
DROP VIEW view_2_tab4_665

statement ok
DROP VIEW view_3_tab4_665

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_666 AS SELECT pk, col0 FROM tab0 WHERE col3 > 6

statement ok
CREATE VIEW view_2_tab0_666 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 6)

statement ok
CREATE VIEW view_3_tab0_666 AS SELECT pk FROM view_1_tab0_666

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col3 > 6
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 6)
----
3
93

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_666
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_666
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_666 UNION ALL SELECT pk, col0 FROM view_2_tab0_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_666 UNION SELECT pk, col0 FROM view_2_tab0_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 6 ) AS tab0_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT * FROM view_3_tab0_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col3 > 6
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_666

statement ok
DROP VIEW view_2_tab0_666

statement ok
DROP VIEW view_3_tab0_666

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_666 AS SELECT pk, col0 FROM tab1 WHERE col3 > 6

statement ok
CREATE VIEW view_2_tab1_666 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 6)

statement ok
CREATE VIEW view_3_tab1_666 AS SELECT pk FROM view_1_tab1_666

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col3 > 6
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 6)
----
3
93

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_666
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_666
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_666 UNION ALL SELECT pk, col0 FROM view_2_tab1_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_666 UNION SELECT pk, col0 FROM view_2_tab1_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 6 ) AS tab1_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT * FROM view_3_tab1_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col3 > 6
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_666

statement ok
DROP VIEW view_2_tab1_666

statement ok
DROP VIEW view_3_tab1_666

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_666 AS SELECT pk, col0 FROM tab2 WHERE col3 > 6

statement ok
CREATE VIEW view_2_tab2_666 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 6)

statement ok
CREATE VIEW view_3_tab2_666 AS SELECT pk FROM view_1_tab2_666

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col3 > 6
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 6)
----
3
93

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_666
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_666
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_666 UNION ALL SELECT pk, col0 FROM view_2_tab2_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_666 UNION SELECT pk, col0 FROM view_2_tab2_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 6 ) AS tab2_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT * FROM view_3_tab2_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col3 > 6
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_666

statement ok
DROP VIEW view_2_tab2_666

statement ok
DROP VIEW view_3_tab2_666

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_666 AS SELECT pk, col0 FROM tab3 WHERE col3 > 6

statement ok
CREATE VIEW view_2_tab3_666 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 6)

statement ok
CREATE VIEW view_3_tab3_666 AS SELECT pk FROM view_1_tab3_666

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col3 > 6
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 6)
----
3
93

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_666
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_666
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_666 UNION ALL SELECT pk, col0 FROM view_2_tab3_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_666 UNION SELECT pk, col0 FROM view_2_tab3_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 6 ) AS tab3_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT * FROM view_3_tab3_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col3 > 6
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_666

statement ok
DROP VIEW view_2_tab3_666

statement ok
DROP VIEW view_3_tab3_666

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_666 AS SELECT pk, col0 FROM tab4 WHERE col3 > 6

statement ok
CREATE VIEW view_2_tab4_666 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 6)

statement ok
CREATE VIEW view_3_tab4_666 AS SELECT pk FROM view_1_tab4_666

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col3 > 6
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 6)
----
3
93

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_666
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_666
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_666 UNION ALL SELECT pk, col0 FROM view_2_tab4_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_666 UNION SELECT pk, col0 FROM view_2_tab4_666
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 6 ) AS tab4_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT * FROM view_3_tab4_666
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col3 > 6
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_666

statement ok
DROP VIEW view_2_tab4_666

statement ok
DROP VIEW view_3_tab4_666

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_667 AS SELECT pk, col0 FROM tab0 WHERE col4 > 68.32 AND col3 >= 23

statement ok
CREATE VIEW view_2_tab0_667 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 68.32 AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab0_667 AS SELECT pk FROM view_1_tab0_667

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE col4 > 68.32 AND col3 >= 23
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_667
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_667
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 68.32 AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_667 UNION ALL SELECT pk, col0 FROM view_2_tab0_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 68.32 AND col3 >= 23 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_667 UNION SELECT pk, col0 FROM view_2_tab0_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 68.32 AND col3 >= 23 ) AS tab0_667
----
2
4
5

query I rowsort label-600-3
SELECT * FROM view_3_tab0_667
----
2
4
5

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE col4 > 68.32 AND col3 >= 23
----
2
4
5

statement ok
DROP VIEW view_1_tab0_667

statement ok
DROP VIEW view_2_tab0_667

statement ok
DROP VIEW view_3_tab0_667

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_667 AS SELECT pk, col0 FROM tab1 WHERE col4 > 68.32 AND col3 >= 23

statement ok
CREATE VIEW view_2_tab1_667 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 68.32 AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab1_667 AS SELECT pk FROM view_1_tab1_667

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE col4 > 68.32 AND col3 >= 23
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_667
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_667
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 68.32 AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_667 UNION ALL SELECT pk, col0 FROM view_2_tab1_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 68.32 AND col3 >= 23 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_667 UNION SELECT pk, col0 FROM view_2_tab1_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 68.32 AND col3 >= 23 ) AS tab1_667
----
2
4
5

query I rowsort label-600-3
SELECT * FROM view_3_tab1_667
----
2
4
5

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE col4 > 68.32 AND col3 >= 23
----
2
4
5

statement ok
DROP VIEW view_1_tab1_667

statement ok
DROP VIEW view_2_tab1_667

statement ok
DROP VIEW view_3_tab1_667

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_667 AS SELECT pk, col0 FROM tab2 WHERE col4 > 68.32 AND col3 >= 23

statement ok
CREATE VIEW view_2_tab2_667 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 68.32 AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab2_667 AS SELECT pk FROM view_1_tab2_667

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE col4 > 68.32 AND col3 >= 23
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_667
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_667
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 68.32 AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_667 UNION ALL SELECT pk, col0 FROM view_2_tab2_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 68.32 AND col3 >= 23 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_667 UNION SELECT pk, col0 FROM view_2_tab2_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 68.32 AND col3 >= 23 ) AS tab2_667
----
2
4
5

query I rowsort label-600-3
SELECT * FROM view_3_tab2_667
----
2
4
5

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE col4 > 68.32 AND col3 >= 23
----
2
4
5

statement ok
DROP VIEW view_1_tab2_667

statement ok
DROP VIEW view_2_tab2_667

statement ok
DROP VIEW view_3_tab2_667

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_667 AS SELECT pk, col0 FROM tab3 WHERE col4 > 68.32 AND col3 >= 23

statement ok
CREATE VIEW view_2_tab3_667 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 68.32 AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab3_667 AS SELECT pk FROM view_1_tab3_667

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE col4 > 68.32 AND col3 >= 23
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_667
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_667
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 68.32 AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_667 UNION ALL SELECT pk, col0 FROM view_2_tab3_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 68.32 AND col3 >= 23 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_667 UNION SELECT pk, col0 FROM view_2_tab3_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 68.32 AND col3 >= 23 ) AS tab3_667
----
2
4
5

query I rowsort label-600-3
SELECT * FROM view_3_tab3_667
----
2
4
5

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE col4 > 68.32 AND col3 >= 23
----
2
4
5

statement ok
DROP VIEW view_1_tab3_667

statement ok
DROP VIEW view_2_tab3_667

statement ok
DROP VIEW view_3_tab3_667

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_667 AS SELECT pk, col0 FROM tab4 WHERE col4 > 68.32 AND col3 >= 23

statement ok
CREATE VIEW view_2_tab4_667 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 68.32 AND col3 >= 23)

statement ok
CREATE VIEW view_3_tab4_667 AS SELECT pk FROM view_1_tab4_667

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE col4 > 68.32 AND col3 >= 23
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_667
----
2
85
4
44
5
36

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_667
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 68.32 AND col3 >= 23 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_667 UNION ALL SELECT pk, col0 FROM view_2_tab4_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 68.32 AND col3 >= 23 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 68.32 AND col3 >= 23)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_667 UNION SELECT pk, col0 FROM view_2_tab4_667
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 68.32 AND col3 >= 23 ) AS tab4_667
----
2
4
5

query I rowsort label-600-3
SELECT * FROM view_3_tab4_667
----
2
4
5

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE col4 > 68.32 AND col3 >= 23
----
2
4
5

statement ok
DROP VIEW view_1_tab4_667

statement ok
DROP VIEW view_2_tab4_667

statement ok
DROP VIEW view_3_tab4_667

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_668 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))

statement ok
CREATE VIEW view_2_tab0_668 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))

statement ok
CREATE VIEW view_3_tab0_668 AS SELECT pk FROM view_1_tab0_668

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab0_668
----

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_668 UNION ALL SELECT pk, col0 FROM view_2_tab0_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_668 UNION SELECT pk, col0 FROM view_2_tab0_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) ) AS tab0_668
----

query I rowsort label-700-3
SELECT * FROM view_3_tab0_668
----

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

statement ok
DROP VIEW view_1_tab0_668

statement ok
DROP VIEW view_2_tab0_668

statement ok
DROP VIEW view_3_tab0_668

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_668 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))

statement ok
CREATE VIEW view_2_tab1_668 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))

statement ok
CREATE VIEW view_3_tab1_668 AS SELECT pk FROM view_1_tab1_668

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab1_668
----

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_668 UNION ALL SELECT pk, col0 FROM view_2_tab1_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_668 UNION SELECT pk, col0 FROM view_2_tab1_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) ) AS tab1_668
----

query I rowsort label-700-3
SELECT * FROM view_3_tab1_668
----

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

statement ok
DROP VIEW view_1_tab1_668

statement ok
DROP VIEW view_2_tab1_668

statement ok
DROP VIEW view_3_tab1_668

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_668 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))

statement ok
CREATE VIEW view_2_tab2_668 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))

statement ok
CREATE VIEW view_3_tab2_668 AS SELECT pk FROM view_1_tab2_668

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab2_668
----

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_668 UNION ALL SELECT pk, col0 FROM view_2_tab2_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_668 UNION SELECT pk, col0 FROM view_2_tab2_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) ) AS tab2_668
----

query I rowsort label-700-3
SELECT * FROM view_3_tab2_668
----

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

statement ok
DROP VIEW view_1_tab2_668

statement ok
DROP VIEW view_2_tab2_668

statement ok
DROP VIEW view_3_tab2_668

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_668 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))

statement ok
CREATE VIEW view_2_tab3_668 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))

statement ok
CREATE VIEW view_3_tab3_668 AS SELECT pk FROM view_1_tab3_668

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab3_668
----

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_668 UNION ALL SELECT pk, col0 FROM view_2_tab3_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_668 UNION SELECT pk, col0 FROM view_2_tab3_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) ) AS tab3_668
----

query I rowsort label-700-3
SELECT * FROM view_3_tab3_668
----

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

statement ok
DROP VIEW view_1_tab3_668

statement ok
DROP VIEW view_2_tab3_668

statement ok
DROP VIEW view_3_tab3_668

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_668 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))

statement ok
CREATE VIEW view_2_tab4_668 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))

statement ok
CREATE VIEW view_3_tab4_668 AS SELECT pk FROM view_1_tab4_668

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab4_668
----

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_668 UNION ALL SELECT pk, col0 FROM view_2_tab4_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_668 UNION SELECT pk, col0 FROM view_2_tab4_668
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5)) ) AS tab4_668
----

query I rowsort label-700-3
SELECT * FROM view_3_tab4_668
----

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE col0 <= 63 AND (col0 >= 60 OR (col0 IS NULL AND (col1 > 23.35 AND (col0 IS NULL))) AND (col0 >= 5))
----

statement ok
DROP VIEW view_1_tab4_668

statement ok
DROP VIEW view_2_tab4_668

statement ok
DROP VIEW view_3_tab4_668

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_669 AS SELECT pk, col0 FROM tab0 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55

statement ok
CREATE VIEW view_2_tab0_669 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)

statement ok
CREATE VIEW view_3_tab0_669 AS SELECT pk FROM view_1_tab0_669

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_669
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_669 UNION ALL SELECT pk, col0 FROM view_2_tab0_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_669 UNION SELECT pk, col0 FROM view_2_tab0_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 ) AS tab0_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT * FROM view_3_tab0_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_669

statement ok
DROP VIEW view_2_tab0_669

statement ok
DROP VIEW view_3_tab0_669

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_669 AS SELECT pk, col0 FROM tab1 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55

statement ok
CREATE VIEW view_2_tab1_669 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)

statement ok
CREATE VIEW view_3_tab1_669 AS SELECT pk FROM view_1_tab1_669

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_669
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_669 UNION ALL SELECT pk, col0 FROM view_2_tab1_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_669 UNION SELECT pk, col0 FROM view_2_tab1_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 ) AS tab1_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT * FROM view_3_tab1_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_669

statement ok
DROP VIEW view_2_tab1_669

statement ok
DROP VIEW view_3_tab1_669

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_669 AS SELECT pk, col0 FROM tab2 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55

statement ok
CREATE VIEW view_2_tab2_669 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)

statement ok
CREATE VIEW view_3_tab2_669 AS SELECT pk FROM view_1_tab2_669

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_669
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_669 UNION ALL SELECT pk, col0 FROM view_2_tab2_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_669 UNION SELECT pk, col0 FROM view_2_tab2_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 ) AS tab2_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT * FROM view_3_tab2_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_669

statement ok
DROP VIEW view_2_tab2_669

statement ok
DROP VIEW view_3_tab2_669

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_669 AS SELECT pk, col0 FROM tab3 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55

statement ok
CREATE VIEW view_2_tab3_669 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)

statement ok
CREATE VIEW view_3_tab3_669 AS SELECT pk FROM view_1_tab3_669

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_669
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_669 UNION ALL SELECT pk, col0 FROM view_2_tab3_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_669 UNION SELECT pk, col0 FROM view_2_tab3_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 ) AS tab3_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT * FROM view_3_tab3_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_669

statement ok
DROP VIEW view_2_tab3_669

statement ok
DROP VIEW view_3_tab3_669

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_669 AS SELECT pk, col0 FROM tab4 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55

statement ok
CREATE VIEW view_2_tab4_669 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)

statement ok
CREATE VIEW view_3_tab4_669 AS SELECT pk FROM view_1_tab4_669

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_669
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_669 UNION ALL SELECT pk, col0 FROM view_2_tab4_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_669 UNION SELECT pk, col0 FROM view_2_tab4_669
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55 ) AS tab4_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT * FROM view_3_tab4_669
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE col4 <= 60.0 OR ((col3 IS NULL AND ((col3 >= 14)) AND col3 > 24)) OR (col3 IS NULL) OR col4 IS NULL OR col4 > 76.28 OR col3 <= 96 AND ((col0 >= 93 AND col3 = 97)) AND col1 < 22.1 OR col0 < 35 AND ((col3 > 11)) AND (col3 < 92) OR col0 < 55
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_669

statement ok
DROP VIEW view_2_tab4_669

statement ok
DROP VIEW view_3_tab4_669

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_670 AS SELECT pk, col0 FROM tab0 WHERE col0 = 4

statement ok
CREATE VIEW view_2_tab0_670 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 4)

statement ok
CREATE VIEW view_3_tab0_670 AS SELECT pk FROM view_1_tab0_670

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE col0 = 4
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_670
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_670 UNION ALL SELECT pk, col0 FROM view_2_tab0_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_670 UNION SELECT pk, col0 FROM view_2_tab0_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 4 ) AS tab0_670
----

query I rowsort label-900-3
SELECT * FROM view_3_tab0_670
----

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE col0 = 4
----

statement ok
DROP VIEW view_1_tab0_670

statement ok
DROP VIEW view_2_tab0_670

statement ok
DROP VIEW view_3_tab0_670

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_670 AS SELECT pk, col0 FROM tab1 WHERE col0 = 4

statement ok
CREATE VIEW view_2_tab1_670 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 4)

statement ok
CREATE VIEW view_3_tab1_670 AS SELECT pk FROM view_1_tab1_670

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE col0 = 4
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_670
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_670 UNION ALL SELECT pk, col0 FROM view_2_tab1_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_670 UNION SELECT pk, col0 FROM view_2_tab1_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 4 ) AS tab1_670
----

query I rowsort label-900-3
SELECT * FROM view_3_tab1_670
----

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE col0 = 4
----

statement ok
DROP VIEW view_1_tab1_670

statement ok
DROP VIEW view_2_tab1_670

statement ok
DROP VIEW view_3_tab1_670

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_670 AS SELECT pk, col0 FROM tab2 WHERE col0 = 4

statement ok
CREATE VIEW view_2_tab2_670 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 4)

statement ok
CREATE VIEW view_3_tab2_670 AS SELECT pk FROM view_1_tab2_670

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE col0 = 4
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_670
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_670 UNION ALL SELECT pk, col0 FROM view_2_tab2_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_670 UNION SELECT pk, col0 FROM view_2_tab2_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 4 ) AS tab2_670
----

query I rowsort label-900-3
SELECT * FROM view_3_tab2_670
----

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE col0 = 4
----

statement ok
DROP VIEW view_1_tab2_670

statement ok
DROP VIEW view_2_tab2_670

statement ok
DROP VIEW view_3_tab2_670

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_670 AS SELECT pk, col0 FROM tab3 WHERE col0 = 4

statement ok
CREATE VIEW view_2_tab3_670 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 4)

statement ok
CREATE VIEW view_3_tab3_670 AS SELECT pk FROM view_1_tab3_670

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE col0 = 4
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_670
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_670 UNION ALL SELECT pk, col0 FROM view_2_tab3_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_670 UNION SELECT pk, col0 FROM view_2_tab3_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 4 ) AS tab3_670
----

query I rowsort label-900-3
SELECT * FROM view_3_tab3_670
----

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE col0 = 4
----

statement ok
DROP VIEW view_1_tab3_670

statement ok
DROP VIEW view_2_tab3_670

statement ok
DROP VIEW view_3_tab3_670

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_670 AS SELECT pk, col0 FROM tab4 WHERE col0 = 4

statement ok
CREATE VIEW view_2_tab4_670 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 4)

statement ok
CREATE VIEW view_3_tab4_670 AS SELECT pk FROM view_1_tab4_670

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE col0 = 4
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_670
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_670 UNION ALL SELECT pk, col0 FROM view_2_tab4_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_670 UNION SELECT pk, col0 FROM view_2_tab4_670
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 4 ) AS tab4_670
----

query I rowsort label-900-3
SELECT * FROM view_3_tab4_670
----

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE col0 = 4
----

statement ok
DROP VIEW view_1_tab4_670

statement ok
DROP VIEW view_2_tab4_670

statement ok
DROP VIEW view_3_tab4_670

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_671 AS SELECT pk, col0 FROM tab0 WHERE (col3 <= 71)

statement ok
CREATE VIEW view_2_tab0_671 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 71))

statement ok
CREATE VIEW view_3_tab0_671 AS SELECT pk FROM view_1_tab0_671

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE (col3 <= 71)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 71))
----
8
23

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_671
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_671
----
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_671 UNION ALL SELECT pk, col0 FROM view_2_tab0_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 71) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 71))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_671 UNION SELECT pk, col0 FROM view_2_tab0_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 <= 71) ) AS tab0_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE (col3 <= 71)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_671

statement ok
DROP VIEW view_2_tab0_671

statement ok
DROP VIEW view_3_tab0_671

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_671 AS SELECT pk, col0 FROM tab1 WHERE (col3 <= 71)

statement ok
CREATE VIEW view_2_tab1_671 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 71))

statement ok
CREATE VIEW view_3_tab1_671 AS SELECT pk FROM view_1_tab1_671

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE (col3 <= 71)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 71))
----
8
23

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_671
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_671
----
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_671 UNION ALL SELECT pk, col0 FROM view_2_tab1_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 71) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 71))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_671 UNION SELECT pk, col0 FROM view_2_tab1_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 <= 71) ) AS tab1_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE (col3 <= 71)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_671

statement ok
DROP VIEW view_2_tab1_671

statement ok
DROP VIEW view_3_tab1_671

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_671 AS SELECT pk, col0 FROM tab2 WHERE (col3 <= 71)

statement ok
CREATE VIEW view_2_tab2_671 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 71))

statement ok
CREATE VIEW view_3_tab2_671 AS SELECT pk FROM view_1_tab2_671

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE (col3 <= 71)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 71))
----
8
23

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_671
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_671
----
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_671 UNION ALL SELECT pk, col0 FROM view_2_tab2_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 71) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 71))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_671 UNION SELECT pk, col0 FROM view_2_tab2_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 <= 71) ) AS tab2_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE (col3 <= 71)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_671

statement ok
DROP VIEW view_2_tab2_671

statement ok
DROP VIEW view_3_tab2_671

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_671 AS SELECT pk, col0 FROM tab3 WHERE (col3 <= 71)

statement ok
CREATE VIEW view_2_tab3_671 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 71))

statement ok
CREATE VIEW view_3_tab3_671 AS SELECT pk FROM view_1_tab3_671

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE (col3 <= 71)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 71))
----
8
23

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_671
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_671
----
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_671 UNION ALL SELECT pk, col0 FROM view_2_tab3_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 71) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 71))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_671 UNION SELECT pk, col0 FROM view_2_tab3_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 <= 71) ) AS tab3_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE (col3 <= 71)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_671

statement ok
DROP VIEW view_2_tab3_671

statement ok
DROP VIEW view_3_tab3_671

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_671 AS SELECT pk, col0 FROM tab4 WHERE (col3 <= 71)

statement ok
CREATE VIEW view_2_tab4_671 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 71))

statement ok
CREATE VIEW view_3_tab4_671 AS SELECT pk FROM view_1_tab4_671

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE (col3 <= 71)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 71))
----
8
23

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_671
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_671
----
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_671 UNION ALL SELECT pk, col0 FROM view_2_tab4_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 71) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 71))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_671 UNION SELECT pk, col0 FROM view_2_tab4_671
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 <= 71) ) AS tab4_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_671
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE (col3 <= 71)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_671

statement ok
DROP VIEW view_2_tab4_671

statement ok
DROP VIEW view_3_tab4_671

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_673 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)

statement ok
CREATE VIEW view_2_tab0_673 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))

statement ok
CREATE VIEW view_3_tab0_673 AS SELECT pk FROM view_1_tab0_673

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_673
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_673 UNION ALL SELECT pk, col0 FROM view_2_tab0_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_673 UNION SELECT pk, col0 FROM view_2_tab0_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) ) AS tab0_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_673

statement ok
DROP VIEW view_2_tab0_673

statement ok
DROP VIEW view_3_tab0_673

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_673 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)

statement ok
CREATE VIEW view_2_tab1_673 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))

statement ok
CREATE VIEW view_3_tab1_673 AS SELECT pk FROM view_1_tab1_673

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_673
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_673 UNION ALL SELECT pk, col0 FROM view_2_tab1_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_673 UNION SELECT pk, col0 FROM view_2_tab1_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) ) AS tab1_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_673

statement ok
DROP VIEW view_2_tab1_673

statement ok
DROP VIEW view_3_tab1_673

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_673 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)

statement ok
CREATE VIEW view_2_tab2_673 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))

statement ok
CREATE VIEW view_3_tab2_673 AS SELECT pk FROM view_1_tab2_673

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_673
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_673 UNION ALL SELECT pk, col0 FROM view_2_tab2_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_673 UNION SELECT pk, col0 FROM view_2_tab2_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) ) AS tab2_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_673

statement ok
DROP VIEW view_2_tab2_673

statement ok
DROP VIEW view_3_tab2_673

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_673 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)

statement ok
CREATE VIEW view_2_tab3_673 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))

statement ok
CREATE VIEW view_3_tab3_673 AS SELECT pk FROM view_1_tab3_673

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_673
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_673 UNION ALL SELECT pk, col0 FROM view_2_tab3_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_673 UNION SELECT pk, col0 FROM view_2_tab3_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) ) AS tab3_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_673

statement ok
DROP VIEW view_2_tab3_673

statement ok
DROP VIEW view_3_tab3_673

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_673 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)

statement ok
CREATE VIEW view_2_tab4_673 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))

statement ok
CREATE VIEW view_3_tab4_673 AS SELECT pk FROM view_1_tab4_673

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_673
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_673 UNION ALL SELECT pk, col0 FROM view_2_tab4_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_673 UNION SELECT pk, col0 FROM view_2_tab4_673
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63) ) AS tab4_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_673
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE col0 <= 22 AND col3 > 44 OR ((col0 >= 59 AND col0 < 57 AND (col1 > 29.57) OR col3 <= 15 OR col1 < 71.72 OR (((col3 < 25))) AND (col0 = 28 AND (((col1 <= 12.9 AND col3 < 5))) OR col3 > 9 AND (((col1 IS NULL OR (col1 < 44.63 OR col0 = 71)))) OR col0 = 10) AND col4 IS NULL AND (col4 = 0.83) AND ((col3 >= 85)))) AND (col1 > 23.89) AND col0 > 17 OR (col0 <= 63)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_673

statement ok
DROP VIEW view_2_tab4_673

statement ok
DROP VIEW view_3_tab4_673

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_674 AS SELECT pk, col0 FROM tab0 WHERE col0 > 47 AND (col3 IS NULL)

statement ok
CREATE VIEW view_2_tab0_674 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 47 AND (col3 IS NULL))

statement ok
CREATE VIEW view_3_tab0_674 AS SELECT pk FROM view_1_tab0_674

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE col0 > 47 AND (col3 IS NULL)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_674
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 47 AND (col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_674 UNION ALL SELECT pk, col0 FROM view_2_tab0_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 47 AND (col3 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_674 UNION SELECT pk, col0 FROM view_2_tab0_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 47 AND (col3 IS NULL) ) AS tab0_674
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_674
----

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE col0 > 47 AND (col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab0_674

statement ok
DROP VIEW view_2_tab0_674

statement ok
DROP VIEW view_3_tab0_674

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_674 AS SELECT pk, col0 FROM tab1 WHERE col0 > 47 AND (col3 IS NULL)

statement ok
CREATE VIEW view_2_tab1_674 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 47 AND (col3 IS NULL))

statement ok
CREATE VIEW view_3_tab1_674 AS SELECT pk FROM view_1_tab1_674

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE col0 > 47 AND (col3 IS NULL)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_674
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 47 AND (col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_674 UNION ALL SELECT pk, col0 FROM view_2_tab1_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 47 AND (col3 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_674 UNION SELECT pk, col0 FROM view_2_tab1_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 47 AND (col3 IS NULL) ) AS tab1_674
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_674
----

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE col0 > 47 AND (col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab1_674

statement ok
DROP VIEW view_2_tab1_674

statement ok
DROP VIEW view_3_tab1_674

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_674 AS SELECT pk, col0 FROM tab2 WHERE col0 > 47 AND (col3 IS NULL)

statement ok
CREATE VIEW view_2_tab2_674 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 47 AND (col3 IS NULL))

statement ok
CREATE VIEW view_3_tab2_674 AS SELECT pk FROM view_1_tab2_674

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE col0 > 47 AND (col3 IS NULL)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_674
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 47 AND (col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_674 UNION ALL SELECT pk, col0 FROM view_2_tab2_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 47 AND (col3 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_674 UNION SELECT pk, col0 FROM view_2_tab2_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 47 AND (col3 IS NULL) ) AS tab2_674
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_674
----

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE col0 > 47 AND (col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab2_674

statement ok
DROP VIEW view_2_tab2_674

statement ok
DROP VIEW view_3_tab2_674

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_674 AS SELECT pk, col0 FROM tab3 WHERE col0 > 47 AND (col3 IS NULL)

statement ok
CREATE VIEW view_2_tab3_674 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 47 AND (col3 IS NULL))

statement ok
CREATE VIEW view_3_tab3_674 AS SELECT pk FROM view_1_tab3_674

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE col0 > 47 AND (col3 IS NULL)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_674
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 47 AND (col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_674 UNION ALL SELECT pk, col0 FROM view_2_tab3_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 47 AND (col3 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_674 UNION SELECT pk, col0 FROM view_2_tab3_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 47 AND (col3 IS NULL) ) AS tab3_674
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_674
----

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE col0 > 47 AND (col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab3_674

statement ok
DROP VIEW view_2_tab3_674

statement ok
DROP VIEW view_3_tab3_674

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_674 AS SELECT pk, col0 FROM tab4 WHERE col0 > 47 AND (col3 IS NULL)

statement ok
CREATE VIEW view_2_tab4_674 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 47 AND (col3 IS NULL))

statement ok
CREATE VIEW view_3_tab4_674 AS SELECT pk FROM view_1_tab4_674

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE col0 > 47 AND (col3 IS NULL)
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_674
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 47 AND (col3 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_674 UNION ALL SELECT pk, col0 FROM view_2_tab4_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 47 AND (col3 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 47 AND (col3 IS NULL))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_674 UNION SELECT pk, col0 FROM view_2_tab4_674
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 47 AND (col3 IS NULL) ) AS tab4_674
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_674
----

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE col0 > 47 AND (col3 IS NULL)
----

statement ok
DROP VIEW view_1_tab4_674

statement ok
DROP VIEW view_2_tab4_674

statement ok
DROP VIEW view_3_tab4_674

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_675 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78

statement ok
CREATE VIEW view_2_tab0_675 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)

statement ok
CREATE VIEW view_3_tab0_675 AS SELECT pk FROM view_1_tab0_675

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
1
2
6
16

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_675
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_675
----
1
2
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_675 UNION ALL SELECT pk, col0 FROM view_2_tab0_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_675 UNION SELECT pk, col0 FROM view_2_tab0_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 ) AS tab0_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
0
2
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab0_675

statement ok
DROP VIEW view_2_tab0_675

statement ok
DROP VIEW view_3_tab0_675

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_675 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78

statement ok
CREATE VIEW view_2_tab1_675 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)

statement ok
CREATE VIEW view_3_tab1_675 AS SELECT pk FROM view_1_tab1_675

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
1
2
6
16

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_675
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_675
----
1
2
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_675 UNION ALL SELECT pk, col0 FROM view_2_tab1_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_675 UNION SELECT pk, col0 FROM view_2_tab1_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 ) AS tab1_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
0
2
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab1_675

statement ok
DROP VIEW view_2_tab1_675

statement ok
DROP VIEW view_3_tab1_675

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_675 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78

statement ok
CREATE VIEW view_2_tab2_675 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)

statement ok
CREATE VIEW view_3_tab2_675 AS SELECT pk FROM view_1_tab2_675

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
1
2
6
16

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_675
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_675
----
1
2
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_675 UNION ALL SELECT pk, col0 FROM view_2_tab2_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_675 UNION SELECT pk, col0 FROM view_2_tab2_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 ) AS tab2_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
0
2
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab2_675

statement ok
DROP VIEW view_2_tab2_675

statement ok
DROP VIEW view_3_tab2_675

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_675 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78

statement ok
CREATE VIEW view_2_tab3_675 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)

statement ok
CREATE VIEW view_3_tab3_675 AS SELECT pk FROM view_1_tab3_675

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
1
2
6
16

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_675
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_675
----
1
2
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_675 UNION ALL SELECT pk, col0 FROM view_2_tab3_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_675 UNION SELECT pk, col0 FROM view_2_tab3_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 ) AS tab3_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
0
2
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab3_675

statement ok
DROP VIEW view_2_tab3_675

statement ok
DROP VIEW view_3_tab3_675

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_675 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78

statement ok
CREATE VIEW view_2_tab4_675 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)

statement ok
CREATE VIEW view_3_tab4_675 AS SELECT pk FROM view_1_tab4_675

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
1
2
6
16

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_675
----
16 values hashing to 30f0d189cd2d530d29fb86f059345931

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_675
----
1
2
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_675 UNION ALL SELECT pk, col0 FROM view_2_tab4_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_675 UNION SELECT pk, col0 FROM view_2_tab4_675
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78 ) AS tab4_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_675
----
0
2
3
4
5
7
8
9

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col0 IS NULL AND col3 <= 74 OR col0 >= 22 OR col3 > 96 AND (col1 = 36.28) AND col4 <= 78.78
----
0
2
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab4_675

statement ok
DROP VIEW view_2_tab4_675

statement ok
DROP VIEW view_3_tab4_675

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_676 AS SELECT pk, col0 FROM tab0 WHERE col0 > 38

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

statement ok
CREATE VIEW view_3_tab0_676 AS SELECT pk FROM view_1_tab0_676

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE col0 > 38
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 38)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_676
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_676
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_676 UNION ALL SELECT pk, col0 FROM view_2_tab0_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_676 UNION SELECT pk, col0 FROM view_2_tab0_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 38 ) AS tab0_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE col0 > 38
----
0
2
3
4

statement ok
DROP VIEW view_1_tab0_676

statement ok
DROP VIEW view_2_tab0_676

statement ok
DROP VIEW view_3_tab0_676

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_676 AS SELECT pk, col0 FROM tab1 WHERE col0 > 38

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

statement ok
CREATE VIEW view_3_tab1_676 AS SELECT pk FROM view_1_tab1_676

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE col0 > 38
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 38)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_676
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_676
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_676 UNION ALL SELECT pk, col0 FROM view_2_tab1_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_676 UNION SELECT pk, col0 FROM view_2_tab1_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 38 ) AS tab1_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE col0 > 38
----
0
2
3
4

statement ok
DROP VIEW view_1_tab1_676

statement ok
DROP VIEW view_2_tab1_676

statement ok
DROP VIEW view_3_tab1_676

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_676 AS SELECT pk, col0 FROM tab2 WHERE col0 > 38

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

statement ok
CREATE VIEW view_3_tab2_676 AS SELECT pk FROM view_1_tab2_676

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE col0 > 38
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 38)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_676
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_676
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_676 UNION ALL SELECT pk, col0 FROM view_2_tab2_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_676 UNION SELECT pk, col0 FROM view_2_tab2_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 38 ) AS tab2_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE col0 > 38
----
0
2
3
4

statement ok
DROP VIEW view_1_tab2_676

statement ok
DROP VIEW view_2_tab2_676

statement ok
DROP VIEW view_3_tab2_676

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_676 AS SELECT pk, col0 FROM tab3 WHERE col0 > 38

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

statement ok
CREATE VIEW view_3_tab3_676 AS SELECT pk FROM view_1_tab3_676

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE col0 > 38
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 38)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_676
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_676
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_676 UNION ALL SELECT pk, col0 FROM view_2_tab3_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_676 UNION SELECT pk, col0 FROM view_2_tab3_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 38 ) AS tab3_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE col0 > 38
----
0
2
3
4

statement ok
DROP VIEW view_1_tab3_676

statement ok
DROP VIEW view_2_tab3_676

statement ok
DROP VIEW view_3_tab3_676

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_676 AS SELECT pk, col0 FROM tab4 WHERE col0 > 38

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

statement ok
CREATE VIEW view_3_tab4_676 AS SELECT pk FROM view_1_tab4_676

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE col0 > 38
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 38)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_676
----
0
48
2
85
3
93
4
44

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_676
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_676 UNION ALL SELECT pk, col0 FROM view_2_tab4_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_676 UNION SELECT pk, col0 FROM view_2_tab4_676
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 38 ) AS tab4_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_676
----
0
2
3
4

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE col0 > 38
----
0
2
3
4

statement ok
DROP VIEW view_1_tab4_676

statement ok
DROP VIEW view_2_tab4_676

statement ok
DROP VIEW view_3_tab4_676

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_677 AS SELECT pk, col0 FROM tab0 WHERE col1 < 76.9

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

statement ok
CREATE VIEW view_3_tab0_677 AS SELECT pk FROM view_1_tab0_677

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE col1 < 76.9
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 76.9)
----
1
2
6
16
8
23

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_677
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_677
----
1
2
6
16
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_677 UNION ALL SELECT pk, col0 FROM view_2_tab0_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_677 UNION SELECT pk, col0 FROM view_2_tab0_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 76.9 ) AS tab0_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE col1 < 76.9
----
0
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab0_677

statement ok
DROP VIEW view_2_tab0_677

statement ok
DROP VIEW view_3_tab0_677

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_677 AS SELECT pk, col0 FROM tab1 WHERE col1 < 76.9

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

statement ok
CREATE VIEW view_3_tab1_677 AS SELECT pk FROM view_1_tab1_677

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE col1 < 76.9
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 76.9)
----
1
2
6
16
8
23

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_677
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_677
----
1
2
6
16
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_677 UNION ALL SELECT pk, col0 FROM view_2_tab1_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_677 UNION SELECT pk, col0 FROM view_2_tab1_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 76.9 ) AS tab1_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE col1 < 76.9
----
0
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab1_677

statement ok
DROP VIEW view_2_tab1_677

statement ok
DROP VIEW view_3_tab1_677

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_677 AS SELECT pk, col0 FROM tab2 WHERE col1 < 76.9

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

statement ok
CREATE VIEW view_3_tab2_677 AS SELECT pk FROM view_1_tab2_677

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE col1 < 76.9
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 76.9)
----
1
2
6
16
8
23

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_677
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_677
----
1
2
6
16
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_677 UNION ALL SELECT pk, col0 FROM view_2_tab2_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_677 UNION SELECT pk, col0 FROM view_2_tab2_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 76.9 ) AS tab2_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE col1 < 76.9
----
0
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab2_677

statement ok
DROP VIEW view_2_tab2_677

statement ok
DROP VIEW view_3_tab2_677

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_677 AS SELECT pk, col0 FROM tab3 WHERE col1 < 76.9

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

statement ok
CREATE VIEW view_3_tab3_677 AS SELECT pk FROM view_1_tab3_677

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE col1 < 76.9
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 76.9)
----
1
2
6
16
8
23

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_677
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_677
----
1
2
6
16
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_677 UNION ALL SELECT pk, col0 FROM view_2_tab3_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_677 UNION SELECT pk, col0 FROM view_2_tab3_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 76.9 ) AS tab3_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE col1 < 76.9
----
0
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab3_677

statement ok
DROP VIEW view_2_tab3_677

statement ok
DROP VIEW view_3_tab3_677

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_677 AS SELECT pk, col0 FROM tab4 WHERE col1 < 76.9

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

statement ok
CREATE VIEW view_3_tab4_677 AS SELECT pk FROM view_1_tab4_677

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE col1 < 76.9
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 76.9)
----
1
2
6
16
8
23

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_677
----
14 values hashing to 464f78c2bf30ae2b6525a986e7314e2e

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_677
----
1
2
6
16
8
23

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_677 UNION ALL SELECT pk, col0 FROM view_2_tab4_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_677 UNION SELECT pk, col0 FROM view_2_tab4_677
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 76.9 ) AS tab4_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_677
----
0
2
3
4
5
7
9

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE col1 < 76.9
----
0
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab4_677

statement ok
DROP VIEW view_2_tab4_677

statement ok
DROP VIEW view_3_tab4_677

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_678 AS SELECT pk, col0 FROM tab0 WHERE ((col1 > 13.46))

statement ok
CREATE VIEW view_2_tab0_678 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 > 13.46)))

statement ok
CREATE VIEW view_3_tab0_678 AS SELECT pk FROM view_1_tab0_678

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE ((col1 > 13.46))
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 > 13.46)))
----
0
48
7
37

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_678
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_678
----
0
48
7
37

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_678 UNION ALL SELECT pk, col0 FROM view_2_tab0_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_678 UNION SELECT pk, col0 FROM view_2_tab0_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 > 13.46)) ) AS tab0_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE ((col1 > 13.46))
----
1
2
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab0_678

statement ok
DROP VIEW view_2_tab0_678

statement ok
DROP VIEW view_3_tab0_678

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_678 AS SELECT pk, col0 FROM tab1 WHERE ((col1 > 13.46))

statement ok
CREATE VIEW view_2_tab1_678 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 > 13.46)))

statement ok
CREATE VIEW view_3_tab1_678 AS SELECT pk FROM view_1_tab1_678

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE ((col1 > 13.46))
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 > 13.46)))
----
0
48
7
37

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_678
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_678
----
0
48
7
37

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_678 UNION ALL SELECT pk, col0 FROM view_2_tab1_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_678 UNION SELECT pk, col0 FROM view_2_tab1_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 > 13.46)) ) AS tab1_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE ((col1 > 13.46))
----
1
2
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab1_678

statement ok
DROP VIEW view_2_tab1_678

statement ok
DROP VIEW view_3_tab1_678

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_678 AS SELECT pk, col0 FROM tab2 WHERE ((col1 > 13.46))

statement ok
CREATE VIEW view_2_tab2_678 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 > 13.46)))

statement ok
CREATE VIEW view_3_tab2_678 AS SELECT pk FROM view_1_tab2_678

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE ((col1 > 13.46))
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 > 13.46)))
----
0
48
7
37

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_678
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_678
----
0
48
7
37

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_678 UNION ALL SELECT pk, col0 FROM view_2_tab2_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_678 UNION SELECT pk, col0 FROM view_2_tab2_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 > 13.46)) ) AS tab2_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE ((col1 > 13.46))
----
1
2
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab2_678

statement ok
DROP VIEW view_2_tab2_678

statement ok
DROP VIEW view_3_tab2_678

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_678 AS SELECT pk, col0 FROM tab3 WHERE ((col1 > 13.46))

statement ok
CREATE VIEW view_2_tab3_678 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 > 13.46)))

statement ok
CREATE VIEW view_3_tab3_678 AS SELECT pk FROM view_1_tab3_678

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE ((col1 > 13.46))
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 > 13.46)))
----
0
48
7
37

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_678
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_678
----
0
48
7
37

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_678 UNION ALL SELECT pk, col0 FROM view_2_tab3_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_678 UNION SELECT pk, col0 FROM view_2_tab3_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 > 13.46)) ) AS tab3_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE ((col1 > 13.46))
----
1
2
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab3_678

statement ok
DROP VIEW view_2_tab3_678

statement ok
DROP VIEW view_3_tab3_678

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_678 AS SELECT pk, col0 FROM tab4 WHERE ((col1 > 13.46))

statement ok
CREATE VIEW view_2_tab4_678 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 > 13.46)))

statement ok
CREATE VIEW view_3_tab4_678 AS SELECT pk FROM view_1_tab4_678

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE ((col1 > 13.46))
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 > 13.46)))
----
0
48
7
37

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_678
----
16 values hashing to 9b98c038b391a045f65b2e50b6bcaebd

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_678
----
0
48
7
37

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_678 UNION ALL SELECT pk, col0 FROM view_2_tab4_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_678 UNION SELECT pk, col0 FROM view_2_tab4_678
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 > 13.46)) ) AS tab4_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_678
----
1
2
3
4
5
6
8
9

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE ((col1 > 13.46))
----
1
2
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab4_678

statement ok
DROP VIEW view_2_tab4_678

statement ok
DROP VIEW view_3_tab4_678

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_679 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 19

statement ok
CREATE VIEW view_2_tab0_679 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 19)

statement ok
CREATE VIEW view_3_tab0_679 AS SELECT pk FROM view_1_tab0_679

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 19
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 19)
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_679
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_679
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_679 UNION ALL SELECT pk, col0 FROM view_2_tab0_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 19 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 19)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_679 UNION SELECT pk, col0 FROM view_2_tab0_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 19 ) AS tab0_679
----
0
3

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_679
----
0
3

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE col3 <= 19
----
0
3

statement ok
DROP VIEW view_1_tab0_679

statement ok
DROP VIEW view_2_tab0_679

statement ok
DROP VIEW view_3_tab0_679

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_679 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 19

statement ok
CREATE VIEW view_2_tab1_679 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 19)

statement ok
CREATE VIEW view_3_tab1_679 AS SELECT pk FROM view_1_tab1_679

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 19
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 19)
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_679
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_679
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_679 UNION ALL SELECT pk, col0 FROM view_2_tab1_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 19 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 19)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_679 UNION SELECT pk, col0 FROM view_2_tab1_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 19 ) AS tab1_679
----
0
3

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_679
----
0
3

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE col3 <= 19
----
0
3

statement ok
DROP VIEW view_1_tab1_679

statement ok
DROP VIEW view_2_tab1_679

statement ok
DROP VIEW view_3_tab1_679

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_679 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 19

statement ok
CREATE VIEW view_2_tab2_679 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 19)

statement ok
CREATE VIEW view_3_tab2_679 AS SELECT pk FROM view_1_tab2_679

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 19
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 19)
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_679
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_679
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_679 UNION ALL SELECT pk, col0 FROM view_2_tab2_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 19 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 19)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_679 UNION SELECT pk, col0 FROM view_2_tab2_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 19 ) AS tab2_679
----
0
3

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_679
----
0
3

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE col3 <= 19
----
0
3

statement ok
DROP VIEW view_1_tab2_679

statement ok
DROP VIEW view_2_tab2_679

statement ok
DROP VIEW view_3_tab2_679

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_679 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 19

statement ok
CREATE VIEW view_2_tab3_679 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 19)

statement ok
CREATE VIEW view_3_tab3_679 AS SELECT pk FROM view_1_tab3_679

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 19
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 19)
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_679
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_679
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_679 UNION ALL SELECT pk, col0 FROM view_2_tab3_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 19 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 19)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_679 UNION SELECT pk, col0 FROM view_2_tab3_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 19 ) AS tab3_679
----
0
3

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_679
----
0
3

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE col3 <= 19
----
0
3

statement ok
DROP VIEW view_1_tab3_679

statement ok
DROP VIEW view_2_tab3_679

statement ok
DROP VIEW view_3_tab3_679

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_679 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 19

statement ok
CREATE VIEW view_2_tab4_679 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 19)

statement ok
CREATE VIEW view_3_tab4_679 AS SELECT pk FROM view_1_tab4_679

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 19
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 19)
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_679
----
0
48
3
93

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_679
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_679 UNION ALL SELECT pk, col0 FROM view_2_tab4_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 19 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 19)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_679 UNION SELECT pk, col0 FROM view_2_tab4_679
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 19 ) AS tab4_679
----
0
3

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_679
----
0
3

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE col3 <= 19
----
0
3

statement ok
DROP VIEW view_1_tab4_679

statement ok
DROP VIEW view_2_tab4_679

statement ok
DROP VIEW view_3_tab4_679

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_680 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 70.65

statement ok
CREATE VIEW view_2_tab0_680 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 70.65)

statement ok
CREATE VIEW view_3_tab0_680 AS SELECT pk FROM view_1_tab0_680

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 70.65
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 70.65)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_680
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_680
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_680 UNION ALL SELECT pk, col0 FROM view_2_tab0_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_680 UNION SELECT pk, col0 FROM view_2_tab0_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 70.65 ) AS tab0_680
----
2
4
5

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_680
----
2
4
5

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE col4 >= 70.65
----
2
4
5

statement ok
DROP VIEW view_1_tab0_680

statement ok
DROP VIEW view_2_tab0_680

statement ok
DROP VIEW view_3_tab0_680

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_680 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 70.65

statement ok
CREATE VIEW view_2_tab1_680 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 70.65)

statement ok
CREATE VIEW view_3_tab1_680 AS SELECT pk FROM view_1_tab1_680

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 70.65
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 70.65)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_680
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_680
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_680 UNION ALL SELECT pk, col0 FROM view_2_tab1_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_680 UNION SELECT pk, col0 FROM view_2_tab1_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 70.65 ) AS tab1_680
----
2
4
5

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_680
----
2
4
5

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE col4 >= 70.65
----
2
4
5

statement ok
DROP VIEW view_1_tab1_680

statement ok
DROP VIEW view_2_tab1_680

statement ok
DROP VIEW view_3_tab1_680

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_680 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 70.65

statement ok
CREATE VIEW view_2_tab2_680 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 70.65)

statement ok
CREATE VIEW view_3_tab2_680 AS SELECT pk FROM view_1_tab2_680

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 70.65
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 70.65)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_680
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_680
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_680 UNION ALL SELECT pk, col0 FROM view_2_tab2_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_680 UNION SELECT pk, col0 FROM view_2_tab2_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 70.65 ) AS tab2_680
----
2
4
5

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_680
----
2
4
5

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE col4 >= 70.65
----
2
4
5

statement ok
DROP VIEW view_1_tab2_680

statement ok
DROP VIEW view_2_tab2_680

statement ok
DROP VIEW view_3_tab2_680

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_680 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 70.65

statement ok
CREATE VIEW view_2_tab3_680 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 70.65)

statement ok
CREATE VIEW view_3_tab3_680 AS SELECT pk FROM view_1_tab3_680

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 70.65
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 70.65)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_680
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_680
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_680 UNION ALL SELECT pk, col0 FROM view_2_tab3_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_680 UNION SELECT pk, col0 FROM view_2_tab3_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 70.65 ) AS tab3_680
----
2
4
5

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_680
----
2
4
5

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE col4 >= 70.65
----
2
4
5

statement ok
DROP VIEW view_1_tab3_680

statement ok
DROP VIEW view_2_tab3_680

statement ok
DROP VIEW view_3_tab3_680

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_680 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 70.65

statement ok
CREATE VIEW view_2_tab4_680 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 70.65)

statement ok
CREATE VIEW view_3_tab4_680 AS SELECT pk FROM view_1_tab4_680

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 70.65
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 70.65)
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_680
----
2
85
4
44
5
36

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_680
----
14 values hashing to c05c6eb76defc8519c204fc5ac1d6ee2

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_680 UNION ALL SELECT pk, col0 FROM view_2_tab4_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_680 UNION SELECT pk, col0 FROM view_2_tab4_680
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 70.65 ) AS tab4_680
----
2
4
5

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_680
----
2
4
5

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE col4 >= 70.65
----
2
4
5

statement ok
DROP VIEW view_1_tab4_680

statement ok
DROP VIEW view_2_tab4_680

statement ok
DROP VIEW view_3_tab4_680

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_681 AS SELECT pk, col0 FROM tab0 WHERE col1 IN (87.83,30.38,58.81,1.42)

statement ok
CREATE VIEW view_2_tab0_681 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))

statement ok
CREATE VIEW view_3_tab0_681 AS SELECT pk FROM view_1_tab0_681

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_681
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_681 UNION ALL SELECT pk, col0 FROM view_2_tab0_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_681 UNION SELECT pk, col0 FROM view_2_tab0_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 IN (87.83,30.38,58.81,1.42) ) AS tab0_681
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_681
----

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

statement ok
DROP VIEW view_1_tab0_681

statement ok
DROP VIEW view_2_tab0_681

statement ok
DROP VIEW view_3_tab0_681

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_681 AS SELECT pk, col0 FROM tab1 WHERE col1 IN (87.83,30.38,58.81,1.42)

statement ok
CREATE VIEW view_2_tab1_681 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))

statement ok
CREATE VIEW view_3_tab1_681 AS SELECT pk FROM view_1_tab1_681

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_681
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_681 UNION ALL SELECT pk, col0 FROM view_2_tab1_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_681 UNION SELECT pk, col0 FROM view_2_tab1_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 IN (87.83,30.38,58.81,1.42) ) AS tab1_681
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_681
----

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

statement ok
DROP VIEW view_1_tab1_681

statement ok
DROP VIEW view_2_tab1_681

statement ok
DROP VIEW view_3_tab1_681

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_681 AS SELECT pk, col0 FROM tab2 WHERE col1 IN (87.83,30.38,58.81,1.42)

statement ok
CREATE VIEW view_2_tab2_681 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))

statement ok
CREATE VIEW view_3_tab2_681 AS SELECT pk FROM view_1_tab2_681

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_681
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_681 UNION ALL SELECT pk, col0 FROM view_2_tab2_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_681 UNION SELECT pk, col0 FROM view_2_tab2_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 IN (87.83,30.38,58.81,1.42) ) AS tab2_681
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_681
----

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

statement ok
DROP VIEW view_1_tab2_681

statement ok
DROP VIEW view_2_tab2_681

statement ok
DROP VIEW view_3_tab2_681

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_681 AS SELECT pk, col0 FROM tab3 WHERE col1 IN (87.83,30.38,58.81,1.42)

statement ok
CREATE VIEW view_2_tab3_681 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))

statement ok
CREATE VIEW view_3_tab3_681 AS SELECT pk FROM view_1_tab3_681

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_681
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_681 UNION ALL SELECT pk, col0 FROM view_2_tab3_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_681 UNION SELECT pk, col0 FROM view_2_tab3_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 IN (87.83,30.38,58.81,1.42) ) AS tab3_681
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_681
----

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

statement ok
DROP VIEW view_1_tab3_681

statement ok
DROP VIEW view_2_tab3_681

statement ok
DROP VIEW view_3_tab3_681

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_681 AS SELECT pk, col0 FROM tab4 WHERE col1 IN (87.83,30.38,58.81,1.42)

statement ok
CREATE VIEW view_2_tab4_681 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))

statement ok
CREATE VIEW view_3_tab4_681 AS SELECT pk FROM view_1_tab4_681

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_681
----

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_681 UNION ALL SELECT pk, col0 FROM view_2_tab4_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IN (87.83,30.38,58.81,1.42) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (87.83,30.38,58.81,1.42))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_681 UNION SELECT pk, col0 FROM view_2_tab4_681
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 IN (87.83,30.38,58.81,1.42) ) AS tab4_681
----

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_681
----

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col1 IN (87.83,30.38,58.81,1.42)
----

statement ok
DROP VIEW view_1_tab4_681

statement ok
DROP VIEW view_2_tab4_681

statement ok
DROP VIEW view_3_tab4_681

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_682 AS SELECT pk, col0 FROM tab0 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL

statement ok
CREATE VIEW view_2_tab0_682 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)

statement ok
CREATE VIEW view_3_tab0_682 AS SELECT pk FROM view_1_tab0_682

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_682
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_682
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_682 UNION ALL SELECT pk, col0 FROM view_2_tab0_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_682 UNION SELECT pk, col0 FROM view_2_tab0_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL ) AS tab0_682
----
2
3

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_682
----
2
3

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
3

statement ok
DROP VIEW view_1_tab0_682

statement ok
DROP VIEW view_2_tab0_682

statement ok
DROP VIEW view_3_tab0_682

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_682 AS SELECT pk, col0 FROM tab1 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL

statement ok
CREATE VIEW view_2_tab1_682 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)

statement ok
CREATE VIEW view_3_tab1_682 AS SELECT pk FROM view_1_tab1_682

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_682
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_682
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_682 UNION ALL SELECT pk, col0 FROM view_2_tab1_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_682 UNION SELECT pk, col0 FROM view_2_tab1_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL ) AS tab1_682
----
2
3

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_682
----
2
3

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
3

statement ok
DROP VIEW view_1_tab1_682

statement ok
DROP VIEW view_2_tab1_682

statement ok
DROP VIEW view_3_tab1_682

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_682 AS SELECT pk, col0 FROM tab2 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL

statement ok
CREATE VIEW view_2_tab2_682 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)

statement ok
CREATE VIEW view_3_tab2_682 AS SELECT pk FROM view_1_tab2_682

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_682
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_682
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_682 UNION ALL SELECT pk, col0 FROM view_2_tab2_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_682 UNION SELECT pk, col0 FROM view_2_tab2_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL ) AS tab2_682
----
2
3

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_682
----
2
3

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
3

statement ok
DROP VIEW view_1_tab2_682

statement ok
DROP VIEW view_2_tab2_682

statement ok
DROP VIEW view_3_tab2_682

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_682 AS SELECT pk, col0 FROM tab3 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL

statement ok
CREATE VIEW view_2_tab3_682 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)

statement ok
CREATE VIEW view_3_tab3_682 AS SELECT pk FROM view_1_tab3_682

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_682
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_682
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_682 UNION ALL SELECT pk, col0 FROM view_2_tab3_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_682 UNION SELECT pk, col0 FROM view_2_tab3_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL ) AS tab3_682
----
2
3

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_682
----
2
3

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
3

statement ok
DROP VIEW view_1_tab3_682

statement ok
DROP VIEW view_2_tab3_682

statement ok
DROP VIEW view_3_tab3_682

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_682 AS SELECT pk, col0 FROM tab4 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL

statement ok
CREATE VIEW view_2_tab4_682 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)

statement ok
CREATE VIEW view_3_tab4_682 AS SELECT pk FROM view_1_tab4_682

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_682
----
2
85
3
93

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_682
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_682 UNION ALL SELECT pk, col0 FROM view_2_tab4_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 66 AND col0 <= 96 OR col1 IS NULL)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_682 UNION SELECT pk, col0 FROM view_2_tab4_682
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL ) AS tab4_682
----
2
3

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_682
----
2
3

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE col0 > 66 AND col0 <= 96 OR col1 IS NULL
----
2
3

statement ok
DROP VIEW view_1_tab4_682

statement ok
DROP VIEW view_2_tab4_682

statement ok
DROP VIEW view_3_tab4_682

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_684 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 12

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

statement ok
CREATE VIEW view_3_tab0_684 AS SELECT pk FROM view_1_tab0_684

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 12
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 12)
----
3
93

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_684
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_684
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_684 UNION ALL SELECT pk, col0 FROM view_2_tab0_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_684 UNION SELECT pk, col0 FROM view_2_tab0_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 12 ) AS tab0_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE col3 >= 12
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_684

statement ok
DROP VIEW view_2_tab0_684

statement ok
DROP VIEW view_3_tab0_684

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_684 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 12

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

statement ok
CREATE VIEW view_3_tab1_684 AS SELECT pk FROM view_1_tab1_684

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 12
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 12)
----
3
93

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_684
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_684
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_684 UNION ALL SELECT pk, col0 FROM view_2_tab1_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_684 UNION SELECT pk, col0 FROM view_2_tab1_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 12 ) AS tab1_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE col3 >= 12
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_684

statement ok
DROP VIEW view_2_tab1_684

statement ok
DROP VIEW view_3_tab1_684

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_684 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 12

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

statement ok
CREATE VIEW view_3_tab2_684 AS SELECT pk FROM view_1_tab2_684

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 12
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 12)
----
3
93

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_684
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_684
----
3
93

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_684 UNION ALL SELECT pk, col0 FROM view_2_tab2_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_684 UNION SELECT pk, col0 FROM view_2_tab2_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 12 ) AS tab2_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE col3 >= 12
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_684

statement ok
DROP VIEW view_2_tab2_684

statement ok
DROP VIEW view_3_tab2_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_684') DROP VIEW view_1_tab3_684

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_684') DROP VIEW view_2_tab3_684

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_684') DROP VIEW view_3_tab3_684

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_684

statement ok
CREATE VIEW view_1_tab3_684 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 12

statement ok
CREATE VIEW view_2_tab3_684 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12)

statement ok
CREATE VIEW view_3_tab3_684 AS SELECT pk FROM view_1_tab3_684

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 12
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12)
----
3
93

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_684
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_684
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 12 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_684 UNION ALL SELECT pk, col0 FROM view_2_tab3_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 12 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 12)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_684 UNION SELECT pk, col0 FROM view_2_tab3_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 12 ) AS tab3_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE col3 >= 12
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_684

statement ok
DROP VIEW view_2_tab3_684

statement ok
DROP VIEW view_3_tab3_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_684') DROP VIEW view_1_tab4_684

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_684') DROP VIEW view_2_tab4_684

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_684') DROP VIEW view_3_tab4_684

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_684

statement ok
CREATE VIEW view_1_tab4_684 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 12

statement ok
CREATE VIEW view_2_tab4_684 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12)

statement ok
CREATE VIEW view_3_tab4_684 AS SELECT pk FROM view_1_tab4_684

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 12
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12)
----
3
93

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_684
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_684
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 12 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_684 UNION ALL SELECT pk, col0 FROM view_2_tab4_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 12 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 12)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_684 UNION SELECT pk, col0 FROM view_2_tab4_684
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 12 ) AS tab4_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_684
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE col3 >= 12
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_684

statement ok
DROP VIEW view_2_tab4_684

statement ok
DROP VIEW view_3_tab4_684

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_685') DROP VIEW view_1_tab0_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_685') DROP VIEW view_2_tab0_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_685') DROP VIEW view_3_tab0_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_685

statement ok
CREATE VIEW view_1_tab0_685 AS SELECT pk, col0 FROM tab0 WHERE col4 < 51.26

statement ok
CREATE VIEW view_2_tab0_685 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 51.26)

statement ok
CREATE VIEW view_3_tab0_685 AS SELECT pk FROM view_1_tab0_685

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE col4 < 51.26
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 51.26)
----
2
85
4
44
5
36
8
23

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_685
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_685
----
2
85
4
44
5
36
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 51.26 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_685 UNION ALL SELECT pk, col0 FROM view_2_tab0_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 51.26 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_685 UNION SELECT pk, col0 FROM view_2_tab0_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 51.26 ) AS tab0_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE col4 < 51.26
----
0
1
3
6
7
9

statement ok
DROP VIEW view_1_tab0_685

statement ok
DROP VIEW view_2_tab0_685

statement ok
DROP VIEW view_3_tab0_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_685') DROP VIEW view_1_tab1_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_685') DROP VIEW view_2_tab1_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_685') DROP VIEW view_3_tab1_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_685

statement ok
CREATE VIEW view_1_tab1_685 AS SELECT pk, col0 FROM tab1 WHERE col4 < 51.26

statement ok
CREATE VIEW view_2_tab1_685 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 51.26)

statement ok
CREATE VIEW view_3_tab1_685 AS SELECT pk FROM view_1_tab1_685

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE col4 < 51.26
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 51.26)
----
2
85
4
44
5
36
8
23

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_685
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_685
----
2
85
4
44
5
36
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 51.26 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_685 UNION ALL SELECT pk, col0 FROM view_2_tab1_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 51.26 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_685 UNION SELECT pk, col0 FROM view_2_tab1_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 51.26 ) AS tab1_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE col4 < 51.26
----
0
1
3
6
7
9

statement ok
DROP VIEW view_1_tab1_685

statement ok
DROP VIEW view_2_tab1_685

statement ok
DROP VIEW view_3_tab1_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_685') DROP VIEW view_1_tab2_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_685') DROP VIEW view_2_tab2_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_685') DROP VIEW view_3_tab2_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_685

statement ok
CREATE VIEW view_1_tab2_685 AS SELECT pk, col0 FROM tab2 WHERE col4 < 51.26

statement ok
CREATE VIEW view_2_tab2_685 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 51.26)

statement ok
CREATE VIEW view_3_tab2_685 AS SELECT pk FROM view_1_tab2_685

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE col4 < 51.26
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 51.26)
----
2
85
4
44
5
36
8
23

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_685
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_685
----
2
85
4
44
5
36
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 51.26 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_685 UNION ALL SELECT pk, col0 FROM view_2_tab2_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 51.26 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_685 UNION SELECT pk, col0 FROM view_2_tab2_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 51.26 ) AS tab2_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE col4 < 51.26
----
0
1
3
6
7
9

statement ok
DROP VIEW view_1_tab2_685

statement ok
DROP VIEW view_2_tab2_685

statement ok
DROP VIEW view_3_tab2_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_685') DROP VIEW view_1_tab3_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_685') DROP VIEW view_2_tab3_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_685') DROP VIEW view_3_tab3_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_685

statement ok
CREATE VIEW view_1_tab3_685 AS SELECT pk, col0 FROM tab3 WHERE col4 < 51.26

statement ok
CREATE VIEW view_2_tab3_685 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 51.26)

statement ok
CREATE VIEW view_3_tab3_685 AS SELECT pk FROM view_1_tab3_685

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE col4 < 51.26
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 51.26)
----
2
85
4
44
5
36
8
23

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_685
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_685
----
2
85
4
44
5
36
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 51.26 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_685 UNION ALL SELECT pk, col0 FROM view_2_tab3_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 51.26 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_685 UNION SELECT pk, col0 FROM view_2_tab3_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 51.26 ) AS tab3_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE col4 < 51.26
----
0
1
3
6
7
9

statement ok
DROP VIEW view_1_tab3_685

statement ok
DROP VIEW view_2_tab3_685

statement ok
DROP VIEW view_3_tab3_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_685') DROP VIEW view_1_tab4_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_685') DROP VIEW view_2_tab4_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_685') DROP VIEW view_3_tab4_685

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_685

statement ok
CREATE VIEW view_1_tab4_685 AS SELECT pk, col0 FROM tab4 WHERE col4 < 51.26

statement ok
CREATE VIEW view_2_tab4_685 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 51.26)

statement ok
CREATE VIEW view_3_tab4_685 AS SELECT pk FROM view_1_tab4_685

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE col4 < 51.26
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 51.26)
----
2
85
4
44
5
36
8
23

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_685
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_685
----
2
85
4
44
5
36
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 51.26 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_685 UNION ALL SELECT pk, col0 FROM view_2_tab4_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 51.26 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 51.26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_685 UNION SELECT pk, col0 FROM view_2_tab4_685
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 51.26 ) AS tab4_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_685
----
0
1
3
6
7
9

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE col4 < 51.26
----
0
1
3
6
7
9

statement ok
DROP VIEW view_1_tab4_685

statement ok
DROP VIEW view_2_tab4_685

statement ok
DROP VIEW view_3_tab4_685

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_686') DROP VIEW view_1_tab0_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_686') DROP VIEW view_2_tab0_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_686') DROP VIEW view_3_tab0_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_686

statement ok
CREATE VIEW view_1_tab0_686 AS SELECT pk, col0 FROM tab0 WHERE col3 > 45

statement ok
CREATE VIEW view_2_tab0_686 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 45)

statement ok
CREATE VIEW view_3_tab0_686 AS SELECT pk FROM view_1_tab0_686

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE col3 > 45
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 45)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_686
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_686
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 45 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_686 UNION ALL SELECT pk, col0 FROM view_2_tab0_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 45 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_686 UNION SELECT pk, col0 FROM view_2_tab0_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 45 ) AS tab0_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE col3 > 45
----
1
2
8
9

statement ok
DROP VIEW view_1_tab0_686

statement ok
DROP VIEW view_2_tab0_686

statement ok
DROP VIEW view_3_tab0_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_686') DROP VIEW view_1_tab1_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_686') DROP VIEW view_2_tab1_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_686') DROP VIEW view_3_tab1_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_686

statement ok
CREATE VIEW view_1_tab1_686 AS SELECT pk, col0 FROM tab1 WHERE col3 > 45

statement ok
CREATE VIEW view_2_tab1_686 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 45)

statement ok
CREATE VIEW view_3_tab1_686 AS SELECT pk FROM view_1_tab1_686

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE col3 > 45
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 45)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_686
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_686
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 45 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_686 UNION ALL SELECT pk, col0 FROM view_2_tab1_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 45 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_686 UNION SELECT pk, col0 FROM view_2_tab1_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 45 ) AS tab1_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE col3 > 45
----
1
2
8
9

statement ok
DROP VIEW view_1_tab1_686

statement ok
DROP VIEW view_2_tab1_686

statement ok
DROP VIEW view_3_tab1_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_686') DROP VIEW view_1_tab2_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_686') DROP VIEW view_2_tab2_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_686') DROP VIEW view_3_tab2_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_686

statement ok
CREATE VIEW view_1_tab2_686 AS SELECT pk, col0 FROM tab2 WHERE col3 > 45

statement ok
CREATE VIEW view_2_tab2_686 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 45)

statement ok
CREATE VIEW view_3_tab2_686 AS SELECT pk FROM view_1_tab2_686

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE col3 > 45
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 45)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_686
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_686
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 45 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_686 UNION ALL SELECT pk, col0 FROM view_2_tab2_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 45 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_686 UNION SELECT pk, col0 FROM view_2_tab2_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 45 ) AS tab2_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE col3 > 45
----
1
2
8
9

statement ok
DROP VIEW view_1_tab2_686

statement ok
DROP VIEW view_2_tab2_686

statement ok
DROP VIEW view_3_tab2_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_686') DROP VIEW view_1_tab3_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_686') DROP VIEW view_2_tab3_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_686') DROP VIEW view_3_tab3_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_686

statement ok
CREATE VIEW view_1_tab3_686 AS SELECT pk, col0 FROM tab3 WHERE col3 > 45

statement ok
CREATE VIEW view_2_tab3_686 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 45)

statement ok
CREATE VIEW view_3_tab3_686 AS SELECT pk FROM view_1_tab3_686

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE col3 > 45
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 45)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_686
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_686
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 45 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_686 UNION ALL SELECT pk, col0 FROM view_2_tab3_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 45 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_686 UNION SELECT pk, col0 FROM view_2_tab3_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 45 ) AS tab3_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE col3 > 45
----
1
2
8
9

statement ok
DROP VIEW view_1_tab3_686

statement ok
DROP VIEW view_2_tab3_686

statement ok
DROP VIEW view_3_tab3_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_686') DROP VIEW view_1_tab4_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_686') DROP VIEW view_2_tab4_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_686') DROP VIEW view_3_tab4_686

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_686

statement ok
CREATE VIEW view_1_tab4_686 AS SELECT pk, col0 FROM tab4 WHERE col3 > 45

statement ok
CREATE VIEW view_2_tab4_686 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 45)

statement ok
CREATE VIEW view_3_tab4_686 AS SELECT pk FROM view_1_tab4_686

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE col3 > 45
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 45)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_686
----
1
2
2
85
8
23
9
32

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_686
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 45 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_686 UNION ALL SELECT pk, col0 FROM view_2_tab4_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 45 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 45)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_686 UNION SELECT pk, col0 FROM view_2_tab4_686
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 45 ) AS tab4_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_686
----
1
2
8
9

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE col3 > 45
----
1
2
8
9

statement ok
DROP VIEW view_1_tab4_686

statement ok
DROP VIEW view_2_tab4_686

statement ok
DROP VIEW view_3_tab4_686

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_687') DROP VIEW view_1_tab0_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_687') DROP VIEW view_2_tab0_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_687') DROP VIEW view_3_tab0_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_687

statement ok
CREATE VIEW view_1_tab0_687 AS SELECT pk, col0 FROM tab0 WHERE col3 > 79

statement ok
CREATE VIEW view_2_tab0_687 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 79)

statement ok
CREATE VIEW view_3_tab0_687 AS SELECT pk FROM view_1_tab0_687

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col3 > 79
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 79)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_687
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_687
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 79 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_687 UNION ALL SELECT pk, col0 FROM view_2_tab0_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 79 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_687 UNION SELECT pk, col0 FROM view_2_tab0_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 79 ) AS tab0_687
----
8

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_687
----
8

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col3 > 79
----
8

statement ok
DROP VIEW view_1_tab0_687

statement ok
DROP VIEW view_2_tab0_687

statement ok
DROP VIEW view_3_tab0_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_687') DROP VIEW view_1_tab1_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_687') DROP VIEW view_2_tab1_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_687') DROP VIEW view_3_tab1_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_687

statement ok
CREATE VIEW view_1_tab1_687 AS SELECT pk, col0 FROM tab1 WHERE col3 > 79

statement ok
CREATE VIEW view_2_tab1_687 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 79)

statement ok
CREATE VIEW view_3_tab1_687 AS SELECT pk FROM view_1_tab1_687

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col3 > 79
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 79)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_687
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_687
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 79 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_687 UNION ALL SELECT pk, col0 FROM view_2_tab1_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 79 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_687 UNION SELECT pk, col0 FROM view_2_tab1_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 79 ) AS tab1_687
----
8

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_687
----
8

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col3 > 79
----
8

statement ok
DROP VIEW view_1_tab1_687

statement ok
DROP VIEW view_2_tab1_687

statement ok
DROP VIEW view_3_tab1_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_687') DROP VIEW view_1_tab2_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_687') DROP VIEW view_2_tab2_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_687') DROP VIEW view_3_tab2_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_687

statement ok
CREATE VIEW view_1_tab2_687 AS SELECT pk, col0 FROM tab2 WHERE col3 > 79

statement ok
CREATE VIEW view_2_tab2_687 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 79)

statement ok
CREATE VIEW view_3_tab2_687 AS SELECT pk FROM view_1_tab2_687

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col3 > 79
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 79)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_687
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_687
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 79 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_687 UNION ALL SELECT pk, col0 FROM view_2_tab2_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 79 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_687 UNION SELECT pk, col0 FROM view_2_tab2_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 79 ) AS tab2_687
----
8

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_687
----
8

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col3 > 79
----
8

statement ok
DROP VIEW view_1_tab2_687

statement ok
DROP VIEW view_2_tab2_687

statement ok
DROP VIEW view_3_tab2_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_687') DROP VIEW view_1_tab3_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_687') DROP VIEW view_2_tab3_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_687') DROP VIEW view_3_tab3_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_687

statement ok
CREATE VIEW view_1_tab3_687 AS SELECT pk, col0 FROM tab3 WHERE col3 > 79

statement ok
CREATE VIEW view_2_tab3_687 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 79)

statement ok
CREATE VIEW view_3_tab3_687 AS SELECT pk FROM view_1_tab3_687

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col3 > 79
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 79)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_687
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_687
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 79 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_687 UNION ALL SELECT pk, col0 FROM view_2_tab3_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 79 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_687 UNION SELECT pk, col0 FROM view_2_tab3_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 79 ) AS tab3_687
----
8

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_687
----
8

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col3 > 79
----
8

statement ok
DROP VIEW view_1_tab3_687

statement ok
DROP VIEW view_2_tab3_687

statement ok
DROP VIEW view_3_tab3_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_687') DROP VIEW view_1_tab4_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_687') DROP VIEW view_2_tab4_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_687') DROP VIEW view_3_tab4_687

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_687

statement ok
CREATE VIEW view_1_tab4_687 AS SELECT pk, col0 FROM tab4 WHERE col3 > 79

statement ok
CREATE VIEW view_2_tab4_687 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 79)

statement ok
CREATE VIEW view_3_tab4_687 AS SELECT pk FROM view_1_tab4_687

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col3 > 79
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 79)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_687
----
8
23

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_687
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 79 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_687 UNION ALL SELECT pk, col0 FROM view_2_tab4_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 79 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_687 UNION SELECT pk, col0 FROM view_2_tab4_687
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 79 ) AS tab4_687
----
8

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_687
----
8

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col3 > 79
----
8

statement ok
DROP VIEW view_1_tab4_687

statement ok
DROP VIEW view_2_tab4_687

statement ok
DROP VIEW view_3_tab4_687

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_688') DROP VIEW view_1_tab0_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_688') DROP VIEW view_2_tab0_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_688') DROP VIEW view_3_tab0_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_688

statement ok
CREATE VIEW view_1_tab0_688 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 54.74

statement ok
CREATE VIEW view_2_tab0_688 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.74)

statement ok
CREATE VIEW view_3_tab0_688 AS SELECT pk FROM view_1_tab0_688

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 54.74
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.74)
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_688
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_688
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 54.74 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_688 UNION ALL SELECT pk, col0 FROM view_2_tab0_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 54.74 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_688 UNION SELECT pk, col0 FROM view_2_tab0_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 54.74 ) AS tab0_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE col4 >= 54.74
----
2
4
5
8

statement ok
DROP VIEW view_1_tab0_688

statement ok
DROP VIEW view_2_tab0_688

statement ok
DROP VIEW view_3_tab0_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_688') DROP VIEW view_1_tab1_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_688') DROP VIEW view_2_tab1_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_688') DROP VIEW view_3_tab1_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_688

statement ok
CREATE VIEW view_1_tab1_688 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 54.74

statement ok
CREATE VIEW view_2_tab1_688 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.74)

statement ok
CREATE VIEW view_3_tab1_688 AS SELECT pk FROM view_1_tab1_688

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 54.74
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.74)
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_688
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_688
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 54.74 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_688 UNION ALL SELECT pk, col0 FROM view_2_tab1_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 54.74 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_688 UNION SELECT pk, col0 FROM view_2_tab1_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 54.74 ) AS tab1_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE col4 >= 54.74
----
2
4
5
8

statement ok
DROP VIEW view_1_tab1_688

statement ok
DROP VIEW view_2_tab1_688

statement ok
DROP VIEW view_3_tab1_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_688') DROP VIEW view_1_tab2_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_688') DROP VIEW view_2_tab2_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_688') DROP VIEW view_3_tab2_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_688

statement ok
CREATE VIEW view_1_tab2_688 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 54.74

statement ok
CREATE VIEW view_2_tab2_688 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.74)

statement ok
CREATE VIEW view_3_tab2_688 AS SELECT pk FROM view_1_tab2_688

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 54.74
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.74)
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_688
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_688
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 54.74 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_688 UNION ALL SELECT pk, col0 FROM view_2_tab2_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 54.74 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_688 UNION SELECT pk, col0 FROM view_2_tab2_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 54.74 ) AS tab2_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE col4 >= 54.74
----
2
4
5
8

statement ok
DROP VIEW view_1_tab2_688

statement ok
DROP VIEW view_2_tab2_688

statement ok
DROP VIEW view_3_tab2_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_688') DROP VIEW view_1_tab3_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_688') DROP VIEW view_2_tab3_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_688') DROP VIEW view_3_tab3_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_688

statement ok
CREATE VIEW view_1_tab3_688 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 54.74

statement ok
CREATE VIEW view_2_tab3_688 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.74)

statement ok
CREATE VIEW view_3_tab3_688 AS SELECT pk FROM view_1_tab3_688

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 54.74
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.74)
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_688
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_688
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 54.74 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_688 UNION ALL SELECT pk, col0 FROM view_2_tab3_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 54.74 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_688 UNION SELECT pk, col0 FROM view_2_tab3_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 54.74 ) AS tab3_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE col4 >= 54.74
----
2
4
5
8

statement ok
DROP VIEW view_1_tab3_688

statement ok
DROP VIEW view_2_tab3_688

statement ok
DROP VIEW view_3_tab3_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_688') DROP VIEW view_1_tab4_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_688') DROP VIEW view_2_tab4_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_688') DROP VIEW view_3_tab4_688

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_688

statement ok
CREATE VIEW view_1_tab4_688 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 54.74

statement ok
CREATE VIEW view_2_tab4_688 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.74)

statement ok
CREATE VIEW view_3_tab4_688 AS SELECT pk FROM view_1_tab4_688

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 54.74
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.74)
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_688
----
2
85
4
44
5
36
8
23

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_688
----
12 values hashing to 5aea589c28d279ca7e733e3327e59b92

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 54.74 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_688 UNION ALL SELECT pk, col0 FROM view_2_tab4_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 54.74 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 54.74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_688 UNION SELECT pk, col0 FROM view_2_tab4_688
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 54.74 ) AS tab4_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_688
----
2
4
5
8

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE col4 >= 54.74
----
2
4
5
8

statement ok
DROP VIEW view_1_tab4_688

statement ok
DROP VIEW view_2_tab4_688

statement ok
DROP VIEW view_3_tab4_688

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_689') DROP VIEW view_1_tab0_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_689') DROP VIEW view_2_tab0_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_689') DROP VIEW view_3_tab0_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_689

statement ok
CREATE VIEW view_1_tab0_689 AS SELECT pk, col0 FROM tab0 WHERE ((col1 IN (62.28,87.70,48.87)))

statement ok
CREATE VIEW view_2_tab0_689 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IN (62.28,87.70,48.87))))

statement ok
CREATE VIEW view_3_tab0_689 AS SELECT pk FROM view_1_tab0_689

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE ((col1 IN (62.28,87.70,48.87)))
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_689
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 IN (62.28,87.70,48.87))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_689 UNION ALL SELECT pk, col0 FROM view_2_tab0_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 IN (62.28,87.70,48.87))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_689 UNION SELECT pk, col0 FROM view_2_tab0_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 IN (62.28,87.70,48.87))) ) AS tab0_689
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_689
----

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE ((col1 IN (62.28,87.70,48.87)))
----

statement ok
DROP VIEW view_1_tab0_689

statement ok
DROP VIEW view_2_tab0_689

statement ok
DROP VIEW view_3_tab0_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_689') DROP VIEW view_1_tab1_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_689') DROP VIEW view_2_tab1_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_689') DROP VIEW view_3_tab1_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_689

statement ok
CREATE VIEW view_1_tab1_689 AS SELECT pk, col0 FROM tab1 WHERE ((col1 IN (62.28,87.70,48.87)))

statement ok
CREATE VIEW view_2_tab1_689 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IN (62.28,87.70,48.87))))

statement ok
CREATE VIEW view_3_tab1_689 AS SELECT pk FROM view_1_tab1_689

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE ((col1 IN (62.28,87.70,48.87)))
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_689
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 IN (62.28,87.70,48.87))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_689 UNION ALL SELECT pk, col0 FROM view_2_tab1_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 IN (62.28,87.70,48.87))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_689 UNION SELECT pk, col0 FROM view_2_tab1_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 IN (62.28,87.70,48.87))) ) AS tab1_689
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_689
----

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE ((col1 IN (62.28,87.70,48.87)))
----

statement ok
DROP VIEW view_1_tab1_689

statement ok
DROP VIEW view_2_tab1_689

statement ok
DROP VIEW view_3_tab1_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_689') DROP VIEW view_1_tab2_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_689') DROP VIEW view_2_tab2_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_689') DROP VIEW view_3_tab2_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_689

statement ok
CREATE VIEW view_1_tab2_689 AS SELECT pk, col0 FROM tab2 WHERE ((col1 IN (62.28,87.70,48.87)))

statement ok
CREATE VIEW view_2_tab2_689 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IN (62.28,87.70,48.87))))

statement ok
CREATE VIEW view_3_tab2_689 AS SELECT pk FROM view_1_tab2_689

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE ((col1 IN (62.28,87.70,48.87)))
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_689
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 IN (62.28,87.70,48.87))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_689 UNION ALL SELECT pk, col0 FROM view_2_tab2_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 IN (62.28,87.70,48.87))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_689 UNION SELECT pk, col0 FROM view_2_tab2_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 IN (62.28,87.70,48.87))) ) AS tab2_689
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_689
----

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE ((col1 IN (62.28,87.70,48.87)))
----

statement ok
DROP VIEW view_1_tab2_689

statement ok
DROP VIEW view_2_tab2_689

statement ok
DROP VIEW view_3_tab2_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_689') DROP VIEW view_1_tab3_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_689') DROP VIEW view_2_tab3_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_689') DROP VIEW view_3_tab3_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_689

statement ok
CREATE VIEW view_1_tab3_689 AS SELECT pk, col0 FROM tab3 WHERE ((col1 IN (62.28,87.70,48.87)))

statement ok
CREATE VIEW view_2_tab3_689 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IN (62.28,87.70,48.87))))

statement ok
CREATE VIEW view_3_tab3_689 AS SELECT pk FROM view_1_tab3_689

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE ((col1 IN (62.28,87.70,48.87)))
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_689
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 IN (62.28,87.70,48.87))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_689 UNION ALL SELECT pk, col0 FROM view_2_tab3_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 IN (62.28,87.70,48.87))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_689 UNION SELECT pk, col0 FROM view_2_tab3_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 IN (62.28,87.70,48.87))) ) AS tab3_689
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_689
----

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE ((col1 IN (62.28,87.70,48.87)))
----

statement ok
DROP VIEW view_1_tab3_689

statement ok
DROP VIEW view_2_tab3_689

statement ok
DROP VIEW view_3_tab3_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_689') DROP VIEW view_1_tab4_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_689') DROP VIEW view_2_tab4_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_689') DROP VIEW view_3_tab4_689

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_689

statement ok
CREATE VIEW view_1_tab4_689 AS SELECT pk, col0 FROM tab4 WHERE ((col1 IN (62.28,87.70,48.87)))

statement ok
CREATE VIEW view_2_tab4_689 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IN (62.28,87.70,48.87))))

statement ok
CREATE VIEW view_3_tab4_689 AS SELECT pk FROM view_1_tab4_689

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE ((col1 IN (62.28,87.70,48.87)))
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_689
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 IN (62.28,87.70,48.87))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_689 UNION ALL SELECT pk, col0 FROM view_2_tab4_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 IN (62.28,87.70,48.87))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 IN (62.28,87.70,48.87))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_689 UNION SELECT pk, col0 FROM view_2_tab4_689
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 IN (62.28,87.70,48.87))) ) AS tab4_689
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_689
----

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE ((col1 IN (62.28,87.70,48.87)))
----

statement ok
DROP VIEW view_1_tab4_689

statement ok
DROP VIEW view_2_tab4_689

statement ok
DROP VIEW view_3_tab4_689

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_690') DROP VIEW view_1_tab0_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_690') DROP VIEW view_2_tab0_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_690') DROP VIEW view_3_tab0_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_690

statement ok
CREATE VIEW view_1_tab0_690 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 46

statement ok
CREATE VIEW view_2_tab0_690 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 46)

statement ok
CREATE VIEW view_3_tab0_690 AS SELECT pk FROM view_1_tab0_690

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 46
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 46)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_690
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_690
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 46 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_690 UNION ALL SELECT pk, col0 FROM view_2_tab0_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 46 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_690 UNION SELECT pk, col0 FROM view_2_tab0_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 46 ) AS tab0_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE col3 >= 46
----
1
2
8
9

statement ok
DROP VIEW view_1_tab0_690

statement ok
DROP VIEW view_2_tab0_690

statement ok
DROP VIEW view_3_tab0_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_690') DROP VIEW view_1_tab1_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_690') DROP VIEW view_2_tab1_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_690') DROP VIEW view_3_tab1_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_690

statement ok
CREATE VIEW view_1_tab1_690 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 46

statement ok
CREATE VIEW view_2_tab1_690 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 46)

statement ok
CREATE VIEW view_3_tab1_690 AS SELECT pk FROM view_1_tab1_690

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 46
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 46)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_690
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_690
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 46 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_690 UNION ALL SELECT pk, col0 FROM view_2_tab1_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 46 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_690 UNION SELECT pk, col0 FROM view_2_tab1_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 46 ) AS tab1_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE col3 >= 46
----
1
2
8
9

statement ok
DROP VIEW view_1_tab1_690

statement ok
DROP VIEW view_2_tab1_690

statement ok
DROP VIEW view_3_tab1_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_690') DROP VIEW view_1_tab2_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_690') DROP VIEW view_2_tab2_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_690') DROP VIEW view_3_tab2_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_690

statement ok
CREATE VIEW view_1_tab2_690 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 46

statement ok
CREATE VIEW view_2_tab2_690 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 46)

statement ok
CREATE VIEW view_3_tab2_690 AS SELECT pk FROM view_1_tab2_690

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 46
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 46)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_690
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_690
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 46 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_690 UNION ALL SELECT pk, col0 FROM view_2_tab2_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 46 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_690 UNION SELECT pk, col0 FROM view_2_tab2_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 46 ) AS tab2_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE col3 >= 46
----
1
2
8
9

statement ok
DROP VIEW view_1_tab2_690

statement ok
DROP VIEW view_2_tab2_690

statement ok
DROP VIEW view_3_tab2_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_690') DROP VIEW view_1_tab3_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_690') DROP VIEW view_2_tab3_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_690') DROP VIEW view_3_tab3_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_690

statement ok
CREATE VIEW view_1_tab3_690 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 46

statement ok
CREATE VIEW view_2_tab3_690 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 46)

statement ok
CREATE VIEW view_3_tab3_690 AS SELECT pk FROM view_1_tab3_690

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 46
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 46)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_690
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_690
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 46 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_690 UNION ALL SELECT pk, col0 FROM view_2_tab3_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 46 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_690 UNION SELECT pk, col0 FROM view_2_tab3_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 46 ) AS tab3_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE col3 >= 46
----
1
2
8
9

statement ok
DROP VIEW view_1_tab3_690

statement ok
DROP VIEW view_2_tab3_690

statement ok
DROP VIEW view_3_tab3_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_690') DROP VIEW view_1_tab4_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_690') DROP VIEW view_2_tab4_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_690') DROP VIEW view_3_tab4_690

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_690

statement ok
CREATE VIEW view_1_tab4_690 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 46

statement ok
CREATE VIEW view_2_tab4_690 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 46)

statement ok
CREATE VIEW view_3_tab4_690 AS SELECT pk FROM view_1_tab4_690

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 46
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 46)
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_690
----
1
2
2
85
8
23
9
32

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_690
----
12 values hashing to 12cd93370aacdeacaf655ce475d2f75a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 46 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_690 UNION ALL SELECT pk, col0 FROM view_2_tab4_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 46 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 46)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_690 UNION SELECT pk, col0 FROM view_2_tab4_690
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 46 ) AS tab4_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_690
----
1
2
8
9

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE col3 >= 46
----
1
2
8
9

statement ok
DROP VIEW view_1_tab4_690

statement ok
DROP VIEW view_2_tab4_690

statement ok
DROP VIEW view_3_tab4_690

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_691') DROP VIEW view_1_tab0_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_691') DROP VIEW view_2_tab0_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_691') DROP VIEW view_3_tab0_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_691

statement ok
CREATE VIEW view_1_tab0_691 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 18 AND col3 < 3

statement ok
CREATE VIEW view_2_tab0_691 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 18 AND col3 < 3)

statement ok
CREATE VIEW view_3_tab0_691 AS SELECT pk FROM view_1_tab0_691

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 18 AND col3 < 3
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_691
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 18 AND col3 < 3 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_691 UNION ALL SELECT pk, col0 FROM view_2_tab0_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 18 AND col3 < 3 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_691 UNION SELECT pk, col0 FROM view_2_tab0_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 18 AND col3 < 3 ) AS tab0_691
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_691
----

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE col0 >= 18 AND col3 < 3
----

statement ok
DROP VIEW view_1_tab0_691

statement ok
DROP VIEW view_2_tab0_691

statement ok
DROP VIEW view_3_tab0_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_691') DROP VIEW view_1_tab1_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_691') DROP VIEW view_2_tab1_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_691') DROP VIEW view_3_tab1_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_691

statement ok
CREATE VIEW view_1_tab1_691 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 18 AND col3 < 3

statement ok
CREATE VIEW view_2_tab1_691 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 18 AND col3 < 3)

statement ok
CREATE VIEW view_3_tab1_691 AS SELECT pk FROM view_1_tab1_691

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 18 AND col3 < 3
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_691
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 18 AND col3 < 3 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_691 UNION ALL SELECT pk, col0 FROM view_2_tab1_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 18 AND col3 < 3 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_691 UNION SELECT pk, col0 FROM view_2_tab1_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 18 AND col3 < 3 ) AS tab1_691
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_691
----

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE col0 >= 18 AND col3 < 3
----

statement ok
DROP VIEW view_1_tab1_691

statement ok
DROP VIEW view_2_tab1_691

statement ok
DROP VIEW view_3_tab1_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_691') DROP VIEW view_1_tab2_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_691') DROP VIEW view_2_tab2_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_691') DROP VIEW view_3_tab2_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_691

statement ok
CREATE VIEW view_1_tab2_691 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 18 AND col3 < 3

statement ok
CREATE VIEW view_2_tab2_691 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 18 AND col3 < 3)

statement ok
CREATE VIEW view_3_tab2_691 AS SELECT pk FROM view_1_tab2_691

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 18 AND col3 < 3
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_691
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 18 AND col3 < 3 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_691 UNION ALL SELECT pk, col0 FROM view_2_tab2_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 18 AND col3 < 3 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_691 UNION SELECT pk, col0 FROM view_2_tab2_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 18 AND col3 < 3 ) AS tab2_691
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_691
----

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE col0 >= 18 AND col3 < 3
----

statement ok
DROP VIEW view_1_tab2_691

statement ok
DROP VIEW view_2_tab2_691

statement ok
DROP VIEW view_3_tab2_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_691') DROP VIEW view_1_tab3_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_691') DROP VIEW view_2_tab3_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_691') DROP VIEW view_3_tab3_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_691

statement ok
CREATE VIEW view_1_tab3_691 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 18 AND col3 < 3

statement ok
CREATE VIEW view_2_tab3_691 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 18 AND col3 < 3)

statement ok
CREATE VIEW view_3_tab3_691 AS SELECT pk FROM view_1_tab3_691

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 18 AND col3 < 3
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_691
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 18 AND col3 < 3 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_691 UNION ALL SELECT pk, col0 FROM view_2_tab3_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 18 AND col3 < 3 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_691 UNION SELECT pk, col0 FROM view_2_tab3_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 18 AND col3 < 3 ) AS tab3_691
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_691
----

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE col0 >= 18 AND col3 < 3
----

statement ok
DROP VIEW view_1_tab3_691

statement ok
DROP VIEW view_2_tab3_691

statement ok
DROP VIEW view_3_tab3_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_691') DROP VIEW view_1_tab4_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_691') DROP VIEW view_2_tab4_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_691') DROP VIEW view_3_tab4_691

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_691

statement ok
CREATE VIEW view_1_tab4_691 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 18 AND col3 < 3

statement ok
CREATE VIEW view_2_tab4_691 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 18 AND col3 < 3)

statement ok
CREATE VIEW view_3_tab4_691 AS SELECT pk FROM view_1_tab4_691

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 18 AND col3 < 3
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_691
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 18 AND col3 < 3 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_691 UNION ALL SELECT pk, col0 FROM view_2_tab4_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 18 AND col3 < 3 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 18 AND col3 < 3)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_691 UNION SELECT pk, col0 FROM view_2_tab4_691
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 18 AND col3 < 3 ) AS tab4_691
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_691
----

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE col0 >= 18 AND col3 < 3
----

statement ok
DROP VIEW view_1_tab4_691

statement ok
DROP VIEW view_2_tab4_691

statement ok
DROP VIEW view_3_tab4_691

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_692') DROP VIEW view_1_tab0_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_692') DROP VIEW view_2_tab0_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_692') DROP VIEW view_3_tab0_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_692

statement ok
CREATE VIEW view_1_tab0_692 AS SELECT pk, col0 FROM tab0 WHERE col1 > 5.53 AND col0 > 60

statement ok
CREATE VIEW view_2_tab0_692 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 5.53 AND col0 > 60)

statement ok
CREATE VIEW view_3_tab0_692 AS SELECT pk FROM view_1_tab0_692

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE col1 > 5.53 AND col0 > 60
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_692
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_692
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 5.53 AND col0 > 60 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_692 UNION ALL SELECT pk, col0 FROM view_2_tab0_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 5.53 AND col0 > 60 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_692 UNION SELECT pk, col0 FROM view_2_tab0_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 5.53 AND col0 > 60 ) AS tab0_692
----
2
3

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_692
----
2
3

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE col1 > 5.53 AND col0 > 60
----
2
3

statement ok
DROP VIEW view_1_tab0_692

statement ok
DROP VIEW view_2_tab0_692

statement ok
DROP VIEW view_3_tab0_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_692') DROP VIEW view_1_tab1_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_692') DROP VIEW view_2_tab1_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_692') DROP VIEW view_3_tab1_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_692

statement ok
CREATE VIEW view_1_tab1_692 AS SELECT pk, col0 FROM tab1 WHERE col1 > 5.53 AND col0 > 60

statement ok
CREATE VIEW view_2_tab1_692 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 5.53 AND col0 > 60)

statement ok
CREATE VIEW view_3_tab1_692 AS SELECT pk FROM view_1_tab1_692

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE col1 > 5.53 AND col0 > 60
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_692
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_692
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 5.53 AND col0 > 60 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_692 UNION ALL SELECT pk, col0 FROM view_2_tab1_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 5.53 AND col0 > 60 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_692 UNION SELECT pk, col0 FROM view_2_tab1_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 5.53 AND col0 > 60 ) AS tab1_692
----
2
3

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_692
----
2
3

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE col1 > 5.53 AND col0 > 60
----
2
3

statement ok
DROP VIEW view_1_tab1_692

statement ok
DROP VIEW view_2_tab1_692

statement ok
DROP VIEW view_3_tab1_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_692') DROP VIEW view_1_tab2_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_692') DROP VIEW view_2_tab2_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_692') DROP VIEW view_3_tab2_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_692

statement ok
CREATE VIEW view_1_tab2_692 AS SELECT pk, col0 FROM tab2 WHERE col1 > 5.53 AND col0 > 60

statement ok
CREATE VIEW view_2_tab2_692 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 5.53 AND col0 > 60)

statement ok
CREATE VIEW view_3_tab2_692 AS SELECT pk FROM view_1_tab2_692

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE col1 > 5.53 AND col0 > 60
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_692
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_692
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 5.53 AND col0 > 60 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_692 UNION ALL SELECT pk, col0 FROM view_2_tab2_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 5.53 AND col0 > 60 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_692 UNION SELECT pk, col0 FROM view_2_tab2_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 5.53 AND col0 > 60 ) AS tab2_692
----
2
3

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_692
----
2
3

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE col1 > 5.53 AND col0 > 60
----
2
3

statement ok
DROP VIEW view_1_tab2_692

statement ok
DROP VIEW view_2_tab2_692

statement ok
DROP VIEW view_3_tab2_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_692') DROP VIEW view_1_tab3_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_692') DROP VIEW view_2_tab3_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_692') DROP VIEW view_3_tab3_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_692

statement ok
CREATE VIEW view_1_tab3_692 AS SELECT pk, col0 FROM tab3 WHERE col1 > 5.53 AND col0 > 60

statement ok
CREATE VIEW view_2_tab3_692 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 5.53 AND col0 > 60)

statement ok
CREATE VIEW view_3_tab3_692 AS SELECT pk FROM view_1_tab3_692

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE col1 > 5.53 AND col0 > 60
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_692
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_692
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 5.53 AND col0 > 60 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_692 UNION ALL SELECT pk, col0 FROM view_2_tab3_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 5.53 AND col0 > 60 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_692 UNION SELECT pk, col0 FROM view_2_tab3_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 5.53 AND col0 > 60 ) AS tab3_692
----
2
3

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_692
----
2
3

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE col1 > 5.53 AND col0 > 60
----
2
3

statement ok
DROP VIEW view_1_tab3_692

statement ok
DROP VIEW view_2_tab3_692

statement ok
DROP VIEW view_3_tab3_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_692') DROP VIEW view_1_tab4_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_692') DROP VIEW view_2_tab4_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_692') DROP VIEW view_3_tab4_692

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_692

statement ok
CREATE VIEW view_1_tab4_692 AS SELECT pk, col0 FROM tab4 WHERE col1 > 5.53 AND col0 > 60

statement ok
CREATE VIEW view_2_tab4_692 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 5.53 AND col0 > 60)

statement ok
CREATE VIEW view_3_tab4_692 AS SELECT pk FROM view_1_tab4_692

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE col1 > 5.53 AND col0 > 60
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_692
----
2
85
3
93

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_692
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 5.53 AND col0 > 60 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_692 UNION ALL SELECT pk, col0 FROM view_2_tab4_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 5.53 AND col0 > 60 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 5.53 AND col0 > 60)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_692 UNION SELECT pk, col0 FROM view_2_tab4_692
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 5.53 AND col0 > 60 ) AS tab4_692
----
2
3

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_692
----
2
3

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE col1 > 5.53 AND col0 > 60
----
2
3

statement ok
DROP VIEW view_1_tab4_692

statement ok
DROP VIEW view_2_tab4_692

statement ok
DROP VIEW view_3_tab4_692

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_693') DROP VIEW view_1_tab0_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_693') DROP VIEW view_2_tab0_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_693') DROP VIEW view_3_tab0_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_693

statement ok
CREATE VIEW view_1_tab0_693 AS SELECT pk, col0 FROM tab0 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab0_693 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab0_693 AS SELECT pk FROM view_1_tab0_693

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_693
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_693
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_693 UNION ALL SELECT pk, col0 FROM view_2_tab0_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_693 UNION SELECT pk, col0 FROM view_2_tab0_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) ) AS tab0_693
----
0
3

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_693
----
0
3

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
3

statement ok
DROP VIEW view_1_tab0_693

statement ok
DROP VIEW view_2_tab0_693

statement ok
DROP VIEW view_3_tab0_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_693') DROP VIEW view_1_tab1_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_693') DROP VIEW view_2_tab1_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_693') DROP VIEW view_3_tab1_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_693

statement ok
CREATE VIEW view_1_tab1_693 AS SELECT pk, col0 FROM tab1 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab1_693 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab1_693 AS SELECT pk FROM view_1_tab1_693

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_693
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_693
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_693 UNION ALL SELECT pk, col0 FROM view_2_tab1_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_693 UNION SELECT pk, col0 FROM view_2_tab1_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) ) AS tab1_693
----
0
3

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_693
----
0
3

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
3

statement ok
DROP VIEW view_1_tab1_693

statement ok
DROP VIEW view_2_tab1_693

statement ok
DROP VIEW view_3_tab1_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_693') DROP VIEW view_1_tab2_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_693') DROP VIEW view_2_tab2_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_693') DROP VIEW view_3_tab2_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_693

statement ok
CREATE VIEW view_1_tab2_693 AS SELECT pk, col0 FROM tab2 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab2_693 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab2_693 AS SELECT pk FROM view_1_tab2_693

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_693
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_693
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_693 UNION ALL SELECT pk, col0 FROM view_2_tab2_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_693 UNION SELECT pk, col0 FROM view_2_tab2_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) ) AS tab2_693
----
0
3

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_693
----
0
3

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
3

statement ok
DROP VIEW view_1_tab2_693

statement ok
DROP VIEW view_2_tab2_693

statement ok
DROP VIEW view_3_tab2_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_693') DROP VIEW view_1_tab3_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_693') DROP VIEW view_2_tab3_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_693') DROP VIEW view_3_tab3_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_693

statement ok
CREATE VIEW view_1_tab3_693 AS SELECT pk, col0 FROM tab3 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab3_693 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab3_693 AS SELECT pk FROM view_1_tab3_693

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_693
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_693
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_693 UNION ALL SELECT pk, col0 FROM view_2_tab3_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_693 UNION SELECT pk, col0 FROM view_2_tab3_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) ) AS tab3_693
----
0
3

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_693
----
0
3

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
3

statement ok
DROP VIEW view_1_tab3_693

statement ok
DROP VIEW view_2_tab3_693

statement ok
DROP VIEW view_3_tab3_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_693') DROP VIEW view_1_tab4_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_693') DROP VIEW view_2_tab4_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_693') DROP VIEW view_3_tab4_693

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_693

statement ok
CREATE VIEW view_1_tab4_693 AS SELECT pk, col0 FROM tab4 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))

statement ok
CREATE VIEW view_2_tab4_693 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))

statement ok
CREATE VIEW view_3_tab4_693 AS SELECT pk FROM view_1_tab4_693

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_693
----
0
48
3
93

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_693
----
16 values hashing to c14cb7e9a640c2b0b71ec8370c1fd9fa

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_693 UNION ALL SELECT pk, col0 FROM view_2_tab4_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_693 UNION SELECT pk, col0 FROM view_2_tab4_693
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL)))) ) AS tab4_693
----
0
3

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_693
----
0
3

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE (((col3 < 17 OR col1 > 64.64 AND (col1 IS NULL) OR (col1 IS NULL))))
----
0
3

statement ok
DROP VIEW view_1_tab4_693

statement ok
DROP VIEW view_2_tab4_693

statement ok
DROP VIEW view_3_tab4_693

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_695') DROP VIEW view_1_tab0_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_695') DROP VIEW view_2_tab0_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_695') DROP VIEW view_3_tab0_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_695

statement ok
CREATE VIEW view_1_tab0_695 AS SELECT pk, col0 FROM tab0 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21

statement ok
CREATE VIEW view_2_tab0_695 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)

statement ok
CREATE VIEW view_3_tab0_695 AS SELECT pk FROM view_1_tab0_695

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
6
16

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_695
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_695
----
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_695 UNION ALL SELECT pk, col0 FROM view_2_tab0_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_695 UNION SELECT pk, col0 FROM view_2_tab0_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 ) AS tab0_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_695

statement ok
DROP VIEW view_2_tab0_695

statement ok
DROP VIEW view_3_tab0_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_695') DROP VIEW view_1_tab1_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_695') DROP VIEW view_2_tab1_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_695') DROP VIEW view_3_tab1_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_695

statement ok
CREATE VIEW view_1_tab1_695 AS SELECT pk, col0 FROM tab1 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21

statement ok
CREATE VIEW view_2_tab1_695 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)

statement ok
CREATE VIEW view_3_tab1_695 AS SELECT pk FROM view_1_tab1_695

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
6
16

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_695
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_695
----
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_695 UNION ALL SELECT pk, col0 FROM view_2_tab1_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_695 UNION SELECT pk, col0 FROM view_2_tab1_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 ) AS tab1_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_695

statement ok
DROP VIEW view_2_tab1_695

statement ok
DROP VIEW view_3_tab1_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_695') DROP VIEW view_1_tab2_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_695') DROP VIEW view_2_tab2_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_695') DROP VIEW view_3_tab2_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_695

statement ok
CREATE VIEW view_1_tab2_695 AS SELECT pk, col0 FROM tab2 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21

statement ok
CREATE VIEW view_2_tab2_695 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)

statement ok
CREATE VIEW view_3_tab2_695 AS SELECT pk FROM view_1_tab2_695

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
6
16

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_695
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_695
----
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_695 UNION ALL SELECT pk, col0 FROM view_2_tab2_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_695 UNION SELECT pk, col0 FROM view_2_tab2_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 ) AS tab2_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_695

statement ok
DROP VIEW view_2_tab2_695

statement ok
DROP VIEW view_3_tab2_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_695') DROP VIEW view_1_tab3_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_695') DROP VIEW view_2_tab3_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_695') DROP VIEW view_3_tab3_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_695

statement ok
CREATE VIEW view_1_tab3_695 AS SELECT pk, col0 FROM tab3 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21

statement ok
CREATE VIEW view_2_tab3_695 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)

statement ok
CREATE VIEW view_3_tab3_695 AS SELECT pk FROM view_1_tab3_695

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
6
16

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_695
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_695
----
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_695 UNION ALL SELECT pk, col0 FROM view_2_tab3_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_695 UNION SELECT pk, col0 FROM view_2_tab3_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 ) AS tab3_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_695

statement ok
DROP VIEW view_2_tab3_695

statement ok
DROP VIEW view_3_tab3_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_695') DROP VIEW view_1_tab4_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_695') DROP VIEW view_2_tab4_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_695') DROP VIEW view_3_tab4_695

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_695

statement ok
CREATE VIEW view_1_tab4_695 AS SELECT pk, col0 FROM tab4 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21

statement ok
CREATE VIEW view_2_tab4_695 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)

statement ok
CREATE VIEW view_3_tab4_695 AS SELECT pk FROM view_1_tab4_695

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
6
16

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_695
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_695
----
6
16

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_695 UNION ALL SELECT pk, col0 FROM view_2_tab4_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 97.33)) OR col0 >= 41 OR col3 < 21)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_695 UNION SELECT pk, col0 FROM view_2_tab4_695
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21 ) AS tab4_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_695
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE ((col1 < 97.33)) OR col0 >= 41 OR col3 < 21
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_695

statement ok
DROP VIEW view_2_tab4_695

statement ok
DROP VIEW view_3_tab4_695

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_696') DROP VIEW view_1_tab0_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_696') DROP VIEW view_2_tab0_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_696') DROP VIEW view_3_tab0_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_696

statement ok
CREATE VIEW view_1_tab0_696 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 68

statement ok
CREATE VIEW view_2_tab0_696 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 68)

statement ok
CREATE VIEW view_3_tab0_696 AS SELECT pk FROM view_1_tab0_696

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 68
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 68)
----
2
85
3
93

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_696
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_696
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 68 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_696 UNION ALL SELECT pk, col0 FROM view_2_tab0_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 68 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_696 UNION SELECT pk, col0 FROM view_2_tab0_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 68 ) AS tab0_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE col0 <= 68
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_696

statement ok
DROP VIEW view_2_tab0_696

statement ok
DROP VIEW view_3_tab0_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_696') DROP VIEW view_1_tab1_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_696') DROP VIEW view_2_tab1_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_696') DROP VIEW view_3_tab1_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_696

statement ok
CREATE VIEW view_1_tab1_696 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 68

statement ok
CREATE VIEW view_2_tab1_696 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 68)

statement ok
CREATE VIEW view_3_tab1_696 AS SELECT pk FROM view_1_tab1_696

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 68
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 68)
----
2
85
3
93

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_696
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_696
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 68 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_696 UNION ALL SELECT pk, col0 FROM view_2_tab1_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 68 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_696 UNION SELECT pk, col0 FROM view_2_tab1_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 68 ) AS tab1_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE col0 <= 68
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_696

statement ok
DROP VIEW view_2_tab1_696

statement ok
DROP VIEW view_3_tab1_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_696') DROP VIEW view_1_tab2_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_696') DROP VIEW view_2_tab2_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_696') DROP VIEW view_3_tab2_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_696

statement ok
CREATE VIEW view_1_tab2_696 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 68

statement ok
CREATE VIEW view_2_tab2_696 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 68)

statement ok
CREATE VIEW view_3_tab2_696 AS SELECT pk FROM view_1_tab2_696

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 68
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 68)
----
2
85
3
93

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_696
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_696
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 68 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_696 UNION ALL SELECT pk, col0 FROM view_2_tab2_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 68 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_696 UNION SELECT pk, col0 FROM view_2_tab2_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 68 ) AS tab2_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE col0 <= 68
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_696

statement ok
DROP VIEW view_2_tab2_696

statement ok
DROP VIEW view_3_tab2_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_696') DROP VIEW view_1_tab3_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_696') DROP VIEW view_2_tab3_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_696') DROP VIEW view_3_tab3_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_696

statement ok
CREATE VIEW view_1_tab3_696 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 68

statement ok
CREATE VIEW view_2_tab3_696 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 68)

statement ok
CREATE VIEW view_3_tab3_696 AS SELECT pk FROM view_1_tab3_696

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 68
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 68)
----
2
85
3
93

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_696
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_696
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 68 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_696 UNION ALL SELECT pk, col0 FROM view_2_tab3_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 68 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_696 UNION SELECT pk, col0 FROM view_2_tab3_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 68 ) AS tab3_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE col0 <= 68
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_696

statement ok
DROP VIEW view_2_tab3_696

statement ok
DROP VIEW view_3_tab3_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_696') DROP VIEW view_1_tab4_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_696') DROP VIEW view_2_tab4_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_696') DROP VIEW view_3_tab4_696

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_696

statement ok
CREATE VIEW view_1_tab4_696 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 68

statement ok
CREATE VIEW view_2_tab4_696 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 68)

statement ok
CREATE VIEW view_3_tab4_696 AS SELECT pk FROM view_1_tab4_696

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 68
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 68)
----
2
85
3
93

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_696
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_696
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 68 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_696 UNION ALL SELECT pk, col0 FROM view_2_tab4_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 68 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 68)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_696 UNION SELECT pk, col0 FROM view_2_tab4_696
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 68 ) AS tab4_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_696
----
0
1
4
5
6
7
8
9

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE col0 <= 68
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_696

statement ok
DROP VIEW view_2_tab4_696

statement ok
DROP VIEW view_3_tab4_696

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_697') DROP VIEW view_1_tab0_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_697') DROP VIEW view_2_tab0_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_697') DROP VIEW view_3_tab0_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_697

statement ok
CREATE VIEW view_1_tab0_697 AS SELECT pk, col0 FROM tab0 WHERE col1 = 61.96

statement ok
CREATE VIEW view_2_tab0_697 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 61.96)

statement ok
CREATE VIEW view_3_tab0_697 AS SELECT pk FROM view_1_tab0_697

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col1 = 61.96
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_697
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 61.96 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_697 UNION ALL SELECT pk, col0 FROM view_2_tab0_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 61.96 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_697 UNION SELECT pk, col0 FROM view_2_tab0_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 = 61.96 ) AS tab0_697
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_697
----

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col1 = 61.96
----

statement ok
DROP VIEW view_1_tab0_697

statement ok
DROP VIEW view_2_tab0_697

statement ok
DROP VIEW view_3_tab0_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_697') DROP VIEW view_1_tab1_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_697') DROP VIEW view_2_tab1_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_697') DROP VIEW view_3_tab1_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_697

statement ok
CREATE VIEW view_1_tab1_697 AS SELECT pk, col0 FROM tab1 WHERE col1 = 61.96

statement ok
CREATE VIEW view_2_tab1_697 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 61.96)

statement ok
CREATE VIEW view_3_tab1_697 AS SELECT pk FROM view_1_tab1_697

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col1 = 61.96
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_697
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 61.96 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_697 UNION ALL SELECT pk, col0 FROM view_2_tab1_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 61.96 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_697 UNION SELECT pk, col0 FROM view_2_tab1_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 = 61.96 ) AS tab1_697
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_697
----

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col1 = 61.96
----

statement ok
DROP VIEW view_1_tab1_697

statement ok
DROP VIEW view_2_tab1_697

statement ok
DROP VIEW view_3_tab1_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_697') DROP VIEW view_1_tab2_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_697') DROP VIEW view_2_tab2_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_697') DROP VIEW view_3_tab2_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_697

statement ok
CREATE VIEW view_1_tab2_697 AS SELECT pk, col0 FROM tab2 WHERE col1 = 61.96

statement ok
CREATE VIEW view_2_tab2_697 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 61.96)

statement ok
CREATE VIEW view_3_tab2_697 AS SELECT pk FROM view_1_tab2_697

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col1 = 61.96
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_697
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 61.96 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_697 UNION ALL SELECT pk, col0 FROM view_2_tab2_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 61.96 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_697 UNION SELECT pk, col0 FROM view_2_tab2_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 = 61.96 ) AS tab2_697
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_697
----

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col1 = 61.96
----

statement ok
DROP VIEW view_1_tab2_697

statement ok
DROP VIEW view_2_tab2_697

statement ok
DROP VIEW view_3_tab2_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_697') DROP VIEW view_1_tab3_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_697') DROP VIEW view_2_tab3_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_697') DROP VIEW view_3_tab3_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_697

statement ok
CREATE VIEW view_1_tab3_697 AS SELECT pk, col0 FROM tab3 WHERE col1 = 61.96

statement ok
CREATE VIEW view_2_tab3_697 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 61.96)

statement ok
CREATE VIEW view_3_tab3_697 AS SELECT pk FROM view_1_tab3_697

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col1 = 61.96
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_697
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 61.96 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_697 UNION ALL SELECT pk, col0 FROM view_2_tab3_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 61.96 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_697 UNION SELECT pk, col0 FROM view_2_tab3_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 = 61.96 ) AS tab3_697
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_697
----

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col1 = 61.96
----

statement ok
DROP VIEW view_1_tab3_697

statement ok
DROP VIEW view_2_tab3_697

statement ok
DROP VIEW view_3_tab3_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_697') DROP VIEW view_1_tab4_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_697') DROP VIEW view_2_tab4_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_697') DROP VIEW view_3_tab4_697

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_697

statement ok
CREATE VIEW view_1_tab4_697 AS SELECT pk, col0 FROM tab4 WHERE col1 = 61.96

statement ok
CREATE VIEW view_2_tab4_697 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 61.96)

statement ok
CREATE VIEW view_3_tab4_697 AS SELECT pk FROM view_1_tab4_697

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col1 = 61.96
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_697
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 61.96 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_697 UNION ALL SELECT pk, col0 FROM view_2_tab4_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 61.96 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 61.96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_697 UNION SELECT pk, col0 FROM view_2_tab4_697
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 = 61.96 ) AS tab4_697
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_697
----

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col1 = 61.96
----

statement ok
DROP VIEW view_1_tab4_697

statement ok
DROP VIEW view_2_tab4_697

statement ok
DROP VIEW view_3_tab4_697

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_698') DROP VIEW view_1_tab0_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_698') DROP VIEW view_2_tab0_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_698') DROP VIEW view_3_tab0_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_698

statement ok
CREATE VIEW view_1_tab0_698 AS SELECT pk, col0 FROM tab0 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9

statement ok
CREATE VIEW view_2_tab0_698 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)

statement ok
CREATE VIEW view_3_tab0_698 AS SELECT pk FROM view_1_tab0_698

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_698
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_698 UNION ALL SELECT pk, col0 FROM view_2_tab0_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_698 UNION SELECT pk, col0 FROM view_2_tab0_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 ) AS tab0_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_698

statement ok
DROP VIEW view_2_tab0_698

statement ok
DROP VIEW view_3_tab0_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_698') DROP VIEW view_1_tab1_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_698') DROP VIEW view_2_tab1_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_698') DROP VIEW view_3_tab1_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_698

statement ok
CREATE VIEW view_1_tab1_698 AS SELECT pk, col0 FROM tab1 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9

statement ok
CREATE VIEW view_2_tab1_698 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)

statement ok
CREATE VIEW view_3_tab1_698 AS SELECT pk FROM view_1_tab1_698

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_698
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_698 UNION ALL SELECT pk, col0 FROM view_2_tab1_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_698 UNION SELECT pk, col0 FROM view_2_tab1_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 ) AS tab1_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_698

statement ok
DROP VIEW view_2_tab1_698

statement ok
DROP VIEW view_3_tab1_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_698') DROP VIEW view_1_tab2_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_698') DROP VIEW view_2_tab2_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_698') DROP VIEW view_3_tab2_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_698

statement ok
CREATE VIEW view_1_tab2_698 AS SELECT pk, col0 FROM tab2 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9

statement ok
CREATE VIEW view_2_tab2_698 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)

statement ok
CREATE VIEW view_3_tab2_698 AS SELECT pk FROM view_1_tab2_698

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_698
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_698 UNION ALL SELECT pk, col0 FROM view_2_tab2_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_698 UNION SELECT pk, col0 FROM view_2_tab2_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 ) AS tab2_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_698

statement ok
DROP VIEW view_2_tab2_698

statement ok
DROP VIEW view_3_tab2_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_698') DROP VIEW view_1_tab3_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_698') DROP VIEW view_2_tab3_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_698') DROP VIEW view_3_tab3_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_698

statement ok
CREATE VIEW view_1_tab3_698 AS SELECT pk, col0 FROM tab3 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9

statement ok
CREATE VIEW view_2_tab3_698 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)

statement ok
CREATE VIEW view_3_tab3_698 AS SELECT pk FROM view_1_tab3_698

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_698
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_698 UNION ALL SELECT pk, col0 FROM view_2_tab3_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_698 UNION SELECT pk, col0 FROM view_2_tab3_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 ) AS tab3_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_698

statement ok
DROP VIEW view_2_tab3_698

statement ok
DROP VIEW view_3_tab3_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_698') DROP VIEW view_1_tab4_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_698') DROP VIEW view_2_tab4_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_698') DROP VIEW view_3_tab4_698

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_698

statement ok
CREATE VIEW view_1_tab4_698 AS SELECT pk, col0 FROM tab4 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9

statement ok
CREATE VIEW view_2_tab4_698 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)

statement ok
CREATE VIEW view_3_tab4_698 AS SELECT pk FROM view_1_tab4_698

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_698
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_698 UNION ALL SELECT pk, col0 FROM view_2_tab4_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_698 UNION SELECT pk, col0 FROM view_2_tab4_698
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9 ) AS tab4_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_698
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE ((col1 <= 14.36 OR col4 < 55.29) OR col3 <= 66 OR col3 >= 77 AND (col0 > 42) OR ((col3 > 54))) OR col0 = 9
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_698

statement ok
DROP VIEW view_2_tab4_698

statement ok
DROP VIEW view_3_tab4_698

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_699') DROP VIEW view_1_tab0_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_699') DROP VIEW view_2_tab0_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_699') DROP VIEW view_3_tab0_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_699

statement ok
CREATE VIEW view_1_tab0_699 AS SELECT pk, col0 FROM tab0 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab0_699 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_699 AS SELECT pk FROM view_1_tab0_699

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_699
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_699
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_699 UNION ALL SELECT pk, col0 FROM view_2_tab0_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_699 UNION SELECT pk, col0 FROM view_2_tab0_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) ) AS tab0_699
----
2
3

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_699
----
2
3

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
3

statement ok
DROP VIEW view_1_tab0_699

statement ok
DROP VIEW view_2_tab0_699

statement ok
DROP VIEW view_3_tab0_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_699') DROP VIEW view_1_tab1_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_699') DROP VIEW view_2_tab1_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_699') DROP VIEW view_3_tab1_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_699

statement ok
CREATE VIEW view_1_tab1_699 AS SELECT pk, col0 FROM tab1 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab1_699 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_699 AS SELECT pk FROM view_1_tab1_699

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_699
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_699
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_699 UNION ALL SELECT pk, col0 FROM view_2_tab1_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_699 UNION SELECT pk, col0 FROM view_2_tab1_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) ) AS tab1_699
----
2
3

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_699
----
2
3

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
3

statement ok
DROP VIEW view_1_tab1_699

statement ok
DROP VIEW view_2_tab1_699

statement ok
DROP VIEW view_3_tab1_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_699') DROP VIEW view_1_tab2_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_699') DROP VIEW view_2_tab2_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_699') DROP VIEW view_3_tab2_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_699

statement ok
CREATE VIEW view_1_tab2_699 AS SELECT pk, col0 FROM tab2 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab2_699 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_699 AS SELECT pk FROM view_1_tab2_699

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_699
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_699
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_699 UNION ALL SELECT pk, col0 FROM view_2_tab2_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_699 UNION SELECT pk, col0 FROM view_2_tab2_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) ) AS tab2_699
----
2
3

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_699
----
2
3

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
3

statement ok
DROP VIEW view_1_tab2_699

statement ok
DROP VIEW view_2_tab2_699

statement ok
DROP VIEW view_3_tab2_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_699') DROP VIEW view_1_tab3_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_699') DROP VIEW view_2_tab3_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_699') DROP VIEW view_3_tab3_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_699

statement ok
CREATE VIEW view_1_tab3_699 AS SELECT pk, col0 FROM tab3 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab3_699 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_699 AS SELECT pk FROM view_1_tab3_699

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_699
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_699
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_699 UNION ALL SELECT pk, col0 FROM view_2_tab3_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_699 UNION SELECT pk, col0 FROM view_2_tab3_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) ) AS tab3_699
----
2
3

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_699
----
2
3

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
3

statement ok
DROP VIEW view_1_tab3_699

statement ok
DROP VIEW view_2_tab3_699

statement ok
DROP VIEW view_3_tab3_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_699') DROP VIEW view_1_tab4_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_699') DROP VIEW view_2_tab4_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_699') DROP VIEW view_3_tab4_699

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_699

statement ok
CREATE VIEW view_1_tab4_699 AS SELECT pk, col0 FROM tab4 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab4_699 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_699 AS SELECT pk FROM view_1_tab4_699

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_699
----
2
85
3
93

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_699
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_699 UNION ALL SELECT pk, col0 FROM view_2_tab4_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_699 UNION SELECT pk, col0 FROM view_2_tab4_699
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL)) ) AS tab4_699
----
2
3

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_699
----
2
3

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE col0 > 48 AND ((col3 IN (36,51,8) OR (col4 < 14.74 OR col0 < 71)) AND (col3 IN (33,33,60,24)) AND col3 >= 15 OR col0 >= 47 OR (((col3 = 90) AND (col3 >= 0)) OR col3 >= 34 OR col3 <= 33 AND col3 < 5 OR ((col0 >= 65 AND ((col3 BETWEEN 73 AND 18 AND ((col0 = 1) OR col0 < 2) OR col3 > 22 OR (((col3 <= 97) OR col3 > 57) OR col0 IS NULL AND col0 < 99) OR col0 BETWEEN 88 AND 3)) OR col1 <= 19.75)) AND ((((col3 >= 12 AND ((col3 >= 59 AND col4 < 47.75)) AND col1 IS NULL AND col3 > 17) OR col0 > 39 AND col4 > 62.28 AND col0 <= 15) AND col4 IS NULL)))) OR ((col0 IS NULL))
----
2
3

statement ok
DROP VIEW view_1_tab4_699

statement ok
DROP VIEW view_2_tab4_699

statement ok
DROP VIEW view_3_tab4_699

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_700') DROP VIEW view_1_tab0_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_700') DROP VIEW view_2_tab0_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_700') DROP VIEW view_3_tab0_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_700

statement ok
CREATE VIEW view_1_tab0_700 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))

statement ok
CREATE VIEW view_2_tab0_700 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_700 AS SELECT pk FROM view_1_tab0_700

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_700
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_700 UNION ALL SELECT pk, col0 FROM view_2_tab0_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_700 UNION SELECT pk, col0 FROM view_2_tab0_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) ) AS tab0_700
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_700
----

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab0_700

statement ok
DROP VIEW view_2_tab0_700

statement ok
DROP VIEW view_3_tab0_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_700') DROP VIEW view_1_tab1_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_700') DROP VIEW view_2_tab1_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_700') DROP VIEW view_3_tab1_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_700

statement ok
CREATE VIEW view_1_tab1_700 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))

statement ok
CREATE VIEW view_2_tab1_700 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_700 AS SELECT pk FROM view_1_tab1_700

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_700
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_700 UNION ALL SELECT pk, col0 FROM view_2_tab1_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_700 UNION SELECT pk, col0 FROM view_2_tab1_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) ) AS tab1_700
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_700
----

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab1_700

statement ok
DROP VIEW view_2_tab1_700

statement ok
DROP VIEW view_3_tab1_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_700') DROP VIEW view_1_tab2_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_700') DROP VIEW view_2_tab2_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_700') DROP VIEW view_3_tab2_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_700

statement ok
CREATE VIEW view_1_tab2_700 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))

statement ok
CREATE VIEW view_2_tab2_700 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_700 AS SELECT pk FROM view_1_tab2_700

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_700
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_700 UNION ALL SELECT pk, col0 FROM view_2_tab2_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_700 UNION SELECT pk, col0 FROM view_2_tab2_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) ) AS tab2_700
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_700
----

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab2_700

statement ok
DROP VIEW view_2_tab2_700

statement ok
DROP VIEW view_3_tab2_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_700') DROP VIEW view_1_tab3_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_700') DROP VIEW view_2_tab3_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_700') DROP VIEW view_3_tab3_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_700

statement ok
CREATE VIEW view_1_tab3_700 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))

statement ok
CREATE VIEW view_2_tab3_700 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_700 AS SELECT pk FROM view_1_tab3_700

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_700
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_700 UNION ALL SELECT pk, col0 FROM view_2_tab3_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_700 UNION SELECT pk, col0 FROM view_2_tab3_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) ) AS tab3_700
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_700
----

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab3_700

statement ok
DROP VIEW view_2_tab3_700

statement ok
DROP VIEW view_3_tab3_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_700') DROP VIEW view_1_tab4_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_700') DROP VIEW view_2_tab4_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_700') DROP VIEW view_3_tab4_700

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_700

statement ok
CREATE VIEW view_1_tab4_700 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))

statement ok
CREATE VIEW view_2_tab4_700 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_700 AS SELECT pk FROM view_1_tab4_700

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_700
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_700 UNION ALL SELECT pk, col0 FROM view_2_tab4_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_700 UNION SELECT pk, col0 FROM view_2_tab4_700
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL)) ) AS tab4_700
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_700
----

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE (col0 >= 18 AND (col1 > 39.63 AND col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab4_700

statement ok
DROP VIEW view_2_tab4_700

statement ok
DROP VIEW view_3_tab4_700

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_701') DROP VIEW view_1_tab0_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_701') DROP VIEW view_2_tab0_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_701') DROP VIEW view_3_tab0_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_701

statement ok
CREATE VIEW view_1_tab0_701 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 77

statement ok
CREATE VIEW view_2_tab0_701 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 77)

statement ok
CREATE VIEW view_3_tab0_701 AS SELECT pk FROM view_1_tab0_701

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 77
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 77)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_701
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_701
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 77 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_701 UNION ALL SELECT pk, col0 FROM view_2_tab0_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 77 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_701 UNION SELECT pk, col0 FROM view_2_tab0_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 77 ) AS tab0_701
----
2
3

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_701
----
2
3

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE col0 >= 77
----
2
3

statement ok
DROP VIEW view_1_tab0_701

statement ok
DROP VIEW view_2_tab0_701

statement ok
DROP VIEW view_3_tab0_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_701') DROP VIEW view_1_tab1_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_701') DROP VIEW view_2_tab1_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_701') DROP VIEW view_3_tab1_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_701

statement ok
CREATE VIEW view_1_tab1_701 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 77

statement ok
CREATE VIEW view_2_tab1_701 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 77)

statement ok
CREATE VIEW view_3_tab1_701 AS SELECT pk FROM view_1_tab1_701

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 77
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 77)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_701
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_701
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 77 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_701 UNION ALL SELECT pk, col0 FROM view_2_tab1_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 77 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_701 UNION SELECT pk, col0 FROM view_2_tab1_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 77 ) AS tab1_701
----
2
3

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_701
----
2
3

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE col0 >= 77
----
2
3

statement ok
DROP VIEW view_1_tab1_701

statement ok
DROP VIEW view_2_tab1_701

statement ok
DROP VIEW view_3_tab1_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_701') DROP VIEW view_1_tab2_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_701') DROP VIEW view_2_tab2_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_701') DROP VIEW view_3_tab2_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_701

statement ok
CREATE VIEW view_1_tab2_701 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 77

statement ok
CREATE VIEW view_2_tab2_701 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 77)

statement ok
CREATE VIEW view_3_tab2_701 AS SELECT pk FROM view_1_tab2_701

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 77
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 77)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_701
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_701
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 77 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_701 UNION ALL SELECT pk, col0 FROM view_2_tab2_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 77 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_701 UNION SELECT pk, col0 FROM view_2_tab2_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 77 ) AS tab2_701
----
2
3

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_701
----
2
3

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE col0 >= 77
----
2
3

statement ok
DROP VIEW view_1_tab2_701

statement ok
DROP VIEW view_2_tab2_701

statement ok
DROP VIEW view_3_tab2_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_701') DROP VIEW view_1_tab3_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_701') DROP VIEW view_2_tab3_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_701') DROP VIEW view_3_tab3_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_701

statement ok
CREATE VIEW view_1_tab3_701 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 77

statement ok
CREATE VIEW view_2_tab3_701 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 77)

statement ok
CREATE VIEW view_3_tab3_701 AS SELECT pk FROM view_1_tab3_701

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 77
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 77)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_701
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_701
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 77 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_701 UNION ALL SELECT pk, col0 FROM view_2_tab3_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 77 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_701 UNION SELECT pk, col0 FROM view_2_tab3_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 77 ) AS tab3_701
----
2
3

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_701
----
2
3

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE col0 >= 77
----
2
3

statement ok
DROP VIEW view_1_tab3_701

statement ok
DROP VIEW view_2_tab3_701

statement ok
DROP VIEW view_3_tab3_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_701') DROP VIEW view_1_tab4_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_701') DROP VIEW view_2_tab4_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_701') DROP VIEW view_3_tab4_701

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_701

statement ok
CREATE VIEW view_1_tab4_701 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 77

statement ok
CREATE VIEW view_2_tab4_701 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 77)

statement ok
CREATE VIEW view_3_tab4_701 AS SELECT pk FROM view_1_tab4_701

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 77
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 77)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_701
----
2
85
3
93

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_701
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 77 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_701 UNION ALL SELECT pk, col0 FROM view_2_tab4_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 77 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_701 UNION SELECT pk, col0 FROM view_2_tab4_701
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 77 ) AS tab4_701
----
2
3

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_701
----
2
3

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE col0 >= 77
----
2
3

statement ok
DROP VIEW view_1_tab4_701

statement ok
DROP VIEW view_2_tab4_701

statement ok
DROP VIEW view_3_tab4_701

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_702') DROP VIEW view_1_tab0_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_702') DROP VIEW view_2_tab0_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_702') DROP VIEW view_3_tab0_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_702

statement ok
CREATE VIEW view_1_tab0_702 AS SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37

statement ok
CREATE VIEW view_2_tab0_702 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)

statement ok
CREATE VIEW view_3_tab0_702 AS SELECT pk FROM view_1_tab0_702

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_702
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_702
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_702 UNION ALL SELECT pk, col0 FROM view_2_tab0_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_702 UNION SELECT pk, col0 FROM view_2_tab0_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 ) AS tab0_702
----
0
3
7

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_702
----
0
3
7

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
3
7

statement ok
DROP VIEW view_1_tab0_702

statement ok
DROP VIEW view_2_tab0_702

statement ok
DROP VIEW view_3_tab0_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_702') DROP VIEW view_1_tab1_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_702') DROP VIEW view_2_tab1_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_702') DROP VIEW view_3_tab1_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_702

statement ok
CREATE VIEW view_1_tab1_702 AS SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37

statement ok
CREATE VIEW view_2_tab1_702 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)

statement ok
CREATE VIEW view_3_tab1_702 AS SELECT pk FROM view_1_tab1_702

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_702
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_702
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_702 UNION ALL SELECT pk, col0 FROM view_2_tab1_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_702 UNION SELECT pk, col0 FROM view_2_tab1_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 ) AS tab1_702
----
0
3
7

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_702
----
0
3
7

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
3
7

statement ok
DROP VIEW view_1_tab1_702

statement ok
DROP VIEW view_2_tab1_702

statement ok
DROP VIEW view_3_tab1_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_702') DROP VIEW view_1_tab2_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_702') DROP VIEW view_2_tab2_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_702') DROP VIEW view_3_tab2_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_702

statement ok
CREATE VIEW view_1_tab2_702 AS SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37

statement ok
CREATE VIEW view_2_tab2_702 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)

statement ok
CREATE VIEW view_3_tab2_702 AS SELECT pk FROM view_1_tab2_702

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_702
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_702
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_702 UNION ALL SELECT pk, col0 FROM view_2_tab2_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_702 UNION SELECT pk, col0 FROM view_2_tab2_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 ) AS tab2_702
----
0
3
7

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_702
----
0
3
7

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
3
7

statement ok
DROP VIEW view_1_tab2_702

statement ok
DROP VIEW view_2_tab2_702

statement ok
DROP VIEW view_3_tab2_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_702') DROP VIEW view_1_tab3_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_702') DROP VIEW view_2_tab3_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_702') DROP VIEW view_3_tab3_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_702

statement ok
CREATE VIEW view_1_tab3_702 AS SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37

statement ok
CREATE VIEW view_2_tab3_702 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)

statement ok
CREATE VIEW view_3_tab3_702 AS SELECT pk FROM view_1_tab3_702

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_702
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_702
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_702 UNION ALL SELECT pk, col0 FROM view_2_tab3_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_702 UNION SELECT pk, col0 FROM view_2_tab3_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 ) AS tab3_702
----
0
3
7

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_702
----
0
3
7

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
3
7

statement ok
DROP VIEW view_1_tab3_702

statement ok
DROP VIEW view_2_tab3_702

statement ok
DROP VIEW view_3_tab3_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_702') DROP VIEW view_1_tab4_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_702') DROP VIEW view_2_tab4_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_702') DROP VIEW view_3_tab4_702

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_702

statement ok
CREATE VIEW view_1_tab4_702 AS SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37

statement ok
CREATE VIEW view_2_tab4_702 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)

statement ok
CREATE VIEW view_3_tab4_702 AS SELECT pk FROM view_1_tab4_702

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_702
----
0
48
3
93
7
37

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_702
----
14 values hashing to 3ff78587279a2420d7a3aa3643d2b443

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_702 UNION ALL SELECT pk, col0 FROM view_2_tab4_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 72 AND 27 OR col3 <= 37)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_702 UNION SELECT pk, col0 FROM view_2_tab4_702
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37 ) AS tab4_702
----
0
3
7

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_702
----
0
3
7

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE col3 BETWEEN 72 AND 27 OR col3 <= 37
----
0
3
7

statement ok
DROP VIEW view_1_tab4_702

statement ok
DROP VIEW view_2_tab4_702

statement ok
DROP VIEW view_3_tab4_702

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_703') DROP VIEW view_1_tab0_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_703') DROP VIEW view_2_tab0_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_703') DROP VIEW view_3_tab0_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_703

statement ok
CREATE VIEW view_1_tab0_703 AS SELECT pk, col0 FROM tab0 WHERE col1 >= 92.4

statement ok
CREATE VIEW view_2_tab0_703 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 92.4)

statement ok
CREATE VIEW view_3_tab0_703 AS SELECT pk FROM view_1_tab0_703

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE col1 >= 92.4
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 92.4)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_703
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_703
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 92.4 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_703 UNION ALL SELECT pk, col0 FROM view_2_tab0_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 92.4 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_703 UNION SELECT pk, col0 FROM view_2_tab0_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 >= 92.4 ) AS tab0_703
----
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_703
----
6

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE col1 >= 92.4
----
6

statement ok
DROP VIEW view_1_tab0_703

statement ok
DROP VIEW view_2_tab0_703

statement ok
DROP VIEW view_3_tab0_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_703') DROP VIEW view_1_tab1_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_703') DROP VIEW view_2_tab1_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_703') DROP VIEW view_3_tab1_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_703

statement ok
CREATE VIEW view_1_tab1_703 AS SELECT pk, col0 FROM tab1 WHERE col1 >= 92.4

statement ok
CREATE VIEW view_2_tab1_703 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 92.4)

statement ok
CREATE VIEW view_3_tab1_703 AS SELECT pk FROM view_1_tab1_703

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE col1 >= 92.4
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 92.4)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_703
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_703
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 92.4 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_703 UNION ALL SELECT pk, col0 FROM view_2_tab1_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 92.4 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_703 UNION SELECT pk, col0 FROM view_2_tab1_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 >= 92.4 ) AS tab1_703
----
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_703
----
6

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE col1 >= 92.4
----
6

statement ok
DROP VIEW view_1_tab1_703

statement ok
DROP VIEW view_2_tab1_703

statement ok
DROP VIEW view_3_tab1_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_703') DROP VIEW view_1_tab2_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_703') DROP VIEW view_2_tab2_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_703') DROP VIEW view_3_tab2_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_703

statement ok
CREATE VIEW view_1_tab2_703 AS SELECT pk, col0 FROM tab2 WHERE col1 >= 92.4

statement ok
CREATE VIEW view_2_tab2_703 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 92.4)

statement ok
CREATE VIEW view_3_tab2_703 AS SELECT pk FROM view_1_tab2_703

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE col1 >= 92.4
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 92.4)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_703
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_703
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 92.4 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_703 UNION ALL SELECT pk, col0 FROM view_2_tab2_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 92.4 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_703 UNION SELECT pk, col0 FROM view_2_tab2_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 >= 92.4 ) AS tab2_703
----
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_703
----
6

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE col1 >= 92.4
----
6

statement ok
DROP VIEW view_1_tab2_703

statement ok
DROP VIEW view_2_tab2_703

statement ok
DROP VIEW view_3_tab2_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_703') DROP VIEW view_1_tab3_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_703') DROP VIEW view_2_tab3_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_703') DROP VIEW view_3_tab3_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_703

statement ok
CREATE VIEW view_1_tab3_703 AS SELECT pk, col0 FROM tab3 WHERE col1 >= 92.4

statement ok
CREATE VIEW view_2_tab3_703 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 92.4)

statement ok
CREATE VIEW view_3_tab3_703 AS SELECT pk FROM view_1_tab3_703

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE col1 >= 92.4
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 92.4)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_703
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_703
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 92.4 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_703 UNION ALL SELECT pk, col0 FROM view_2_tab3_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 92.4 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_703 UNION SELECT pk, col0 FROM view_2_tab3_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 >= 92.4 ) AS tab3_703
----
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_703
----
6

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE col1 >= 92.4
----
6

statement ok
DROP VIEW view_1_tab3_703

statement ok
DROP VIEW view_2_tab3_703

statement ok
DROP VIEW view_3_tab3_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_703') DROP VIEW view_1_tab4_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_703') DROP VIEW view_2_tab4_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_703') DROP VIEW view_3_tab4_703

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_703

statement ok
CREATE VIEW view_1_tab4_703 AS SELECT pk, col0 FROM tab4 WHERE col1 >= 92.4

statement ok
CREATE VIEW view_2_tab4_703 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 92.4)

statement ok
CREATE VIEW view_3_tab4_703 AS SELECT pk FROM view_1_tab4_703

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE col1 >= 92.4
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 92.4)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_703
----
6
16

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_703
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 92.4 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_703 UNION ALL SELECT pk, col0 FROM view_2_tab4_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 92.4 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 92.4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_703 UNION SELECT pk, col0 FROM view_2_tab4_703
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 >= 92.4 ) AS tab4_703
----
6

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_703
----
6

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE col1 >= 92.4
----
6

statement ok
DROP VIEW view_1_tab4_703

statement ok
DROP VIEW view_2_tab4_703

statement ok
DROP VIEW view_3_tab4_703

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_704') DROP VIEW view_1_tab0_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_704') DROP VIEW view_2_tab0_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_704') DROP VIEW view_3_tab0_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_704

statement ok
CREATE VIEW view_1_tab0_704 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)

statement ok
CREATE VIEW view_2_tab0_704 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))

statement ok
CREATE VIEW view_3_tab0_704 AS SELECT pk FROM view_1_tab0_704

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_704
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_704 UNION ALL SELECT pk, col0 FROM view_2_tab0_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_704 UNION SELECT pk, col0 FROM view_2_tab0_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) ) AS tab0_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_704

statement ok
DROP VIEW view_2_tab0_704

statement ok
DROP VIEW view_3_tab0_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_704') DROP VIEW view_1_tab1_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_704') DROP VIEW view_2_tab1_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_704') DROP VIEW view_3_tab1_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_704

statement ok
CREATE VIEW view_1_tab1_704 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)

statement ok
CREATE VIEW view_2_tab1_704 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))

statement ok
CREATE VIEW view_3_tab1_704 AS SELECT pk FROM view_1_tab1_704

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_704
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_704 UNION ALL SELECT pk, col0 FROM view_2_tab1_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_704 UNION SELECT pk, col0 FROM view_2_tab1_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) ) AS tab1_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_704

statement ok
DROP VIEW view_2_tab1_704

statement ok
DROP VIEW view_3_tab1_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_704') DROP VIEW view_1_tab2_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_704') DROP VIEW view_2_tab2_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_704') DROP VIEW view_3_tab2_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_704

statement ok
CREATE VIEW view_1_tab2_704 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)

statement ok
CREATE VIEW view_2_tab2_704 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))

statement ok
CREATE VIEW view_3_tab2_704 AS SELECT pk FROM view_1_tab2_704

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_704
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_704 UNION ALL SELECT pk, col0 FROM view_2_tab2_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_704 UNION SELECT pk, col0 FROM view_2_tab2_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) ) AS tab2_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_704

statement ok
DROP VIEW view_2_tab2_704

statement ok
DROP VIEW view_3_tab2_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_704') DROP VIEW view_1_tab3_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_704') DROP VIEW view_2_tab3_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_704') DROP VIEW view_3_tab3_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_704

statement ok
CREATE VIEW view_1_tab3_704 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)

statement ok
CREATE VIEW view_2_tab3_704 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))

statement ok
CREATE VIEW view_3_tab3_704 AS SELECT pk FROM view_1_tab3_704

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_704
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_704 UNION ALL SELECT pk, col0 FROM view_2_tab3_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_704 UNION SELECT pk, col0 FROM view_2_tab3_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) ) AS tab3_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_704

statement ok
DROP VIEW view_2_tab3_704

statement ok
DROP VIEW view_3_tab3_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_704') DROP VIEW view_1_tab4_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_704') DROP VIEW view_2_tab4_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_704') DROP VIEW view_3_tab4_704

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_704

statement ok
CREATE VIEW view_1_tab4_704 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)

statement ok
CREATE VIEW view_2_tab4_704 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))

statement ok
CREATE VIEW view_3_tab4_704 AS SELECT pk FROM view_1_tab4_704

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_704
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_704 UNION ALL SELECT pk, col0 FROM view_2_tab4_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_704 UNION SELECT pk, col0 FROM view_2_tab4_704
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4) ) AS tab4_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_704
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE (col3 < 48 OR (((col1 < 79.41 OR col0 IN (82,46,57,14,28,16) AND col4 <= 72.23))) OR (((col1 <= 99.79))) AND (col0 IS NULL)) AND col3 < 89 OR (col3 >= 4)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_704

statement ok
DROP VIEW view_2_tab4_704

statement ok
DROP VIEW view_3_tab4_704

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_705') DROP VIEW view_1_tab0_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_705') DROP VIEW view_2_tab0_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_705') DROP VIEW view_3_tab0_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_705

statement ok
CREATE VIEW view_1_tab0_705 AS SELECT pk, col0 FROM tab0 WHERE col3 > 74

statement ok
CREATE VIEW view_2_tab0_705 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 74)

statement ok
CREATE VIEW view_3_tab0_705 AS SELECT pk FROM view_1_tab0_705

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE col3 > 74
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 74)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_705
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_705
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 74 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_705 UNION ALL SELECT pk, col0 FROM view_2_tab0_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 74 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_705 UNION SELECT pk, col0 FROM view_2_tab0_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 74 ) AS tab0_705
----
8

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_705
----
8

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE col3 > 74
----
8

statement ok
DROP VIEW view_1_tab0_705

statement ok
DROP VIEW view_2_tab0_705

statement ok
DROP VIEW view_3_tab0_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_705') DROP VIEW view_1_tab1_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_705') DROP VIEW view_2_tab1_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_705') DROP VIEW view_3_tab1_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_705

statement ok
CREATE VIEW view_1_tab1_705 AS SELECT pk, col0 FROM tab1 WHERE col3 > 74

statement ok
CREATE VIEW view_2_tab1_705 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 74)

statement ok
CREATE VIEW view_3_tab1_705 AS SELECT pk FROM view_1_tab1_705

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE col3 > 74
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 74)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_705
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_705
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 74 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_705 UNION ALL SELECT pk, col0 FROM view_2_tab1_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 74 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_705 UNION SELECT pk, col0 FROM view_2_tab1_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 74 ) AS tab1_705
----
8

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_705
----
8

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE col3 > 74
----
8

statement ok
DROP VIEW view_1_tab1_705

statement ok
DROP VIEW view_2_tab1_705

statement ok
DROP VIEW view_3_tab1_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_705') DROP VIEW view_1_tab2_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_705') DROP VIEW view_2_tab2_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_705') DROP VIEW view_3_tab2_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_705

statement ok
CREATE VIEW view_1_tab2_705 AS SELECT pk, col0 FROM tab2 WHERE col3 > 74

statement ok
CREATE VIEW view_2_tab2_705 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 74)

statement ok
CREATE VIEW view_3_tab2_705 AS SELECT pk FROM view_1_tab2_705

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE col3 > 74
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 74)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_705
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_705
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 74 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_705 UNION ALL SELECT pk, col0 FROM view_2_tab2_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 74 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_705 UNION SELECT pk, col0 FROM view_2_tab2_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 74 ) AS tab2_705
----
8

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_705
----
8

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE col3 > 74
----
8

statement ok
DROP VIEW view_1_tab2_705

statement ok
DROP VIEW view_2_tab2_705

statement ok
DROP VIEW view_3_tab2_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_705') DROP VIEW view_1_tab3_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_705') DROP VIEW view_2_tab3_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_705') DROP VIEW view_3_tab3_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_705

statement ok
CREATE VIEW view_1_tab3_705 AS SELECT pk, col0 FROM tab3 WHERE col3 > 74

statement ok
CREATE VIEW view_2_tab3_705 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 74)

statement ok
CREATE VIEW view_3_tab3_705 AS SELECT pk FROM view_1_tab3_705

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE col3 > 74
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 74)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_705
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_705
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 74 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_705 UNION ALL SELECT pk, col0 FROM view_2_tab3_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 74 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_705 UNION SELECT pk, col0 FROM view_2_tab3_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 74 ) AS tab3_705
----
8

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_705
----
8

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE col3 > 74
----
8

statement ok
DROP VIEW view_1_tab3_705

statement ok
DROP VIEW view_2_tab3_705

statement ok
DROP VIEW view_3_tab3_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_705') DROP VIEW view_1_tab4_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_705') DROP VIEW view_2_tab4_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_705') DROP VIEW view_3_tab4_705

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_705

statement ok
CREATE VIEW view_1_tab4_705 AS SELECT pk, col0 FROM tab4 WHERE col3 > 74

statement ok
CREATE VIEW view_2_tab4_705 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 74)

statement ok
CREATE VIEW view_3_tab4_705 AS SELECT pk FROM view_1_tab4_705

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE col3 > 74
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 74)
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_705
----
8
23

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_705
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 74 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_705 UNION ALL SELECT pk, col0 FROM view_2_tab4_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 74 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 74)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_705 UNION SELECT pk, col0 FROM view_2_tab4_705
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 74 ) AS tab4_705
----
8

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_705
----
8

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE col3 > 74
----
8

statement ok
DROP VIEW view_1_tab4_705

statement ok
DROP VIEW view_2_tab4_705

statement ok
DROP VIEW view_3_tab4_705

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_706') DROP VIEW view_1_tab0_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_706') DROP VIEW view_2_tab0_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_706') DROP VIEW view_3_tab0_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_706

statement ok
CREATE VIEW view_1_tab0_706 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 38 OR (col3 <= 52))

statement ok
CREATE VIEW view_2_tab0_706 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 38 OR (col3 <= 52)))

statement ok
CREATE VIEW view_3_tab0_706 AS SELECT pk FROM view_1_tab0_706

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 38 OR (col3 <= 52))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_706
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 38 OR (col3 <= 52)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_706 UNION ALL SELECT pk, col0 FROM view_2_tab0_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 38 OR (col3 <= 52)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_706 UNION SELECT pk, col0 FROM view_2_tab0_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 38 OR (col3 <= 52)) ) AS tab0_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE (col3 > 38 OR (col3 <= 52))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_706

statement ok
DROP VIEW view_2_tab0_706

statement ok
DROP VIEW view_3_tab0_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_706') DROP VIEW view_1_tab1_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_706') DROP VIEW view_2_tab1_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_706') DROP VIEW view_3_tab1_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_706

statement ok
CREATE VIEW view_1_tab1_706 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 38 OR (col3 <= 52))

statement ok
CREATE VIEW view_2_tab1_706 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 38 OR (col3 <= 52)))

statement ok
CREATE VIEW view_3_tab1_706 AS SELECT pk FROM view_1_tab1_706

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 38 OR (col3 <= 52))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_706
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 38 OR (col3 <= 52)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_706 UNION ALL SELECT pk, col0 FROM view_2_tab1_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 38 OR (col3 <= 52)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_706 UNION SELECT pk, col0 FROM view_2_tab1_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 38 OR (col3 <= 52)) ) AS tab1_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE (col3 > 38 OR (col3 <= 52))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_706

statement ok
DROP VIEW view_2_tab1_706

statement ok
DROP VIEW view_3_tab1_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_706') DROP VIEW view_1_tab2_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_706') DROP VIEW view_2_tab2_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_706') DROP VIEW view_3_tab2_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_706

statement ok
CREATE VIEW view_1_tab2_706 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 38 OR (col3 <= 52))

statement ok
CREATE VIEW view_2_tab2_706 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 38 OR (col3 <= 52)))

statement ok
CREATE VIEW view_3_tab2_706 AS SELECT pk FROM view_1_tab2_706

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 38 OR (col3 <= 52))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_706
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 38 OR (col3 <= 52)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_706 UNION ALL SELECT pk, col0 FROM view_2_tab2_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 38 OR (col3 <= 52)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_706 UNION SELECT pk, col0 FROM view_2_tab2_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 38 OR (col3 <= 52)) ) AS tab2_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE (col3 > 38 OR (col3 <= 52))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_706

statement ok
DROP VIEW view_2_tab2_706

statement ok
DROP VIEW view_3_tab2_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_706') DROP VIEW view_1_tab3_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_706') DROP VIEW view_2_tab3_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_706') DROP VIEW view_3_tab3_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_706

statement ok
CREATE VIEW view_1_tab3_706 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 38 OR (col3 <= 52))

statement ok
CREATE VIEW view_2_tab3_706 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 38 OR (col3 <= 52)))

statement ok
CREATE VIEW view_3_tab3_706 AS SELECT pk FROM view_1_tab3_706

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 38 OR (col3 <= 52))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_706
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 38 OR (col3 <= 52)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_706 UNION ALL SELECT pk, col0 FROM view_2_tab3_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 38 OR (col3 <= 52)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_706 UNION SELECT pk, col0 FROM view_2_tab3_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 38 OR (col3 <= 52)) ) AS tab3_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE (col3 > 38 OR (col3 <= 52))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_706

statement ok
DROP VIEW view_2_tab3_706

statement ok
DROP VIEW view_3_tab3_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_706') DROP VIEW view_1_tab4_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_706') DROP VIEW view_2_tab4_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_706') DROP VIEW view_3_tab4_706

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_706

statement ok
CREATE VIEW view_1_tab4_706 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 38 OR (col3 <= 52))

statement ok
CREATE VIEW view_2_tab4_706 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 38 OR (col3 <= 52)))

statement ok
CREATE VIEW view_3_tab4_706 AS SELECT pk FROM view_1_tab4_706

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 38 OR (col3 <= 52))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_706
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 38 OR (col3 <= 52)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_706 UNION ALL SELECT pk, col0 FROM view_2_tab4_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 38 OR (col3 <= 52)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 38 OR (col3 <= 52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_706 UNION SELECT pk, col0 FROM view_2_tab4_706
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 38 OR (col3 <= 52)) ) AS tab4_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_706
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE (col3 > 38 OR (col3 <= 52))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_706

statement ok
DROP VIEW view_2_tab4_706

statement ok
DROP VIEW view_3_tab4_706

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_707') DROP VIEW view_1_tab0_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_707') DROP VIEW view_2_tab0_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_707') DROP VIEW view_3_tab0_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_707

statement ok
CREATE VIEW view_1_tab0_707 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 58

statement ok
CREATE VIEW view_2_tab0_707 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 58)

statement ok
CREATE VIEW view_3_tab0_707 AS SELECT pk FROM view_1_tab0_707

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 58
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 58)
----
2
85
3
93

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_707
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_707
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 58 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_707 UNION ALL SELECT pk, col0 FROM view_2_tab0_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 58 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_707 UNION SELECT pk, col0 FROM view_2_tab0_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 58 ) AS tab0_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col0 <= 58
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_707

statement ok
DROP VIEW view_2_tab0_707

statement ok
DROP VIEW view_3_tab0_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_707') DROP VIEW view_1_tab1_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_707') DROP VIEW view_2_tab1_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_707') DROP VIEW view_3_tab1_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_707

statement ok
CREATE VIEW view_1_tab1_707 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 58

statement ok
CREATE VIEW view_2_tab1_707 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 58)

statement ok
CREATE VIEW view_3_tab1_707 AS SELECT pk FROM view_1_tab1_707

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 58
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 58)
----
2
85
3
93

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_707
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_707
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 58 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_707 UNION ALL SELECT pk, col0 FROM view_2_tab1_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 58 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_707 UNION SELECT pk, col0 FROM view_2_tab1_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 58 ) AS tab1_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col0 <= 58
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_707

statement ok
DROP VIEW view_2_tab1_707

statement ok
DROP VIEW view_3_tab1_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_707') DROP VIEW view_1_tab2_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_707') DROP VIEW view_2_tab2_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_707') DROP VIEW view_3_tab2_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_707

statement ok
CREATE VIEW view_1_tab2_707 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 58

statement ok
CREATE VIEW view_2_tab2_707 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 58)

statement ok
CREATE VIEW view_3_tab2_707 AS SELECT pk FROM view_1_tab2_707

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 58
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 58)
----
2
85
3
93

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_707
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_707
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 58 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_707 UNION ALL SELECT pk, col0 FROM view_2_tab2_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 58 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_707 UNION SELECT pk, col0 FROM view_2_tab2_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 58 ) AS tab2_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col0 <= 58
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_707

statement ok
DROP VIEW view_2_tab2_707

statement ok
DROP VIEW view_3_tab2_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_707') DROP VIEW view_1_tab3_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_707') DROP VIEW view_2_tab3_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_707') DROP VIEW view_3_tab3_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_707

statement ok
CREATE VIEW view_1_tab3_707 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 58

statement ok
CREATE VIEW view_2_tab3_707 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 58)

statement ok
CREATE VIEW view_3_tab3_707 AS SELECT pk FROM view_1_tab3_707

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 58
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 58)
----
2
85
3
93

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_707
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_707
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 58 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_707 UNION ALL SELECT pk, col0 FROM view_2_tab3_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 58 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_707 UNION SELECT pk, col0 FROM view_2_tab3_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 58 ) AS tab3_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col0 <= 58
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_707

statement ok
DROP VIEW view_2_tab3_707

statement ok
DROP VIEW view_3_tab3_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_707') DROP VIEW view_1_tab4_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_707') DROP VIEW view_2_tab4_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_707') DROP VIEW view_3_tab4_707

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_707

statement ok
CREATE VIEW view_1_tab4_707 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 58

statement ok
CREATE VIEW view_2_tab4_707 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 58)

statement ok
CREATE VIEW view_3_tab4_707 AS SELECT pk FROM view_1_tab4_707

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 58
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 58)
----
2
85
3
93

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_707
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_707
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 58 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_707 UNION ALL SELECT pk, col0 FROM view_2_tab4_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 58 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 58)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_707 UNION SELECT pk, col0 FROM view_2_tab4_707
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 58 ) AS tab4_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_707
----
0
1
4
5
6
7
8
9

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col0 <= 58
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_707

statement ok
DROP VIEW view_2_tab4_707

statement ok
DROP VIEW view_3_tab4_707

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_708') DROP VIEW view_1_tab0_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_708') DROP VIEW view_2_tab0_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_708') DROP VIEW view_3_tab0_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_708

statement ok
CREATE VIEW view_1_tab0_708 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93

statement ok
CREATE VIEW view_2_tab0_708 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)

statement ok
CREATE VIEW view_3_tab0_708 AS SELECT pk FROM view_1_tab0_708

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
2
85
3
93

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_708
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_708
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_708 UNION ALL SELECT pk, col0 FROM view_2_tab0_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_708 UNION SELECT pk, col0 FROM view_2_tab0_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 ) AS tab0_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_708

statement ok
DROP VIEW view_2_tab0_708

statement ok
DROP VIEW view_3_tab0_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_708') DROP VIEW view_1_tab1_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_708') DROP VIEW view_2_tab1_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_708') DROP VIEW view_3_tab1_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_708

statement ok
CREATE VIEW view_1_tab1_708 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93

statement ok
CREATE VIEW view_2_tab1_708 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)

statement ok
CREATE VIEW view_3_tab1_708 AS SELECT pk FROM view_1_tab1_708

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
2
85
3
93

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_708
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_708
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_708 UNION ALL SELECT pk, col0 FROM view_2_tab1_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_708 UNION SELECT pk, col0 FROM view_2_tab1_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 ) AS tab1_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_708

statement ok
DROP VIEW view_2_tab1_708

statement ok
DROP VIEW view_3_tab1_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_708') DROP VIEW view_1_tab2_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_708') DROP VIEW view_2_tab2_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_708') DROP VIEW view_3_tab2_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_708

statement ok
CREATE VIEW view_1_tab2_708 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93

statement ok
CREATE VIEW view_2_tab2_708 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)

statement ok
CREATE VIEW view_3_tab2_708 AS SELECT pk FROM view_1_tab2_708

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
2
85
3
93

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_708
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_708
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_708 UNION ALL SELECT pk, col0 FROM view_2_tab2_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_708 UNION SELECT pk, col0 FROM view_2_tab2_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 ) AS tab2_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_708

statement ok
DROP VIEW view_2_tab2_708

statement ok
DROP VIEW view_3_tab2_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_708') DROP VIEW view_1_tab3_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_708') DROP VIEW view_2_tab3_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_708') DROP VIEW view_3_tab3_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_708

statement ok
CREATE VIEW view_1_tab3_708 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93

statement ok
CREATE VIEW view_2_tab3_708 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)

statement ok
CREATE VIEW view_3_tab3_708 AS SELECT pk FROM view_1_tab3_708

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
2
85
3
93

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_708
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_708
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_708 UNION ALL SELECT pk, col0 FROM view_2_tab3_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_708 UNION SELECT pk, col0 FROM view_2_tab3_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 ) AS tab3_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_708

statement ok
DROP VIEW view_2_tab3_708

statement ok
DROP VIEW view_3_tab3_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_708') DROP VIEW view_1_tab4_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_708') DROP VIEW view_2_tab4_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_708') DROP VIEW view_3_tab4_708

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_708

statement ok
CREATE VIEW view_1_tab4_708 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93

statement ok
CREATE VIEW view_2_tab4_708 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)

statement ok
CREATE VIEW view_3_tab4_708 AS SELECT pk FROM view_1_tab4_708

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
2
85
3
93

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_708
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_708
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_708 UNION ALL SELECT pk, col0 FROM view_2_tab4_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_708 UNION SELECT pk, col0 FROM view_2_tab4_708
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93 ) AS tab4_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_708
----
0
1
4
5
6
7
8
9

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col0 <= 50 OR col0 BETWEEN 41 AND 65 OR col4 >= 84.93
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_708

statement ok
DROP VIEW view_2_tab4_708

statement ok
DROP VIEW view_3_tab4_708

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_709') DROP VIEW view_1_tab0_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_709') DROP VIEW view_2_tab0_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_709') DROP VIEW view_3_tab0_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_709

statement ok
CREATE VIEW view_1_tab0_709 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16

statement ok
CREATE VIEW view_2_tab0_709 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)

statement ok
CREATE VIEW view_3_tab0_709 AS SELECT pk FROM view_1_tab0_709

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_709
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_709 UNION ALL SELECT pk, col0 FROM view_2_tab0_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_709 UNION SELECT pk, col0 FROM view_2_tab0_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 ) AS tab0_709
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_709
----

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

statement ok
DROP VIEW view_1_tab0_709

statement ok
DROP VIEW view_2_tab0_709

statement ok
DROP VIEW view_3_tab0_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_709') DROP VIEW view_1_tab1_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_709') DROP VIEW view_2_tab1_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_709') DROP VIEW view_3_tab1_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_709

statement ok
CREATE VIEW view_1_tab1_709 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16

statement ok
CREATE VIEW view_2_tab1_709 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)

statement ok
CREATE VIEW view_3_tab1_709 AS SELECT pk FROM view_1_tab1_709

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_709
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_709 UNION ALL SELECT pk, col0 FROM view_2_tab1_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_709 UNION SELECT pk, col0 FROM view_2_tab1_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 ) AS tab1_709
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_709
----

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

statement ok
DROP VIEW view_1_tab1_709

statement ok
DROP VIEW view_2_tab1_709

statement ok
DROP VIEW view_3_tab1_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_709') DROP VIEW view_1_tab2_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_709') DROP VIEW view_2_tab2_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_709') DROP VIEW view_3_tab2_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_709

statement ok
CREATE VIEW view_1_tab2_709 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16

statement ok
CREATE VIEW view_2_tab2_709 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)

statement ok
CREATE VIEW view_3_tab2_709 AS SELECT pk FROM view_1_tab2_709

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_709
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_709 UNION ALL SELECT pk, col0 FROM view_2_tab2_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_709 UNION SELECT pk, col0 FROM view_2_tab2_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 ) AS tab2_709
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_709
----

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

statement ok
DROP VIEW view_1_tab2_709

statement ok
DROP VIEW view_2_tab2_709

statement ok
DROP VIEW view_3_tab2_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_709') DROP VIEW view_1_tab3_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_709') DROP VIEW view_2_tab3_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_709') DROP VIEW view_3_tab3_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_709

statement ok
CREATE VIEW view_1_tab3_709 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16

statement ok
CREATE VIEW view_2_tab3_709 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)

statement ok
CREATE VIEW view_3_tab3_709 AS SELECT pk FROM view_1_tab3_709

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_709
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_709 UNION ALL SELECT pk, col0 FROM view_2_tab3_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_709 UNION SELECT pk, col0 FROM view_2_tab3_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 ) AS tab3_709
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_709
----

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

statement ok
DROP VIEW view_1_tab3_709

statement ok
DROP VIEW view_2_tab3_709

statement ok
DROP VIEW view_3_tab3_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_709') DROP VIEW view_1_tab4_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_709') DROP VIEW view_2_tab4_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_709') DROP VIEW view_3_tab4_709

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_709

statement ok
CREATE VIEW view_1_tab4_709 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16

statement ok
CREATE VIEW view_2_tab4_709 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)

statement ok
CREATE VIEW view_3_tab4_709 AS SELECT pk FROM view_1_tab4_709

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_709
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_709 UNION ALL SELECT pk, col0 FROM view_2_tab4_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_709 UNION SELECT pk, col0 FROM view_2_tab4_709
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16 ) AS tab4_709
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_709
----

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col3 <= 46 AND col3 >= 73 OR (((((((col3 <= 87) OR col3 <= 64 OR (col0 >= 86))))) AND col3 < 55) AND col3 > 58) AND col1 > 12.16
----

statement ok
DROP VIEW view_1_tab4_709

statement ok
DROP VIEW view_2_tab4_709

statement ok
DROP VIEW view_3_tab4_709

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_710') DROP VIEW view_1_tab0_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_710') DROP VIEW view_2_tab0_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_710') DROP VIEW view_3_tab0_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_710

statement ok
CREATE VIEW view_1_tab0_710 AS SELECT pk, col0 FROM tab0 WHERE col1 > 98.48

statement ok
CREATE VIEW view_2_tab0_710 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 98.48)

statement ok
CREATE VIEW view_3_tab0_710 AS SELECT pk FROM view_1_tab0_710

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE col1 > 98.48
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 98.48)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_710
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_710
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 98.48 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_710 UNION ALL SELECT pk, col0 FROM view_2_tab0_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 98.48 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_710 UNION SELECT pk, col0 FROM view_2_tab0_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 98.48 ) AS tab0_710
----
6

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_710
----
6

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE col1 > 98.48
----
6

statement ok
DROP VIEW view_1_tab0_710

statement ok
DROP VIEW view_2_tab0_710

statement ok
DROP VIEW view_3_tab0_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_710') DROP VIEW view_1_tab1_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_710') DROP VIEW view_2_tab1_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_710') DROP VIEW view_3_tab1_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_710

statement ok
CREATE VIEW view_1_tab1_710 AS SELECT pk, col0 FROM tab1 WHERE col1 > 98.48

statement ok
CREATE VIEW view_2_tab1_710 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 98.48)

statement ok
CREATE VIEW view_3_tab1_710 AS SELECT pk FROM view_1_tab1_710

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE col1 > 98.48
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 98.48)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_710
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_710
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 98.48 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_710 UNION ALL SELECT pk, col0 FROM view_2_tab1_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 98.48 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_710 UNION SELECT pk, col0 FROM view_2_tab1_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 98.48 ) AS tab1_710
----
6

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_710
----
6

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE col1 > 98.48
----
6

statement ok
DROP VIEW view_1_tab1_710

statement ok
DROP VIEW view_2_tab1_710

statement ok
DROP VIEW view_3_tab1_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_710') DROP VIEW view_1_tab2_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_710') DROP VIEW view_2_tab2_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_710') DROP VIEW view_3_tab2_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_710

statement ok
CREATE VIEW view_1_tab2_710 AS SELECT pk, col0 FROM tab2 WHERE col1 > 98.48

statement ok
CREATE VIEW view_2_tab2_710 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 98.48)

statement ok
CREATE VIEW view_3_tab2_710 AS SELECT pk FROM view_1_tab2_710

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE col1 > 98.48
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 98.48)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_710
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_710
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 98.48 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_710 UNION ALL SELECT pk, col0 FROM view_2_tab2_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 98.48 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_710 UNION SELECT pk, col0 FROM view_2_tab2_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 98.48 ) AS tab2_710
----
6

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_710
----
6

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE col1 > 98.48
----
6

statement ok
DROP VIEW view_1_tab2_710

statement ok
DROP VIEW view_2_tab2_710

statement ok
DROP VIEW view_3_tab2_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_710') DROP VIEW view_1_tab3_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_710') DROP VIEW view_2_tab3_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_710') DROP VIEW view_3_tab3_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_710

statement ok
CREATE VIEW view_1_tab3_710 AS SELECT pk, col0 FROM tab3 WHERE col1 > 98.48

statement ok
CREATE VIEW view_2_tab3_710 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 98.48)

statement ok
CREATE VIEW view_3_tab3_710 AS SELECT pk FROM view_1_tab3_710

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE col1 > 98.48
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 98.48)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_710
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_710
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 98.48 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_710 UNION ALL SELECT pk, col0 FROM view_2_tab3_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 98.48 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_710 UNION SELECT pk, col0 FROM view_2_tab3_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 98.48 ) AS tab3_710
----
6

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_710
----
6

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE col1 > 98.48
----
6

statement ok
DROP VIEW view_1_tab3_710

statement ok
DROP VIEW view_2_tab3_710

statement ok
DROP VIEW view_3_tab3_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_710') DROP VIEW view_1_tab4_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_710') DROP VIEW view_2_tab4_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_710') DROP VIEW view_3_tab4_710

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_710

statement ok
CREATE VIEW view_1_tab4_710 AS SELECT pk, col0 FROM tab4 WHERE col1 > 98.48

statement ok
CREATE VIEW view_2_tab4_710 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 98.48)

statement ok
CREATE VIEW view_3_tab4_710 AS SELECT pk FROM view_1_tab4_710

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE col1 > 98.48
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 98.48)
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_710
----
6
16

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_710
----
18 values hashing to 3a5652ce208a8a30cdaab063a93ba7ba

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 98.48 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_710 UNION ALL SELECT pk, col0 FROM view_2_tab4_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 98.48 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 98.48)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_710 UNION SELECT pk, col0 FROM view_2_tab4_710
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 98.48 ) AS tab4_710
----
6

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_710
----
6

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE col1 > 98.48
----
6

statement ok
DROP VIEW view_1_tab4_710

statement ok
DROP VIEW view_2_tab4_710

statement ok
DROP VIEW view_3_tab4_710

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_711') DROP VIEW view_1_tab0_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_711') DROP VIEW view_2_tab0_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_711') DROP VIEW view_3_tab0_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_711

statement ok
CREATE VIEW view_1_tab0_711 AS SELECT pk, col0 FROM tab0 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))

statement ok
CREATE VIEW view_2_tab0_711 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))

statement ok
CREATE VIEW view_3_tab0_711 AS SELECT pk FROM view_1_tab0_711

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_711
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_711
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_711 UNION ALL SELECT pk, col0 FROM view_2_tab0_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_711 UNION SELECT pk, col0 FROM view_2_tab0_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) ) AS tab0_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
4
8
9

statement ok
DROP VIEW view_1_tab0_711

statement ok
DROP VIEW view_2_tab0_711

statement ok
DROP VIEW view_3_tab0_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_711') DROP VIEW view_1_tab1_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_711') DROP VIEW view_2_tab1_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_711') DROP VIEW view_3_tab1_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_711

statement ok
CREATE VIEW view_1_tab1_711 AS SELECT pk, col0 FROM tab1 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))

statement ok
CREATE VIEW view_2_tab1_711 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))

statement ok
CREATE VIEW view_3_tab1_711 AS SELECT pk FROM view_1_tab1_711

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_711
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_711
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_711 UNION ALL SELECT pk, col0 FROM view_2_tab1_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_711 UNION SELECT pk, col0 FROM view_2_tab1_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) ) AS tab1_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
4
8
9

statement ok
DROP VIEW view_1_tab1_711

statement ok
DROP VIEW view_2_tab1_711

statement ok
DROP VIEW view_3_tab1_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_711') DROP VIEW view_1_tab2_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_711') DROP VIEW view_2_tab2_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_711') DROP VIEW view_3_tab2_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_711

statement ok
CREATE VIEW view_1_tab2_711 AS SELECT pk, col0 FROM tab2 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))

statement ok
CREATE VIEW view_2_tab2_711 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))

statement ok
CREATE VIEW view_3_tab2_711 AS SELECT pk FROM view_1_tab2_711

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_711
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_711
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_711 UNION ALL SELECT pk, col0 FROM view_2_tab2_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_711 UNION SELECT pk, col0 FROM view_2_tab2_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) ) AS tab2_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
4
8
9

statement ok
DROP VIEW view_1_tab2_711

statement ok
DROP VIEW view_2_tab2_711

statement ok
DROP VIEW view_3_tab2_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_711') DROP VIEW view_1_tab3_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_711') DROP VIEW view_2_tab3_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_711') DROP VIEW view_3_tab3_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_711

statement ok
CREATE VIEW view_1_tab3_711 AS SELECT pk, col0 FROM tab3 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))

statement ok
CREATE VIEW view_2_tab3_711 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))

statement ok
CREATE VIEW view_3_tab3_711 AS SELECT pk FROM view_1_tab3_711

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_711
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_711
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_711 UNION ALL SELECT pk, col0 FROM view_2_tab3_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_711 UNION SELECT pk, col0 FROM view_2_tab3_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) ) AS tab3_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
4
8
9

statement ok
DROP VIEW view_1_tab3_711

statement ok
DROP VIEW view_2_tab3_711

statement ok
DROP VIEW view_3_tab3_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_711') DROP VIEW view_1_tab4_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_711') DROP VIEW view_2_tab4_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_711') DROP VIEW view_3_tab4_711

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_711

statement ok
CREATE VIEW view_1_tab4_711 AS SELECT pk, col0 FROM tab4 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))

statement ok
CREATE VIEW view_2_tab4_711 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))

statement ok
CREATE VIEW view_3_tab4_711 AS SELECT pk FROM view_1_tab4_711

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_711
----
1
2
4
44
8
23
9
32

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_711
----
12 values hashing to c7dd292e8ea71ef1ad26b0a91ba9ea5f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_711 UNION ALL SELECT pk, col0 FROM view_2_tab4_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_711 UNION SELECT pk, col0 FROM view_2_tab4_711
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94)) ) AS tab4_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_711
----
1
4
8
9

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE ((col0 <= 45) AND (((col0 > 47 OR ((col0 <= 52)) AND (col0 IS NULL AND col3 IS NULL OR ((col4 > 71.94) OR col1 >= 19.65) OR (col0 > 14 OR (col4 < 97.6)))) AND (col4 <= 6.0) OR (col3 >= 49) OR col3 < 3 AND col0 > 73 AND col0 IS NULL OR ((col3 = 77) AND col0 = 53) OR (col0 > 37)) OR col0 > 94))
----
1
4
8
9

statement ok
DROP VIEW view_1_tab4_711

statement ok
DROP VIEW view_2_tab4_711

statement ok
DROP VIEW view_3_tab4_711

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_712') DROP VIEW view_1_tab0_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_712') DROP VIEW view_2_tab0_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_712') DROP VIEW view_3_tab0_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_712

statement ok
CREATE VIEW view_1_tab0_712 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 46)

statement ok
CREATE VIEW view_2_tab0_712 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 46))

statement ok
CREATE VIEW view_3_tab0_712 AS SELECT pk FROM view_1_tab0_712

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 46)
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 46))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_712
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_712
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 46) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_712 UNION ALL SELECT pk, col0 FROM view_2_tab0_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 46) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_712 UNION SELECT pk, col0 FROM view_2_tab0_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 46) ) AS tab0_712
----
0
2
3

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_712
----
0
2
3

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE (col0 > 46)
----
0
2
3

statement ok
DROP VIEW view_1_tab0_712

statement ok
DROP VIEW view_2_tab0_712

statement ok
DROP VIEW view_3_tab0_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_712') DROP VIEW view_1_tab1_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_712') DROP VIEW view_2_tab1_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_712') DROP VIEW view_3_tab1_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_712

statement ok
CREATE VIEW view_1_tab1_712 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 46)

statement ok
CREATE VIEW view_2_tab1_712 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 46))

statement ok
CREATE VIEW view_3_tab1_712 AS SELECT pk FROM view_1_tab1_712

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 46)
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 46))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_712
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_712
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 46) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_712 UNION ALL SELECT pk, col0 FROM view_2_tab1_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 46) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_712 UNION SELECT pk, col0 FROM view_2_tab1_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 46) ) AS tab1_712
----
0
2
3

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_712
----
0
2
3

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE (col0 > 46)
----
0
2
3

statement ok
DROP VIEW view_1_tab1_712

statement ok
DROP VIEW view_2_tab1_712

statement ok
DROP VIEW view_3_tab1_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_712') DROP VIEW view_1_tab2_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_712') DROP VIEW view_2_tab2_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_712') DROP VIEW view_3_tab2_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_712

statement ok
CREATE VIEW view_1_tab2_712 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 46)

statement ok
CREATE VIEW view_2_tab2_712 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 46))

statement ok
CREATE VIEW view_3_tab2_712 AS SELECT pk FROM view_1_tab2_712

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 46)
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 46))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_712
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_712
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 46) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_712 UNION ALL SELECT pk, col0 FROM view_2_tab2_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 46) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_712 UNION SELECT pk, col0 FROM view_2_tab2_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 46) ) AS tab2_712
----
0
2
3

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_712
----
0
2
3

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE (col0 > 46)
----
0
2
3

statement ok
DROP VIEW view_1_tab2_712

statement ok
DROP VIEW view_2_tab2_712

statement ok
DROP VIEW view_3_tab2_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_712') DROP VIEW view_1_tab3_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_712') DROP VIEW view_2_tab3_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_712') DROP VIEW view_3_tab3_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_712

statement ok
CREATE VIEW view_1_tab3_712 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 46)

statement ok
CREATE VIEW view_2_tab3_712 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 46))

statement ok
CREATE VIEW view_3_tab3_712 AS SELECT pk FROM view_1_tab3_712

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 46)
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 46))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_712
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_712
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 46) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_712 UNION ALL SELECT pk, col0 FROM view_2_tab3_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 46) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_712 UNION SELECT pk, col0 FROM view_2_tab3_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 46) ) AS tab3_712
----
0
2
3

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_712
----
0
2
3

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE (col0 > 46)
----
0
2
3

statement ok
DROP VIEW view_1_tab3_712

statement ok
DROP VIEW view_2_tab3_712

statement ok
DROP VIEW view_3_tab3_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_712') DROP VIEW view_1_tab4_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_712') DROP VIEW view_2_tab4_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_712') DROP VIEW view_3_tab4_712

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_712

statement ok
CREATE VIEW view_1_tab4_712 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 46)

statement ok
CREATE VIEW view_2_tab4_712 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 46))

statement ok
CREATE VIEW view_3_tab4_712 AS SELECT pk FROM view_1_tab4_712

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 46)
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 46))
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_712
----
0
48
2
85
3
93

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_712
----
14 values hashing to e2c4ac19010c9c9da8ddaded5123e9c7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 46) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_712 UNION ALL SELECT pk, col0 FROM view_2_tab4_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 46) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 46))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_712 UNION SELECT pk, col0 FROM view_2_tab4_712
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 46) ) AS tab4_712
----
0
2
3

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_712
----
0
2
3

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE (col0 > 46)
----
0
2
3

statement ok
DROP VIEW view_1_tab4_712

statement ok
DROP VIEW view_2_tab4_712

statement ok
DROP VIEW view_3_tab4_712

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_713') DROP VIEW view_1_tab0_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_713') DROP VIEW view_2_tab0_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_713') DROP VIEW view_3_tab0_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_713

statement ok
CREATE VIEW view_1_tab0_713 AS SELECT pk, col0 FROM tab0 WHERE col0 > 79

statement ok
CREATE VIEW view_2_tab0_713 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 79)

statement ok
CREATE VIEW view_3_tab0_713 AS SELECT pk FROM view_1_tab0_713

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE col0 > 79
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 79)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_713
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_713
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 79 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_713 UNION ALL SELECT pk, col0 FROM view_2_tab0_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 79 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_713 UNION SELECT pk, col0 FROM view_2_tab0_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 79 ) AS tab0_713
----
2
3

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_713
----
2
3

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE col0 > 79
----
2
3

statement ok
DROP VIEW view_1_tab0_713

statement ok
DROP VIEW view_2_tab0_713

statement ok
DROP VIEW view_3_tab0_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_713') DROP VIEW view_1_tab1_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_713') DROP VIEW view_2_tab1_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_713') DROP VIEW view_3_tab1_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_713

statement ok
CREATE VIEW view_1_tab1_713 AS SELECT pk, col0 FROM tab1 WHERE col0 > 79

statement ok
CREATE VIEW view_2_tab1_713 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 79)

statement ok
CREATE VIEW view_3_tab1_713 AS SELECT pk FROM view_1_tab1_713

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE col0 > 79
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 79)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_713
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_713
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 79 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_713 UNION ALL SELECT pk, col0 FROM view_2_tab1_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 79 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_713 UNION SELECT pk, col0 FROM view_2_tab1_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 79 ) AS tab1_713
----
2
3

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_713
----
2
3

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE col0 > 79
----
2
3

statement ok
DROP VIEW view_1_tab1_713

statement ok
DROP VIEW view_2_tab1_713

statement ok
DROP VIEW view_3_tab1_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_713') DROP VIEW view_1_tab2_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_713') DROP VIEW view_2_tab2_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_713') DROP VIEW view_3_tab2_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_713

statement ok
CREATE VIEW view_1_tab2_713 AS SELECT pk, col0 FROM tab2 WHERE col0 > 79

statement ok
CREATE VIEW view_2_tab2_713 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 79)

statement ok
CREATE VIEW view_3_tab2_713 AS SELECT pk FROM view_1_tab2_713

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE col0 > 79
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 79)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_713
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_713
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 79 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_713 UNION ALL SELECT pk, col0 FROM view_2_tab2_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 79 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_713 UNION SELECT pk, col0 FROM view_2_tab2_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 79 ) AS tab2_713
----
2
3

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_713
----
2
3

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE col0 > 79
----
2
3

statement ok
DROP VIEW view_1_tab2_713

statement ok
DROP VIEW view_2_tab2_713

statement ok
DROP VIEW view_3_tab2_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_713') DROP VIEW view_1_tab3_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_713') DROP VIEW view_2_tab3_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_713') DROP VIEW view_3_tab3_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_713

statement ok
CREATE VIEW view_1_tab3_713 AS SELECT pk, col0 FROM tab3 WHERE col0 > 79

statement ok
CREATE VIEW view_2_tab3_713 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 79)

statement ok
CREATE VIEW view_3_tab3_713 AS SELECT pk FROM view_1_tab3_713

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE col0 > 79
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 79)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_713
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_713
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 79 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_713 UNION ALL SELECT pk, col0 FROM view_2_tab3_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 79 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_713 UNION SELECT pk, col0 FROM view_2_tab3_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 79 ) AS tab3_713
----
2
3

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_713
----
2
3

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE col0 > 79
----
2
3

statement ok
DROP VIEW view_1_tab3_713

statement ok
DROP VIEW view_2_tab3_713

statement ok
DROP VIEW view_3_tab3_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_713') DROP VIEW view_1_tab4_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_713') DROP VIEW view_2_tab4_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_713') DROP VIEW view_3_tab4_713

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_713

statement ok
CREATE VIEW view_1_tab4_713 AS SELECT pk, col0 FROM tab4 WHERE col0 > 79

statement ok
CREATE VIEW view_2_tab4_713 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 79)

statement ok
CREATE VIEW view_3_tab4_713 AS SELECT pk FROM view_1_tab4_713

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE col0 > 79
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 79)
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_713
----
2
85
3
93

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_713
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 79 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_713 UNION ALL SELECT pk, col0 FROM view_2_tab4_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 79 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 79)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_713 UNION SELECT pk, col0 FROM view_2_tab4_713
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 79 ) AS tab4_713
----
2
3

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_713
----
2
3

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE col0 > 79
----
2
3

statement ok
DROP VIEW view_1_tab4_713

statement ok
DROP VIEW view_2_tab4_713

statement ok
DROP VIEW view_3_tab4_713

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_714') DROP VIEW view_1_tab0_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_714') DROP VIEW view_2_tab0_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_714') DROP VIEW view_3_tab0_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_714

statement ok
CREATE VIEW view_1_tab0_714 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 33 AND (col0 < 40)

statement ok
CREATE VIEW view_2_tab0_714 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 33 AND (col0 < 40))

statement ok
CREATE VIEW view_3_tab0_714 AS SELECT pk FROM view_1_tab0_714

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 33 AND (col0 < 40)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
0
48
2
85
3
93
4
44

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_714
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_714
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 33 AND (col0 < 40) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_714 UNION ALL SELECT pk, col0 FROM view_2_tab0_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 33 AND (col0 < 40) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_714 UNION SELECT pk, col0 FROM view_2_tab0_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 33 AND (col0 < 40) ) AS tab0_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE col3 >= 33 AND (col0 < 40)
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_714

statement ok
DROP VIEW view_2_tab0_714

statement ok
DROP VIEW view_3_tab0_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_714') DROP VIEW view_1_tab1_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_714') DROP VIEW view_2_tab1_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_714') DROP VIEW view_3_tab1_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_714

statement ok
CREATE VIEW view_1_tab1_714 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 33 AND (col0 < 40)

statement ok
CREATE VIEW view_2_tab1_714 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 33 AND (col0 < 40))

statement ok
CREATE VIEW view_3_tab1_714 AS SELECT pk FROM view_1_tab1_714

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 33 AND (col0 < 40)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
0
48
2
85
3
93
4
44

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_714
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_714
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 33 AND (col0 < 40) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_714 UNION ALL SELECT pk, col0 FROM view_2_tab1_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 33 AND (col0 < 40) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_714 UNION SELECT pk, col0 FROM view_2_tab1_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 33 AND (col0 < 40) ) AS tab1_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE col3 >= 33 AND (col0 < 40)
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_714

statement ok
DROP VIEW view_2_tab1_714

statement ok
DROP VIEW view_3_tab1_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_714') DROP VIEW view_1_tab2_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_714') DROP VIEW view_2_tab2_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_714') DROP VIEW view_3_tab2_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_714

statement ok
CREATE VIEW view_1_tab2_714 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 33 AND (col0 < 40)

statement ok
CREATE VIEW view_2_tab2_714 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 33 AND (col0 < 40))

statement ok
CREATE VIEW view_3_tab2_714 AS SELECT pk FROM view_1_tab2_714

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 33 AND (col0 < 40)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
0
48
2
85
3
93
4
44

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_714
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_714
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 33 AND (col0 < 40) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_714 UNION ALL SELECT pk, col0 FROM view_2_tab2_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 33 AND (col0 < 40) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_714 UNION SELECT pk, col0 FROM view_2_tab2_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 33 AND (col0 < 40) ) AS tab2_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE col3 >= 33 AND (col0 < 40)
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_714

statement ok
DROP VIEW view_2_tab2_714

statement ok
DROP VIEW view_3_tab2_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_714') DROP VIEW view_1_tab3_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_714') DROP VIEW view_2_tab3_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_714') DROP VIEW view_3_tab3_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_714

statement ok
CREATE VIEW view_1_tab3_714 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 33 AND (col0 < 40)

statement ok
CREATE VIEW view_2_tab3_714 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 33 AND (col0 < 40))

statement ok
CREATE VIEW view_3_tab3_714 AS SELECT pk FROM view_1_tab3_714

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 33 AND (col0 < 40)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
0
48
2
85
3
93
4
44

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_714
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_714
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 33 AND (col0 < 40) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_714 UNION ALL SELECT pk, col0 FROM view_2_tab3_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 33 AND (col0 < 40) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_714 UNION SELECT pk, col0 FROM view_2_tab3_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 33 AND (col0 < 40) ) AS tab3_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE col3 >= 33 AND (col0 < 40)
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_714

statement ok
DROP VIEW view_2_tab3_714

statement ok
DROP VIEW view_3_tab3_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_714') DROP VIEW view_1_tab4_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_714') DROP VIEW view_2_tab4_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_714') DROP VIEW view_3_tab4_714

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_714

statement ok
CREATE VIEW view_1_tab4_714 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 33 AND (col0 < 40)

statement ok
CREATE VIEW view_2_tab4_714 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 33 AND (col0 < 40))

statement ok
CREATE VIEW view_3_tab4_714 AS SELECT pk FROM view_1_tab4_714

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 33 AND (col0 < 40)
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
0
48
2
85
3
93
4
44

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_714
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_714
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 33 AND (col0 < 40) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_714 UNION ALL SELECT pk, col0 FROM view_2_tab4_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 33 AND (col0 < 40) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 33 AND (col0 < 40))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_714 UNION SELECT pk, col0 FROM view_2_tab4_714
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 33 AND (col0 < 40) ) AS tab4_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_714
----
1
5
6
7
8
9

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE col3 >= 33 AND (col0 < 40)
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_714

statement ok
DROP VIEW view_2_tab4_714

statement ok
DROP VIEW view_3_tab4_714

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_715') DROP VIEW view_1_tab0_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_715') DROP VIEW view_2_tab0_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_715') DROP VIEW view_3_tab0_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_715

statement ok
CREATE VIEW view_1_tab0_715 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 90

statement ok
CREATE VIEW view_2_tab0_715 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 90)

statement ok
CREATE VIEW view_3_tab0_715 AS SELECT pk FROM view_1_tab0_715

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 90
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 90)
----
3
93

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_715
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_715
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 90 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_715 UNION ALL SELECT pk, col0 FROM view_2_tab0_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 90 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_715 UNION SELECT pk, col0 FROM view_2_tab0_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 90 ) AS tab0_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col0 <= 90
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_715

statement ok
DROP VIEW view_2_tab0_715

statement ok
DROP VIEW view_3_tab0_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_715') DROP VIEW view_1_tab1_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_715') DROP VIEW view_2_tab1_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_715') DROP VIEW view_3_tab1_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_715

statement ok
CREATE VIEW view_1_tab1_715 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 90

statement ok
CREATE VIEW view_2_tab1_715 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 90)

statement ok
CREATE VIEW view_3_tab1_715 AS SELECT pk FROM view_1_tab1_715

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 90
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 90)
----
3
93

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_715
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_715
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 90 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_715 UNION ALL SELECT pk, col0 FROM view_2_tab1_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 90 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_715 UNION SELECT pk, col0 FROM view_2_tab1_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 90 ) AS tab1_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col0 <= 90
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_715

statement ok
DROP VIEW view_2_tab1_715

statement ok
DROP VIEW view_3_tab1_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_715') DROP VIEW view_1_tab2_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_715') DROP VIEW view_2_tab2_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_715') DROP VIEW view_3_tab2_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_715

statement ok
CREATE VIEW view_1_tab2_715 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 90

statement ok
CREATE VIEW view_2_tab2_715 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 90)

statement ok
CREATE VIEW view_3_tab2_715 AS SELECT pk FROM view_1_tab2_715

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 90
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 90)
----
3
93

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_715
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_715
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 90 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_715 UNION ALL SELECT pk, col0 FROM view_2_tab2_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 90 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_715 UNION SELECT pk, col0 FROM view_2_tab2_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 90 ) AS tab2_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col0 <= 90
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_715

statement ok
DROP VIEW view_2_tab2_715

statement ok
DROP VIEW view_3_tab2_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_715') DROP VIEW view_1_tab3_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_715') DROP VIEW view_2_tab3_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_715') DROP VIEW view_3_tab3_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_715

statement ok
CREATE VIEW view_1_tab3_715 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 90

statement ok
CREATE VIEW view_2_tab3_715 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 90)

statement ok
CREATE VIEW view_3_tab3_715 AS SELECT pk FROM view_1_tab3_715

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 90
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 90)
----
3
93

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_715
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_715
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 90 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_715 UNION ALL SELECT pk, col0 FROM view_2_tab3_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 90 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_715 UNION SELECT pk, col0 FROM view_2_tab3_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 90 ) AS tab3_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col0 <= 90
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_715

statement ok
DROP VIEW view_2_tab3_715

statement ok
DROP VIEW view_3_tab3_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_715') DROP VIEW view_1_tab4_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_715') DROP VIEW view_2_tab4_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_715') DROP VIEW view_3_tab4_715

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_715

statement ok
CREATE VIEW view_1_tab4_715 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 90

statement ok
CREATE VIEW view_2_tab4_715 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 90)

statement ok
CREATE VIEW view_3_tab4_715 AS SELECT pk FROM view_1_tab4_715

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 90
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 90)
----
3
93

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_715
----
18 values hashing to 2427e1a06ff97facf72f6d100b0cf719

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_715
----
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 90 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_715 UNION ALL SELECT pk, col0 FROM view_2_tab4_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 90 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_715 UNION SELECT pk, col0 FROM view_2_tab4_715
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 90 ) AS tab4_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_715
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col0 <= 90
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_715

statement ok
DROP VIEW view_2_tab4_715

statement ok
DROP VIEW view_3_tab4_715

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_716') DROP VIEW view_1_tab0_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_716') DROP VIEW view_2_tab0_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_716') DROP VIEW view_3_tab0_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_716

statement ok
CREATE VIEW view_1_tab0_716 AS SELECT pk, col0 FROM tab0 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))

statement ok
CREATE VIEW view_2_tab0_716 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))

statement ok
CREATE VIEW view_3_tab0_716 AS SELECT pk FROM view_1_tab0_716

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
2
85
3
93

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_716
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_716
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_716 UNION ALL SELECT pk, col0 FROM view_2_tab0_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_716 UNION SELECT pk, col0 FROM view_2_tab0_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) ) AS tab0_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_716

statement ok
DROP VIEW view_2_tab0_716

statement ok
DROP VIEW view_3_tab0_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_716') DROP VIEW view_1_tab1_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_716') DROP VIEW view_2_tab1_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_716') DROP VIEW view_3_tab1_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_716

statement ok
CREATE VIEW view_1_tab1_716 AS SELECT pk, col0 FROM tab1 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))

statement ok
CREATE VIEW view_2_tab1_716 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))

statement ok
CREATE VIEW view_3_tab1_716 AS SELECT pk FROM view_1_tab1_716

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
2
85
3
93

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_716
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_716
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_716 UNION ALL SELECT pk, col0 FROM view_2_tab1_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_716 UNION SELECT pk, col0 FROM view_2_tab1_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) ) AS tab1_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_716

statement ok
DROP VIEW view_2_tab1_716

statement ok
DROP VIEW view_3_tab1_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_716') DROP VIEW view_1_tab2_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_716') DROP VIEW view_2_tab2_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_716') DROP VIEW view_3_tab2_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_716

statement ok
CREATE VIEW view_1_tab2_716 AS SELECT pk, col0 FROM tab2 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))

statement ok
CREATE VIEW view_2_tab2_716 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))

statement ok
CREATE VIEW view_3_tab2_716 AS SELECT pk FROM view_1_tab2_716

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
2
85
3
93

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_716
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_716
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_716 UNION ALL SELECT pk, col0 FROM view_2_tab2_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_716 UNION SELECT pk, col0 FROM view_2_tab2_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) ) AS tab2_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_716

statement ok
DROP VIEW view_2_tab2_716

statement ok
DROP VIEW view_3_tab2_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_716') DROP VIEW view_1_tab3_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_716') DROP VIEW view_2_tab3_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_716') DROP VIEW view_3_tab3_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_716

statement ok
CREATE VIEW view_1_tab3_716 AS SELECT pk, col0 FROM tab3 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))

statement ok
CREATE VIEW view_2_tab3_716 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))

statement ok
CREATE VIEW view_3_tab3_716 AS SELECT pk FROM view_1_tab3_716

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
2
85
3
93

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_716
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_716
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_716 UNION ALL SELECT pk, col0 FROM view_2_tab3_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_716 UNION SELECT pk, col0 FROM view_2_tab3_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) ) AS tab3_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_716

statement ok
DROP VIEW view_2_tab3_716

statement ok
DROP VIEW view_3_tab3_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_716') DROP VIEW view_1_tab4_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_716') DROP VIEW view_2_tab4_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_716') DROP VIEW view_3_tab4_716

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_716

statement ok
CREATE VIEW view_1_tab4_716 AS SELECT pk, col0 FROM tab4 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))

statement ok
CREATE VIEW view_2_tab4_716 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))

statement ok
CREATE VIEW view_3_tab4_716 AS SELECT pk FROM view_1_tab4_716

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
2
85
3
93

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_716
----
16 values hashing to 948a388ebdb7c808733eb78b29713187

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_716
----
2
85
3
93

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_716 UNION ALL SELECT pk, col0 FROM view_2_tab4_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_716 UNION SELECT pk, col0 FROM view_2_tab4_716
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61))) ) AS tab4_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_716
----
0
1
4
5
6
7
8
9

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE (((col3 > 0) AND col4 IN (83.89,16.7,67.35,75.98) OR col1 < 24.18 OR ((col3 >= 63) OR col0 < 61)))
----
0
1
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_716

statement ok
DROP VIEW view_2_tab4_716

statement ok
DROP VIEW view_3_tab4_716

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_717') DROP VIEW view_1_tab0_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_717') DROP VIEW view_2_tab0_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_717') DROP VIEW view_3_tab0_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_717

statement ok
CREATE VIEW view_1_tab0_717 AS SELECT pk, col0 FROM tab0 WHERE col3 = 26

statement ok
CREATE VIEW view_2_tab0_717 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 26)

statement ok
CREATE VIEW view_3_tab0_717 AS SELECT pk FROM view_1_tab0_717

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE col3 = 26
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_717
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 26 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_717 UNION ALL SELECT pk, col0 FROM view_2_tab0_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 26 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_717 UNION SELECT pk, col0 FROM view_2_tab0_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 26 ) AS tab0_717
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_717
----

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE col3 = 26
----

statement ok
DROP VIEW view_1_tab0_717

statement ok
DROP VIEW view_2_tab0_717

statement ok
DROP VIEW view_3_tab0_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_717') DROP VIEW view_1_tab1_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_717') DROP VIEW view_2_tab1_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_717') DROP VIEW view_3_tab1_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_717

statement ok
CREATE VIEW view_1_tab1_717 AS SELECT pk, col0 FROM tab1 WHERE col3 = 26

statement ok
CREATE VIEW view_2_tab1_717 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 26)

statement ok
CREATE VIEW view_3_tab1_717 AS SELECT pk FROM view_1_tab1_717

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE col3 = 26
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_717
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 26 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_717 UNION ALL SELECT pk, col0 FROM view_2_tab1_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 26 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_717 UNION SELECT pk, col0 FROM view_2_tab1_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 26 ) AS tab1_717
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_717
----

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE col3 = 26
----

statement ok
DROP VIEW view_1_tab1_717

statement ok
DROP VIEW view_2_tab1_717

statement ok
DROP VIEW view_3_tab1_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_717') DROP VIEW view_1_tab2_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_717') DROP VIEW view_2_tab2_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_717') DROP VIEW view_3_tab2_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_717

statement ok
CREATE VIEW view_1_tab2_717 AS SELECT pk, col0 FROM tab2 WHERE col3 = 26

statement ok
CREATE VIEW view_2_tab2_717 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 26)

statement ok
CREATE VIEW view_3_tab2_717 AS SELECT pk FROM view_1_tab2_717

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE col3 = 26
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_717
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 26 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_717 UNION ALL SELECT pk, col0 FROM view_2_tab2_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 26 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_717 UNION SELECT pk, col0 FROM view_2_tab2_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 26 ) AS tab2_717
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_717
----

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE col3 = 26
----

statement ok
DROP VIEW view_1_tab2_717

statement ok
DROP VIEW view_2_tab2_717

statement ok
DROP VIEW view_3_tab2_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_717') DROP VIEW view_1_tab3_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_717') DROP VIEW view_2_tab3_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_717') DROP VIEW view_3_tab3_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_717

statement ok
CREATE VIEW view_1_tab3_717 AS SELECT pk, col0 FROM tab3 WHERE col3 = 26

statement ok
CREATE VIEW view_2_tab3_717 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 26)

statement ok
CREATE VIEW view_3_tab3_717 AS SELECT pk FROM view_1_tab3_717

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE col3 = 26
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_717
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 26 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_717 UNION ALL SELECT pk, col0 FROM view_2_tab3_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 26 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_717 UNION SELECT pk, col0 FROM view_2_tab3_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 26 ) AS tab3_717
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_717
----

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE col3 = 26
----

statement ok
DROP VIEW view_1_tab3_717

statement ok
DROP VIEW view_2_tab3_717

statement ok
DROP VIEW view_3_tab3_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_717') DROP VIEW view_1_tab4_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_717') DROP VIEW view_2_tab4_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_717') DROP VIEW view_3_tab4_717

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_717

statement ok
CREATE VIEW view_1_tab4_717 AS SELECT pk, col0 FROM tab4 WHERE col3 = 26

statement ok
CREATE VIEW view_2_tab4_717 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 26)

statement ok
CREATE VIEW view_3_tab4_717 AS SELECT pk FROM view_1_tab4_717

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE col3 = 26
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_717
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 26 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_717 UNION ALL SELECT pk, col0 FROM view_2_tab4_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 26 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 26)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_717 UNION SELECT pk, col0 FROM view_2_tab4_717
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 26 ) AS tab4_717
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_717
----

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE col3 = 26
----

statement ok
DROP VIEW view_1_tab4_717

statement ok
DROP VIEW view_2_tab4_717

statement ok
DROP VIEW view_3_tab4_717

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_718') DROP VIEW view_1_tab0_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_718') DROP VIEW view_2_tab0_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_718') DROP VIEW view_3_tab0_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_718

statement ok
CREATE VIEW view_1_tab0_718 AS SELECT pk, col0 FROM tab0 WHERE col0 < 41

statement ok
CREATE VIEW view_2_tab0_718 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41)

statement ok
CREATE VIEW view_3_tab0_718 AS SELECT pk FROM view_1_tab0_718

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE col0 < 41
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41)
----
0
48
2
85
3
93
4
44

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_718
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_718
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 41 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_718 UNION ALL SELECT pk, col0 FROM view_2_tab0_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 41 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_718 UNION SELECT pk, col0 FROM view_2_tab0_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 41 ) AS tab0_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE col0 < 41
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_718

statement ok
DROP VIEW view_2_tab0_718

statement ok
DROP VIEW view_3_tab0_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_718') DROP VIEW view_1_tab1_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_718') DROP VIEW view_2_tab1_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_718') DROP VIEW view_3_tab1_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_718

statement ok
CREATE VIEW view_1_tab1_718 AS SELECT pk, col0 FROM tab1 WHERE col0 < 41

statement ok
CREATE VIEW view_2_tab1_718 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41)

statement ok
CREATE VIEW view_3_tab1_718 AS SELECT pk FROM view_1_tab1_718

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE col0 < 41
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41)
----
0
48
2
85
3
93
4
44

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_718
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_718
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 41 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_718 UNION ALL SELECT pk, col0 FROM view_2_tab1_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 41 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_718 UNION SELECT pk, col0 FROM view_2_tab1_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 41 ) AS tab1_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE col0 < 41
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_718

statement ok
DROP VIEW view_2_tab1_718

statement ok
DROP VIEW view_3_tab1_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_718') DROP VIEW view_1_tab2_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_718') DROP VIEW view_2_tab2_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_718') DROP VIEW view_3_tab2_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_718

statement ok
CREATE VIEW view_1_tab2_718 AS SELECT pk, col0 FROM tab2 WHERE col0 < 41

statement ok
CREATE VIEW view_2_tab2_718 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41)

statement ok
CREATE VIEW view_3_tab2_718 AS SELECT pk FROM view_1_tab2_718

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE col0 < 41
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41)
----
0
48
2
85
3
93
4
44

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_718
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_718
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 41 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_718 UNION ALL SELECT pk, col0 FROM view_2_tab2_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 41 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_718 UNION SELECT pk, col0 FROM view_2_tab2_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 41 ) AS tab2_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE col0 < 41
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_718

statement ok
DROP VIEW view_2_tab2_718

statement ok
DROP VIEW view_3_tab2_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_718') DROP VIEW view_1_tab3_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_718') DROP VIEW view_2_tab3_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_718') DROP VIEW view_3_tab3_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_718

statement ok
CREATE VIEW view_1_tab3_718 AS SELECT pk, col0 FROM tab3 WHERE col0 < 41

statement ok
CREATE VIEW view_2_tab3_718 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41)

statement ok
CREATE VIEW view_3_tab3_718 AS SELECT pk FROM view_1_tab3_718

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE col0 < 41
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41)
----
0
48
2
85
3
93
4
44

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_718
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_718
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 41 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_718 UNION ALL SELECT pk, col0 FROM view_2_tab3_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 41 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_718 UNION SELECT pk, col0 FROM view_2_tab3_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 41 ) AS tab3_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE col0 < 41
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_718

statement ok
DROP VIEW view_2_tab3_718

statement ok
DROP VIEW view_3_tab3_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_718') DROP VIEW view_1_tab4_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_718') DROP VIEW view_2_tab4_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_718') DROP VIEW view_3_tab4_718

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_718

statement ok
CREATE VIEW view_1_tab4_718 AS SELECT pk, col0 FROM tab4 WHERE col0 < 41

statement ok
CREATE VIEW view_2_tab4_718 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41)

statement ok
CREATE VIEW view_3_tab4_718 AS SELECT pk FROM view_1_tab4_718

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE col0 < 41
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41)
----
0
48
2
85
3
93
4
44

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_718
----
12 values hashing to 8d3b4a45b79d6b8c78a74a3042c23510

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_718
----
0
48
2
85
3
93
4
44

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 41 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_718 UNION ALL SELECT pk, col0 FROM view_2_tab4_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 41 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_718 UNION SELECT pk, col0 FROM view_2_tab4_718
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 41 ) AS tab4_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_718
----
1
5
6
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE col0 < 41
----
1
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_718

statement ok
DROP VIEW view_2_tab4_718

statement ok
DROP VIEW view_3_tab4_718

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_719') DROP VIEW view_1_tab0_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_719') DROP VIEW view_2_tab0_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_719') DROP VIEW view_3_tab0_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_719

statement ok
CREATE VIEW view_1_tab0_719 AS SELECT pk, col0 FROM tab0 WHERE col3 > 96

statement ok
CREATE VIEW view_2_tab0_719 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 96)

statement ok
CREATE VIEW view_3_tab0_719 AS SELECT pk FROM view_1_tab0_719

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE col3 > 96
----

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_719
----

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 96 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_719 UNION ALL SELECT pk, col0 FROM view_2_tab0_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 96 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_719 UNION SELECT pk, col0 FROM view_2_tab0_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 96 ) AS tab0_719
----

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_719
----

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE col3 > 96
----

statement ok
DROP VIEW view_1_tab0_719

statement ok
DROP VIEW view_2_tab0_719

statement ok
DROP VIEW view_3_tab0_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_719') DROP VIEW view_1_tab1_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_719') DROP VIEW view_2_tab1_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_719') DROP VIEW view_3_tab1_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_719

statement ok
CREATE VIEW view_1_tab1_719 AS SELECT pk, col0 FROM tab1 WHERE col3 > 96

statement ok
CREATE VIEW view_2_tab1_719 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 96)

statement ok
CREATE VIEW view_3_tab1_719 AS SELECT pk FROM view_1_tab1_719

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE col3 > 96
----

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_719
----

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 96 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_719 UNION ALL SELECT pk, col0 FROM view_2_tab1_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 96 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_719 UNION SELECT pk, col0 FROM view_2_tab1_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 96 ) AS tab1_719
----

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_719
----

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE col3 > 96
----

statement ok
DROP VIEW view_1_tab1_719

statement ok
DROP VIEW view_2_tab1_719

statement ok
DROP VIEW view_3_tab1_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_719') DROP VIEW view_1_tab2_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_719') DROP VIEW view_2_tab2_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_719') DROP VIEW view_3_tab2_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_719

statement ok
CREATE VIEW view_1_tab2_719 AS SELECT pk, col0 FROM tab2 WHERE col3 > 96

statement ok
CREATE VIEW view_2_tab2_719 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 96)

statement ok
CREATE VIEW view_3_tab2_719 AS SELECT pk FROM view_1_tab2_719

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE col3 > 96
----

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_719
----

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 96 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_719 UNION ALL SELECT pk, col0 FROM view_2_tab2_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 96 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_719 UNION SELECT pk, col0 FROM view_2_tab2_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 96 ) AS tab2_719
----

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_719
----

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE col3 > 96
----

statement ok
DROP VIEW view_1_tab2_719

statement ok
DROP VIEW view_2_tab2_719

statement ok
DROP VIEW view_3_tab2_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_719') DROP VIEW view_1_tab3_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_719') DROP VIEW view_2_tab3_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_719') DROP VIEW view_3_tab3_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_719

statement ok
CREATE VIEW view_1_tab3_719 AS SELECT pk, col0 FROM tab3 WHERE col3 > 96

statement ok
CREATE VIEW view_2_tab3_719 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 96)

statement ok
CREATE VIEW view_3_tab3_719 AS SELECT pk FROM view_1_tab3_719

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE col3 > 96
----

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_719
----

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 96 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_719 UNION ALL SELECT pk, col0 FROM view_2_tab3_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 96 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_719 UNION SELECT pk, col0 FROM view_2_tab3_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 96 ) AS tab3_719
----

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_719
----

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE col3 > 96
----

statement ok
DROP VIEW view_1_tab3_719

statement ok
DROP VIEW view_2_tab3_719

statement ok
DROP VIEW view_3_tab3_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_719') DROP VIEW view_1_tab4_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_719') DROP VIEW view_2_tab4_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_719') DROP VIEW view_3_tab4_719

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_719

statement ok
CREATE VIEW view_1_tab4_719 AS SELECT pk, col0 FROM tab4 WHERE col3 > 96

statement ok
CREATE VIEW view_2_tab4_719 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 96)

statement ok
CREATE VIEW view_3_tab4_719 AS SELECT pk FROM view_1_tab4_719

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE col3 > 96
----

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_719
----

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 96 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_719 UNION ALL SELECT pk, col0 FROM view_2_tab4_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 96 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_719 UNION SELECT pk, col0 FROM view_2_tab4_719
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 96 ) AS tab4_719
----

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_719
----

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE col3 > 96
----

statement ok
DROP VIEW view_1_tab4_719

statement ok
DROP VIEW view_2_tab4_719

statement ok
DROP VIEW view_3_tab4_719

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_720') DROP VIEW view_1_tab0_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_720') DROP VIEW view_2_tab0_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_720') DROP VIEW view_3_tab0_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_720

statement ok
CREATE VIEW view_1_tab0_720 AS SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))

statement ok
CREATE VIEW view_2_tab0_720 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))

statement ok
CREATE VIEW view_3_tab0_720 AS SELECT pk FROM view_1_tab0_720

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_720
----

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_720 UNION ALL SELECT pk, col0 FROM view_2_tab0_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_720 UNION SELECT pk, col0 FROM view_2_tab0_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) ) AS tab0_720
----

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_720
----

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

statement ok
DROP VIEW view_1_tab0_720

statement ok
DROP VIEW view_2_tab0_720

statement ok
DROP VIEW view_3_tab0_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_720') DROP VIEW view_1_tab1_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_720') DROP VIEW view_2_tab1_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_720') DROP VIEW view_3_tab1_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_720

statement ok
CREATE VIEW view_1_tab1_720 AS SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))

statement ok
CREATE VIEW view_2_tab1_720 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))

statement ok
CREATE VIEW view_3_tab1_720 AS SELECT pk FROM view_1_tab1_720

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_720
----

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_720 UNION ALL SELECT pk, col0 FROM view_2_tab1_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_720 UNION SELECT pk, col0 FROM view_2_tab1_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) ) AS tab1_720
----

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_720
----

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

statement ok
DROP VIEW view_1_tab1_720

statement ok
DROP VIEW view_2_tab1_720

statement ok
DROP VIEW view_3_tab1_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_720') DROP VIEW view_1_tab2_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_720') DROP VIEW view_2_tab2_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_720') DROP VIEW view_3_tab2_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_720

statement ok
CREATE VIEW view_1_tab2_720 AS SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))

statement ok
CREATE VIEW view_2_tab2_720 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))

statement ok
CREATE VIEW view_3_tab2_720 AS SELECT pk FROM view_1_tab2_720

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_720
----

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_720 UNION ALL SELECT pk, col0 FROM view_2_tab2_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_720 UNION SELECT pk, col0 FROM view_2_tab2_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) ) AS tab2_720
----

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_720
----

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

statement ok
DROP VIEW view_1_tab2_720

statement ok
DROP VIEW view_2_tab2_720

statement ok
DROP VIEW view_3_tab2_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_720') DROP VIEW view_1_tab3_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_720') DROP VIEW view_2_tab3_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_720') DROP VIEW view_3_tab3_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_720

statement ok
CREATE VIEW view_1_tab3_720 AS SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))

statement ok
CREATE VIEW view_2_tab3_720 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))

statement ok
CREATE VIEW view_3_tab3_720 AS SELECT pk FROM view_1_tab3_720

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_720
----

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_720 UNION ALL SELECT pk, col0 FROM view_2_tab3_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_720 UNION SELECT pk, col0 FROM view_2_tab3_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) ) AS tab3_720
----

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_720
----

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

statement ok
DROP VIEW view_1_tab3_720

statement ok
DROP VIEW view_2_tab3_720

statement ok
DROP VIEW view_3_tab3_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_720') DROP VIEW view_1_tab4_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_720') DROP VIEW view_2_tab4_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_720') DROP VIEW view_3_tab4_720

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_720

statement ok
CREATE VIEW view_1_tab4_720 AS SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))

statement ok
CREATE VIEW view_2_tab4_720 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))

statement ok
CREATE VIEW view_3_tab4_720 AS SELECT pk FROM view_1_tab4_720

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_720
----

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_720 UNION ALL SELECT pk, col0 FROM view_2_tab4_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_720 UNION SELECT pk, col0 FROM view_2_tab4_720
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1))) ) AS tab4_720
----

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_720
----

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE col3 IS NULL OR (col3 <= 26 AND (col0 IN (54,39,78,36,20,1)))
----

statement ok
DROP VIEW view_1_tab4_720

statement ok
DROP VIEW view_2_tab4_720

statement ok
DROP VIEW view_3_tab4_720

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_721') DROP VIEW view_1_tab0_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_721') DROP VIEW view_2_tab0_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_721') DROP VIEW view_3_tab0_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_721

statement ok
CREATE VIEW view_1_tab0_721 AS SELECT pk, col0 FROM tab0 WHERE ((col4 <= 20.52))

statement ok
CREATE VIEW view_2_tab0_721 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 20.52)))

statement ok
CREATE VIEW view_3_tab0_721 AS SELECT pk FROM view_1_tab0_721

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 20.52))
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_721
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 20.52)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_721 UNION ALL SELECT pk, col0 FROM view_2_tab0_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 20.52)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_721 UNION SELECT pk, col0 FROM view_2_tab0_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 <= 20.52)) ) AS tab0_721
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_721
----

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE ((col4 <= 20.52))
----

statement ok
DROP VIEW view_1_tab0_721

statement ok
DROP VIEW view_2_tab0_721

statement ok
DROP VIEW view_3_tab0_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_721') DROP VIEW view_1_tab1_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_721') DROP VIEW view_2_tab1_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_721') DROP VIEW view_3_tab1_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_721

statement ok
CREATE VIEW view_1_tab1_721 AS SELECT pk, col0 FROM tab1 WHERE ((col4 <= 20.52))

statement ok
CREATE VIEW view_2_tab1_721 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 20.52)))

statement ok
CREATE VIEW view_3_tab1_721 AS SELECT pk FROM view_1_tab1_721

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 20.52))
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_721
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 20.52)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_721 UNION ALL SELECT pk, col0 FROM view_2_tab1_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 20.52)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_721 UNION SELECT pk, col0 FROM view_2_tab1_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 <= 20.52)) ) AS tab1_721
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_721
----

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE ((col4 <= 20.52))
----

statement ok
DROP VIEW view_1_tab1_721

statement ok
DROP VIEW view_2_tab1_721

statement ok
DROP VIEW view_3_tab1_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_721') DROP VIEW view_1_tab2_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_721') DROP VIEW view_2_tab2_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_721') DROP VIEW view_3_tab2_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_721

statement ok
CREATE VIEW view_1_tab2_721 AS SELECT pk, col0 FROM tab2 WHERE ((col4 <= 20.52))

statement ok
CREATE VIEW view_2_tab2_721 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 20.52)))

statement ok
CREATE VIEW view_3_tab2_721 AS SELECT pk FROM view_1_tab2_721

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 20.52))
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_721
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 20.52)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_721 UNION ALL SELECT pk, col0 FROM view_2_tab2_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 20.52)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_721 UNION SELECT pk, col0 FROM view_2_tab2_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 <= 20.52)) ) AS tab2_721
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_721
----

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE ((col4 <= 20.52))
----

statement ok
DROP VIEW view_1_tab2_721

statement ok
DROP VIEW view_2_tab2_721

statement ok
DROP VIEW view_3_tab2_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_721') DROP VIEW view_1_tab3_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_721') DROP VIEW view_2_tab3_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_721') DROP VIEW view_3_tab3_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_721

statement ok
CREATE VIEW view_1_tab3_721 AS SELECT pk, col0 FROM tab3 WHERE ((col4 <= 20.52))

statement ok
CREATE VIEW view_2_tab3_721 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 20.52)))

statement ok
CREATE VIEW view_3_tab3_721 AS SELECT pk FROM view_1_tab3_721

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 20.52))
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_721
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 20.52)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_721 UNION ALL SELECT pk, col0 FROM view_2_tab3_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 20.52)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_721 UNION SELECT pk, col0 FROM view_2_tab3_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 <= 20.52)) ) AS tab3_721
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_721
----

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE ((col4 <= 20.52))
----

statement ok
DROP VIEW view_1_tab3_721

statement ok
DROP VIEW view_2_tab3_721

statement ok
DROP VIEW view_3_tab3_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_721') DROP VIEW view_1_tab4_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_721') DROP VIEW view_2_tab4_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_721') DROP VIEW view_3_tab4_721

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_721

statement ok
CREATE VIEW view_1_tab4_721 AS SELECT pk, col0 FROM tab4 WHERE ((col4 <= 20.52))

statement ok
CREATE VIEW view_2_tab4_721 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 20.52)))

statement ok
CREATE VIEW view_3_tab4_721 AS SELECT pk FROM view_1_tab4_721

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 20.52))
----

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_721
----

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 20.52)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_721 UNION ALL SELECT pk, col0 FROM view_2_tab4_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 20.52)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 20.52)))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_721 UNION SELECT pk, col0 FROM view_2_tab4_721
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 <= 20.52)) ) AS tab4_721
----

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_721
----

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE ((col4 <= 20.52))
----

statement ok
DROP VIEW view_1_tab4_721

statement ok
DROP VIEW view_2_tab4_721

statement ok
DROP VIEW view_3_tab4_721

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_722') DROP VIEW view_1_tab0_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_722') DROP VIEW view_2_tab0_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_722') DROP VIEW view_3_tab0_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_722

statement ok
CREATE VIEW view_1_tab0_722 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))

statement ok
CREATE VIEW view_2_tab0_722 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))

statement ok
CREATE VIEW view_3_tab0_722 AS SELECT pk FROM view_1_tab0_722

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
1
2
2
85
9
32

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_722
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_722
----
1
2
2
85
9
32

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_722 UNION ALL SELECT pk, col0 FROM view_2_tab0_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_722 UNION SELECT pk, col0 FROM view_2_tab0_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) ) AS tab0_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
0
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_722

statement ok
DROP VIEW view_2_tab0_722

statement ok
DROP VIEW view_3_tab0_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_722') DROP VIEW view_1_tab1_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_722') DROP VIEW view_2_tab1_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_722') DROP VIEW view_3_tab1_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_722

statement ok
CREATE VIEW view_1_tab1_722 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))

statement ok
CREATE VIEW view_2_tab1_722 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))

statement ok
CREATE VIEW view_3_tab1_722 AS SELECT pk FROM view_1_tab1_722

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
1
2
2
85
9
32

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_722
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_722
----
1
2
2
85
9
32

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_722 UNION ALL SELECT pk, col0 FROM view_2_tab1_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_722 UNION SELECT pk, col0 FROM view_2_tab1_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) ) AS tab1_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
0
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_722

statement ok
DROP VIEW view_2_tab1_722

statement ok
DROP VIEW view_3_tab1_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_722') DROP VIEW view_1_tab2_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_722') DROP VIEW view_2_tab2_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_722') DROP VIEW view_3_tab2_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_722

statement ok
CREATE VIEW view_1_tab2_722 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))

statement ok
CREATE VIEW view_2_tab2_722 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))

statement ok
CREATE VIEW view_3_tab2_722 AS SELECT pk FROM view_1_tab2_722

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
1
2
2
85
9
32

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_722
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_722
----
1
2
2
85
9
32

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_722 UNION ALL SELECT pk, col0 FROM view_2_tab2_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_722 UNION SELECT pk, col0 FROM view_2_tab2_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) ) AS tab2_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
0
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_722

statement ok
DROP VIEW view_2_tab2_722

statement ok
DROP VIEW view_3_tab2_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_722') DROP VIEW view_1_tab3_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_722') DROP VIEW view_2_tab3_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_722') DROP VIEW view_3_tab3_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_722

statement ok
CREATE VIEW view_1_tab3_722 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))

statement ok
CREATE VIEW view_2_tab3_722 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))

statement ok
CREATE VIEW view_3_tab3_722 AS SELECT pk FROM view_1_tab3_722

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
1
2
2
85
9
32

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_722
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_722
----
1
2
2
85
9
32

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_722 UNION ALL SELECT pk, col0 FROM view_2_tab3_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_722 UNION SELECT pk, col0 FROM view_2_tab3_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) ) AS tab3_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
0
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_722

statement ok
DROP VIEW view_2_tab3_722

statement ok
DROP VIEW view_3_tab3_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_722') DROP VIEW view_1_tab4_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_722') DROP VIEW view_2_tab4_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_722') DROP VIEW view_3_tab4_722

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_722

statement ok
CREATE VIEW view_1_tab4_722 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))

statement ok
CREATE VIEW view_2_tab4_722 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))

statement ok
CREATE VIEW view_3_tab4_722 AS SELECT pk FROM view_1_tab4_722

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
1
2
2
85
9
32

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_722
----
14 values hashing to 1042301cb401b4efdc7df79b1d244d37

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_722
----
1
2
2
85
9
32

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_722 UNION ALL SELECT pk, col0 FROM view_2_tab4_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_722 UNION SELECT pk, col0 FROM view_2_tab4_722
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52)))) ) AS tab4_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_722
----
0
3
4
5
6
7
8

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE (col3 >= 70 OR ((col3 <= 46 OR col0 IN (50,97,52))))
----
0
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_722

statement ok
DROP VIEW view_2_tab4_722

statement ok
DROP VIEW view_3_tab4_722

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_723') DROP VIEW view_1_tab0_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_723') DROP VIEW view_2_tab0_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_723') DROP VIEW view_3_tab0_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_723

statement ok
CREATE VIEW view_1_tab0_723 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 69

statement ok
CREATE VIEW view_2_tab0_723 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 69)

statement ok
CREATE VIEW view_3_tab0_723 AS SELECT pk FROM view_1_tab0_723

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 69
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 69)
----
8
23

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_723
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_723
----
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_723 UNION ALL SELECT pk, col0 FROM view_2_tab0_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_723 UNION SELECT pk, col0 FROM view_2_tab0_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 69 ) AS tab0_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE col3 <= 69
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_723

statement ok
DROP VIEW view_2_tab0_723

statement ok
DROP VIEW view_3_tab0_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_723') DROP VIEW view_1_tab1_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_723') DROP VIEW view_2_tab1_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_723') DROP VIEW view_3_tab1_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_723

statement ok
CREATE VIEW view_1_tab1_723 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 69

statement ok
CREATE VIEW view_2_tab1_723 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 69)

statement ok
CREATE VIEW view_3_tab1_723 AS SELECT pk FROM view_1_tab1_723

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 69
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 69)
----
8
23

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_723
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_723
----
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_723 UNION ALL SELECT pk, col0 FROM view_2_tab1_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_723 UNION SELECT pk, col0 FROM view_2_tab1_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 69 ) AS tab1_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE col3 <= 69
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_723

statement ok
DROP VIEW view_2_tab1_723

statement ok
DROP VIEW view_3_tab1_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_723') DROP VIEW view_1_tab2_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_723') DROP VIEW view_2_tab2_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_723') DROP VIEW view_3_tab2_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_723

statement ok
CREATE VIEW view_1_tab2_723 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 69

statement ok
CREATE VIEW view_2_tab2_723 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 69)

statement ok
CREATE VIEW view_3_tab2_723 AS SELECT pk FROM view_1_tab2_723

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 69
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 69)
----
8
23

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_723
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_723
----
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_723 UNION ALL SELECT pk, col0 FROM view_2_tab2_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_723 UNION SELECT pk, col0 FROM view_2_tab2_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 69 ) AS tab2_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE col3 <= 69
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_723

statement ok
DROP VIEW view_2_tab2_723

statement ok
DROP VIEW view_3_tab2_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_723') DROP VIEW view_1_tab3_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_723') DROP VIEW view_2_tab3_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_723') DROP VIEW view_3_tab3_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_723

statement ok
CREATE VIEW view_1_tab3_723 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 69

statement ok
CREATE VIEW view_2_tab3_723 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 69)

statement ok
CREATE VIEW view_3_tab3_723 AS SELECT pk FROM view_1_tab3_723

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 69
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 69)
----
8
23

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_723
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_723
----
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_723 UNION ALL SELECT pk, col0 FROM view_2_tab3_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_723 UNION SELECT pk, col0 FROM view_2_tab3_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 69 ) AS tab3_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE col3 <= 69
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_723

statement ok
DROP VIEW view_2_tab3_723

statement ok
DROP VIEW view_3_tab3_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_723') DROP VIEW view_1_tab4_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_723') DROP VIEW view_2_tab4_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_723') DROP VIEW view_3_tab4_723

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_723

statement ok
CREATE VIEW view_1_tab4_723 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 69

statement ok
CREATE VIEW view_2_tab4_723 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 69)

statement ok
CREATE VIEW view_3_tab4_723 AS SELECT pk FROM view_1_tab4_723

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 69
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 69)
----
8
23

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_723
----
18 values hashing to adf4049cccd9a20663a8b38a6f5b49d8

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_723
----
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_723 UNION ALL SELECT pk, col0 FROM view_2_tab4_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 69)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_723 UNION SELECT pk, col0 FROM view_2_tab4_723
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 69 ) AS tab4_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT * FROM view_3_tab4_723
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-5900-3
SELECT pk FROM tab4 WHERE col3 <= 69
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_723

statement ok
DROP VIEW view_2_tab4_723

statement ok
DROP VIEW view_3_tab4_723

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_724') DROP VIEW view_1_tab0_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_724') DROP VIEW view_2_tab0_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_724') DROP VIEW view_3_tab0_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_724

statement ok
CREATE VIEW view_1_tab0_724 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 88

statement ok
CREATE VIEW view_2_tab0_724 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88)

statement ok
CREATE VIEW view_3_tab0_724 AS SELECT pk FROM view_1_tab0_724

query II rowsort label-6000-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 88
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88)
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab0_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab0_724
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 88 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_724 UNION ALL SELECT pk, col0 FROM view_2_tab0_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 88 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_724 UNION SELECT pk, col0 FROM view_2_tab0_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 88 ) AS tab0_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab0_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab0 WHERE col3 <= 88
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_724

statement ok
DROP VIEW view_2_tab0_724

statement ok
DROP VIEW view_3_tab0_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_724') DROP VIEW view_1_tab1_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_724') DROP VIEW view_2_tab1_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_724') DROP VIEW view_3_tab1_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_724

statement ok
CREATE VIEW view_1_tab1_724 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 88

statement ok
CREATE VIEW view_2_tab1_724 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88)

statement ok
CREATE VIEW view_3_tab1_724 AS SELECT pk FROM view_1_tab1_724

query II rowsort label-6000-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 88
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88)
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab1_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab1_724
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 88 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_724 UNION ALL SELECT pk, col0 FROM view_2_tab1_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 88 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_724 UNION SELECT pk, col0 FROM view_2_tab1_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 88 ) AS tab1_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab1_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab1 WHERE col3 <= 88
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_724

statement ok
DROP VIEW view_2_tab1_724

statement ok
DROP VIEW view_3_tab1_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_724') DROP VIEW view_1_tab2_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_724') DROP VIEW view_2_tab2_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_724') DROP VIEW view_3_tab2_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_724

statement ok
CREATE VIEW view_1_tab2_724 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 88

statement ok
CREATE VIEW view_2_tab2_724 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88)

statement ok
CREATE VIEW view_3_tab2_724 AS SELECT pk FROM view_1_tab2_724

query II rowsort label-6000-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 88
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88)
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab2_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab2_724
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 88 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_724 UNION ALL SELECT pk, col0 FROM view_2_tab2_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 88 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_724 UNION SELECT pk, col0 FROM view_2_tab2_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 88 ) AS tab2_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab2_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab2 WHERE col3 <= 88
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_724

statement ok
DROP VIEW view_2_tab2_724

statement ok
DROP VIEW view_3_tab2_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_724') DROP VIEW view_1_tab3_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_724') DROP VIEW view_2_tab3_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_724') DROP VIEW view_3_tab3_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_724

statement ok
CREATE VIEW view_1_tab3_724 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 88

statement ok
CREATE VIEW view_2_tab3_724 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88)

statement ok
CREATE VIEW view_3_tab3_724 AS SELECT pk FROM view_1_tab3_724

query II rowsort label-6000-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 88
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88)
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab3_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab3_724
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 88 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_724 UNION ALL SELECT pk, col0 FROM view_2_tab3_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 88 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_724 UNION SELECT pk, col0 FROM view_2_tab3_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 88 ) AS tab3_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab3_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab3 WHERE col3 <= 88
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_724

statement ok
DROP VIEW view_2_tab3_724

statement ok
DROP VIEW view_3_tab3_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_724') DROP VIEW view_1_tab4_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_724') DROP VIEW view_2_tab4_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_724') DROP VIEW view_3_tab4_724

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_724

statement ok
CREATE VIEW view_1_tab4_724 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 88

statement ok
CREATE VIEW view_2_tab4_724 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88)

statement ok
CREATE VIEW view_3_tab4_724 AS SELECT pk FROM view_1_tab4_724

query II rowsort label-6000-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 88
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88)
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab4_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab4_724
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 88 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_724 UNION ALL SELECT pk, col0 FROM view_2_tab4_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 88 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 88)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_724 UNION SELECT pk, col0 FROM view_2_tab4_724
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 88 ) AS tab4_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab4_724
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab4 WHERE col3 <= 88
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_724

statement ok
DROP VIEW view_2_tab4_724

statement ok
DROP VIEW view_3_tab4_724

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_725') DROP VIEW view_1_tab0_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_725') DROP VIEW view_2_tab0_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_725') DROP VIEW view_3_tab0_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_725

statement ok
CREATE VIEW view_1_tab0_725 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42

statement ok
CREATE VIEW view_2_tab0_725 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)

statement ok
CREATE VIEW view_3_tab0_725 AS SELECT pk FROM view_1_tab0_725

query II rowsort label-6100-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

query II rowsort label-6100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab0_725
----

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab0_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_725 UNION ALL SELECT pk, col0 FROM view_2_tab0_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_725 UNION SELECT pk, col0 FROM view_2_tab0_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 ) AS tab0_725
----

query I rowsort label-6100-3
SELECT * FROM view_3_tab0_725
----

query I rowsort label-6100-3
SELECT pk FROM tab0 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

statement ok
DROP VIEW view_1_tab0_725

statement ok
DROP VIEW view_2_tab0_725

statement ok
DROP VIEW view_3_tab0_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_725') DROP VIEW view_1_tab1_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_725') DROP VIEW view_2_tab1_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_725') DROP VIEW view_3_tab1_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_725

statement ok
CREATE VIEW view_1_tab1_725 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42

statement ok
CREATE VIEW view_2_tab1_725 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)

statement ok
CREATE VIEW view_3_tab1_725 AS SELECT pk FROM view_1_tab1_725

query II rowsort label-6100-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

query II rowsort label-6100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab1_725
----

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab1_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_725 UNION ALL SELECT pk, col0 FROM view_2_tab1_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_725 UNION SELECT pk, col0 FROM view_2_tab1_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 ) AS tab1_725
----

query I rowsort label-6100-3
SELECT * FROM view_3_tab1_725
----

query I rowsort label-6100-3
SELECT pk FROM tab1 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

statement ok
DROP VIEW view_1_tab1_725

statement ok
DROP VIEW view_2_tab1_725

statement ok
DROP VIEW view_3_tab1_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_725') DROP VIEW view_1_tab2_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_725') DROP VIEW view_2_tab2_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_725') DROP VIEW view_3_tab2_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_725

statement ok
CREATE VIEW view_1_tab2_725 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42

statement ok
CREATE VIEW view_2_tab2_725 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)

statement ok
CREATE VIEW view_3_tab2_725 AS SELECT pk FROM view_1_tab2_725

query II rowsort label-6100-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

query II rowsort label-6100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab2_725
----

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab2_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_725 UNION ALL SELECT pk, col0 FROM view_2_tab2_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_725 UNION SELECT pk, col0 FROM view_2_tab2_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 ) AS tab2_725
----

query I rowsort label-6100-3
SELECT * FROM view_3_tab2_725
----

query I rowsort label-6100-3
SELECT pk FROM tab2 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

statement ok
DROP VIEW view_1_tab2_725

statement ok
DROP VIEW view_2_tab2_725

statement ok
DROP VIEW view_3_tab2_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_725') DROP VIEW view_1_tab3_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_725') DROP VIEW view_2_tab3_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_725') DROP VIEW view_3_tab3_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_725

statement ok
CREATE VIEW view_1_tab3_725 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42

statement ok
CREATE VIEW view_2_tab3_725 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)

statement ok
CREATE VIEW view_3_tab3_725 AS SELECT pk FROM view_1_tab3_725

query II rowsort label-6100-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

query II rowsort label-6100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab3_725
----

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab3_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_725 UNION ALL SELECT pk, col0 FROM view_2_tab3_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_725 UNION SELECT pk, col0 FROM view_2_tab3_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 ) AS tab3_725
----

query I rowsort label-6100-3
SELECT * FROM view_3_tab3_725
----

query I rowsort label-6100-3
SELECT pk FROM tab3 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

statement ok
DROP VIEW view_1_tab3_725

statement ok
DROP VIEW view_2_tab3_725

statement ok
DROP VIEW view_3_tab3_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_725') DROP VIEW view_1_tab4_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_725') DROP VIEW view_2_tab4_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_725') DROP VIEW view_3_tab4_725

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_725

statement ok
CREATE VIEW view_1_tab4_725 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42

statement ok
CREATE VIEW view_2_tab4_725 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)

statement ok
CREATE VIEW view_3_tab4_725 AS SELECT pk FROM view_1_tab4_725

query II rowsort label-6100-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

query II rowsort label-6100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab4_725
----

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab4_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_725 UNION ALL SELECT pk, col0 FROM view_2_tab4_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_725 UNION SELECT pk, col0 FROM view_2_tab4_725
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42 ) AS tab4_725
----

query I rowsort label-6100-3
SELECT * FROM view_3_tab4_725
----

query I rowsort label-6100-3
SELECT pk FROM tab4 WHERE (col1 > 36.41) AND col4 IS NULL OR col0 > 86 AND col4 > 26.11 AND col0 > 63 AND col3 = 42
----

statement ok
DROP VIEW view_1_tab4_725

statement ok
DROP VIEW view_2_tab4_725

statement ok
DROP VIEW view_3_tab4_725

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_726') DROP VIEW view_1_tab0_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_726') DROP VIEW view_2_tab0_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_726') DROP VIEW view_3_tab0_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_726

statement ok
CREATE VIEW view_1_tab0_726 AS SELECT pk, col0 FROM tab0 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))

statement ok
CREATE VIEW view_2_tab0_726 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))

statement ok
CREATE VIEW view_3_tab0_726 AS SELECT pk FROM view_1_tab0_726

query II rowsort label-6200-1
SELECT pk, col0 FROM tab0 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab0_726
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab0_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_726 UNION ALL SELECT pk, col0 FROM view_2_tab0_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_726 UNION SELECT pk, col0 FROM view_2_tab0_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) ) AS tab0_726
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab0_726
----

query I rowsort label-6200-3
SELECT pk FROM tab0 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab0 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

statement ok
DROP VIEW view_1_tab0_726

statement ok
DROP VIEW view_2_tab0_726

statement ok
DROP VIEW view_3_tab0_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_726') DROP VIEW view_1_tab1_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_726') DROP VIEW view_2_tab1_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_726') DROP VIEW view_3_tab1_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_726

statement ok
CREATE VIEW view_1_tab1_726 AS SELECT pk, col0 FROM tab1 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))

statement ok
CREATE VIEW view_2_tab1_726 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))

statement ok
CREATE VIEW view_3_tab1_726 AS SELECT pk FROM view_1_tab1_726

query II rowsort label-6200-1
SELECT pk, col0 FROM tab1 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab1_726
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab1_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_726 UNION ALL SELECT pk, col0 FROM view_2_tab1_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_726 UNION SELECT pk, col0 FROM view_2_tab1_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) ) AS tab1_726
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab1_726
----

query I rowsort label-6200-3
SELECT pk FROM tab1 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab1 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

statement ok
DROP VIEW view_1_tab1_726

statement ok
DROP VIEW view_2_tab1_726

statement ok
DROP VIEW view_3_tab1_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_726') DROP VIEW view_1_tab2_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_726') DROP VIEW view_2_tab2_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_726') DROP VIEW view_3_tab2_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_726

statement ok
CREATE VIEW view_1_tab2_726 AS SELECT pk, col0 FROM tab2 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))

statement ok
CREATE VIEW view_2_tab2_726 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))

statement ok
CREATE VIEW view_3_tab2_726 AS SELECT pk FROM view_1_tab2_726

query II rowsort label-6200-1
SELECT pk, col0 FROM tab2 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab2_726
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab2_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_726 UNION ALL SELECT pk, col0 FROM view_2_tab2_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_726 UNION SELECT pk, col0 FROM view_2_tab2_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) ) AS tab2_726
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab2_726
----

query I rowsort label-6200-3
SELECT pk FROM tab2 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab2 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

statement ok
DROP VIEW view_1_tab2_726

statement ok
DROP VIEW view_2_tab2_726

statement ok
DROP VIEW view_3_tab2_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_726') DROP VIEW view_1_tab3_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_726') DROP VIEW view_2_tab3_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_726') DROP VIEW view_3_tab3_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_726

statement ok
CREATE VIEW view_1_tab3_726 AS SELECT pk, col0 FROM tab3 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))

statement ok
CREATE VIEW view_2_tab3_726 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))

statement ok
CREATE VIEW view_3_tab3_726 AS SELECT pk FROM view_1_tab3_726

query II rowsort label-6200-1
SELECT pk, col0 FROM tab3 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab3_726
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab3_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_726 UNION ALL SELECT pk, col0 FROM view_2_tab3_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_726 UNION SELECT pk, col0 FROM view_2_tab3_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) ) AS tab3_726
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab3_726
----

query I rowsort label-6200-3
SELECT pk FROM tab3 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab3 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

statement ok
DROP VIEW view_1_tab3_726

statement ok
DROP VIEW view_2_tab3_726

statement ok
DROP VIEW view_3_tab3_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_726') DROP VIEW view_1_tab4_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_726') DROP VIEW view_2_tab4_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_726') DROP VIEW view_3_tab4_726

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_726

statement ok
CREATE VIEW view_1_tab4_726 AS SELECT pk, col0 FROM tab4 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))

statement ok
CREATE VIEW view_2_tab4_726 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))

statement ok
CREATE VIEW view_3_tab4_726 AS SELECT pk FROM view_1_tab4_726

query II rowsort label-6200-1
SELECT pk, col0 FROM tab4 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab4_726
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab4_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_726 UNION ALL SELECT pk, col0 FROM view_2_tab4_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_726 UNION SELECT pk, col0 FROM view_2_tab4_726
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18))) ) AS tab4_726
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab4_726
----

query I rowsort label-6200-3
SELECT pk FROM tab4 WHERE col0 > 84 AND col4 <= 74.98 AND col1 IN (SELECT col4 FROM tab4 WHERE (col4 > 35.62) AND ((col3 > 33) AND (((((col3 > 1))) AND (col0 = 21 OR (((col3 > 79))) AND (col1 < 18.85) AND ((col3 > 26)) OR ((col3 > 73) AND col3 <= 84)))) OR ((((col3 <= 35))) AND col1 > 16.74) AND col4 <= 51.42 AND (col1 > 97.18)))
----

statement ok
DROP VIEW view_1_tab4_726

statement ok
DROP VIEW view_2_tab4_726

statement ok
DROP VIEW view_3_tab4_726

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_727') DROP VIEW view_1_tab0_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_727') DROP VIEW view_2_tab0_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_727') DROP VIEW view_3_tab0_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_727

statement ok
CREATE VIEW view_1_tab0_727 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85

statement ok
CREATE VIEW view_2_tab0_727 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)

statement ok
CREATE VIEW view_3_tab0_727 AS SELECT pk FROM view_1_tab0_727

query II rowsort label-6300-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
1
2
8
23

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab0_727
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab0_727
----
1
2
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_727 UNION ALL SELECT pk, col0 FROM view_2_tab0_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_727 UNION SELECT pk, col0 FROM view_2_tab0_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 ) AS tab0_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT * FROM view_3_tab0_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT pk FROM tab0 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
0
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab0_727

statement ok
DROP VIEW view_2_tab0_727

statement ok
DROP VIEW view_3_tab0_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_727') DROP VIEW view_1_tab1_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_727') DROP VIEW view_2_tab1_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_727') DROP VIEW view_3_tab1_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_727

statement ok
CREATE VIEW view_1_tab1_727 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85

statement ok
CREATE VIEW view_2_tab1_727 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)

statement ok
CREATE VIEW view_3_tab1_727 AS SELECT pk FROM view_1_tab1_727

query II rowsort label-6300-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
1
2
8
23

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab1_727
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab1_727
----
1
2
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_727 UNION ALL SELECT pk, col0 FROM view_2_tab1_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_727 UNION SELECT pk, col0 FROM view_2_tab1_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 ) AS tab1_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT * FROM view_3_tab1_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT pk FROM tab1 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
0
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab1_727

statement ok
DROP VIEW view_2_tab1_727

statement ok
DROP VIEW view_3_tab1_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_727') DROP VIEW view_1_tab2_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_727') DROP VIEW view_2_tab2_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_727') DROP VIEW view_3_tab2_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_727

statement ok
CREATE VIEW view_1_tab2_727 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85

statement ok
CREATE VIEW view_2_tab2_727 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)

statement ok
CREATE VIEW view_3_tab2_727 AS SELECT pk FROM view_1_tab2_727

query II rowsort label-6300-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
1
2
8
23

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab2_727
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab2_727
----
1
2
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_727 UNION ALL SELECT pk, col0 FROM view_2_tab2_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_727 UNION SELECT pk, col0 FROM view_2_tab2_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 ) AS tab2_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT * FROM view_3_tab2_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT pk FROM tab2 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
0
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab2_727

statement ok
DROP VIEW view_2_tab2_727

statement ok
DROP VIEW view_3_tab2_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_727') DROP VIEW view_1_tab3_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_727') DROP VIEW view_2_tab3_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_727') DROP VIEW view_3_tab3_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_727

statement ok
CREATE VIEW view_1_tab3_727 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85

statement ok
CREATE VIEW view_2_tab3_727 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)

statement ok
CREATE VIEW view_3_tab3_727 AS SELECT pk FROM view_1_tab3_727

query II rowsort label-6300-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
1
2
8
23

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab3_727
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab3_727
----
1
2
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_727 UNION ALL SELECT pk, col0 FROM view_2_tab3_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_727 UNION SELECT pk, col0 FROM view_2_tab3_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 ) AS tab3_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT * FROM view_3_tab3_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT pk FROM tab3 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
0
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab3_727

statement ok
DROP VIEW view_2_tab3_727

statement ok
DROP VIEW view_3_tab3_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_727') DROP VIEW view_1_tab4_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_727') DROP VIEW view_2_tab4_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_727') DROP VIEW view_3_tab4_727

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_727

statement ok
CREATE VIEW view_1_tab4_727 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85

statement ok
CREATE VIEW view_2_tab4_727 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)

statement ok
CREATE VIEW view_3_tab4_727 AS SELECT pk FROM view_1_tab4_727

query II rowsort label-6300-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
1
2
8
23

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab4_727
----
16 values hashing to 0a99f05edcba6e115d21cba01a67b64f

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab4_727
----
1
2
8
23

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_727 UNION ALL SELECT pk, col0 FROM view_2_tab4_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_727 UNION SELECT pk, col0 FROM view_2_tab4_727
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85 ) AS tab4_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT * FROM view_3_tab4_727
----
0
2
3
4
5
6
7
9

query I rowsort label-6300-3
SELECT pk FROM tab4 WHERE col3 <= 63 OR ((col3 >= 92) OR col0 = 44 OR col4 < 42.61) AND col1 < 72.94 AND col0 IN (99) AND col0 >= 85
----
0
2
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab4_727

statement ok
DROP VIEW view_2_tab4_727

statement ok
DROP VIEW view_3_tab4_727

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_728') DROP VIEW view_1_tab0_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_728') DROP VIEW view_2_tab0_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_728') DROP VIEW view_3_tab0_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_728

statement ok
CREATE VIEW view_1_tab0_728 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 51.38 AND col3 < 6)

statement ok
CREATE VIEW view_2_tab0_728 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 51.38 AND col3 < 6))

statement ok
CREATE VIEW view_3_tab0_728 AS SELECT pk FROM view_1_tab0_728

query II rowsort label-6400-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 51.38 AND col3 < 6)
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab0_728
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab0_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 51.38 AND col3 < 6) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_728 UNION ALL SELECT pk, col0 FROM view_2_tab0_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 51.38 AND col3 < 6) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_728 UNION SELECT pk, col0 FROM view_2_tab0_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 51.38 AND col3 < 6) ) AS tab0_728
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab0_728
----

query I rowsort label-6400-3
SELECT pk FROM tab0 WHERE (col1 > 51.38 AND col3 < 6)
----

statement ok
DROP VIEW view_1_tab0_728

statement ok
DROP VIEW view_2_tab0_728

statement ok
DROP VIEW view_3_tab0_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_728') DROP VIEW view_1_tab1_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_728') DROP VIEW view_2_tab1_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_728') DROP VIEW view_3_tab1_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_728

statement ok
CREATE VIEW view_1_tab1_728 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 51.38 AND col3 < 6)

statement ok
CREATE VIEW view_2_tab1_728 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 51.38 AND col3 < 6))

statement ok
CREATE VIEW view_3_tab1_728 AS SELECT pk FROM view_1_tab1_728

query II rowsort label-6400-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 51.38 AND col3 < 6)
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab1_728
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab1_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 51.38 AND col3 < 6) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_728 UNION ALL SELECT pk, col0 FROM view_2_tab1_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 51.38 AND col3 < 6) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_728 UNION SELECT pk, col0 FROM view_2_tab1_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 51.38 AND col3 < 6) ) AS tab1_728
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab1_728
----

query I rowsort label-6400-3
SELECT pk FROM tab1 WHERE (col1 > 51.38 AND col3 < 6)
----

statement ok
DROP VIEW view_1_tab1_728

statement ok
DROP VIEW view_2_tab1_728

statement ok
DROP VIEW view_3_tab1_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_728') DROP VIEW view_1_tab2_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_728') DROP VIEW view_2_tab2_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_728') DROP VIEW view_3_tab2_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_728

statement ok
CREATE VIEW view_1_tab2_728 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 51.38 AND col3 < 6)

statement ok
CREATE VIEW view_2_tab2_728 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 51.38 AND col3 < 6))

statement ok
CREATE VIEW view_3_tab2_728 AS SELECT pk FROM view_1_tab2_728

query II rowsort label-6400-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 51.38 AND col3 < 6)
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab2_728
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab2_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 51.38 AND col3 < 6) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_728 UNION ALL SELECT pk, col0 FROM view_2_tab2_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 51.38 AND col3 < 6) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_728 UNION SELECT pk, col0 FROM view_2_tab2_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 51.38 AND col3 < 6) ) AS tab2_728
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab2_728
----

query I rowsort label-6400-3
SELECT pk FROM tab2 WHERE (col1 > 51.38 AND col3 < 6)
----

statement ok
DROP VIEW view_1_tab2_728

statement ok
DROP VIEW view_2_tab2_728

statement ok
DROP VIEW view_3_tab2_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_728') DROP VIEW view_1_tab3_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_728') DROP VIEW view_2_tab3_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_728') DROP VIEW view_3_tab3_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_728

statement ok
CREATE VIEW view_1_tab3_728 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 51.38 AND col3 < 6)

statement ok
CREATE VIEW view_2_tab3_728 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 51.38 AND col3 < 6))

statement ok
CREATE VIEW view_3_tab3_728 AS SELECT pk FROM view_1_tab3_728

query II rowsort label-6400-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 51.38 AND col3 < 6)
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab3_728
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab3_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 51.38 AND col3 < 6) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_728 UNION ALL SELECT pk, col0 FROM view_2_tab3_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 51.38 AND col3 < 6) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_728 UNION SELECT pk, col0 FROM view_2_tab3_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 51.38 AND col3 < 6) ) AS tab3_728
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab3_728
----

query I rowsort label-6400-3
SELECT pk FROM tab3 WHERE (col1 > 51.38 AND col3 < 6)
----

statement ok
DROP VIEW view_1_tab3_728

statement ok
DROP VIEW view_2_tab3_728

statement ok
DROP VIEW view_3_tab3_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_728') DROP VIEW view_1_tab4_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_728') DROP VIEW view_2_tab4_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_728') DROP VIEW view_3_tab4_728

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_728

statement ok
CREATE VIEW view_1_tab4_728 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 51.38 AND col3 < 6)

statement ok
CREATE VIEW view_2_tab4_728 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 51.38 AND col3 < 6))

statement ok
CREATE VIEW view_3_tab4_728 AS SELECT pk FROM view_1_tab4_728

query II rowsort label-6400-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 51.38 AND col3 < 6)
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab4_728
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab4_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 51.38 AND col3 < 6) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_728 UNION ALL SELECT pk, col0 FROM view_2_tab4_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 51.38 AND col3 < 6) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 51.38 AND col3 < 6))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_728 UNION SELECT pk, col0 FROM view_2_tab4_728
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 51.38 AND col3 < 6) ) AS tab4_728
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab4_728
----

query I rowsort label-6400-3
SELECT pk FROM tab4 WHERE (col1 > 51.38 AND col3 < 6)
----

statement ok
DROP VIEW view_1_tab4_728

statement ok
DROP VIEW view_2_tab4_728

statement ok
DROP VIEW view_3_tab4_728

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_729') DROP VIEW view_1_tab0_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_729') DROP VIEW view_2_tab0_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_729') DROP VIEW view_3_tab0_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_729

statement ok
CREATE VIEW view_1_tab0_729 AS SELECT pk, col0 FROM tab0 WHERE col3 > 89

statement ok
CREATE VIEW view_2_tab0_729 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 89)

statement ok
CREATE VIEW view_3_tab0_729 AS SELECT pk FROM view_1_tab0_729

query II rowsort label-6500-1
SELECT pk, col0 FROM tab0 WHERE col3 > 89
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab0_729
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab0_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 89 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_729 UNION ALL SELECT pk, col0 FROM view_2_tab0_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 89 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_729 UNION SELECT pk, col0 FROM view_2_tab0_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 89 ) AS tab0_729
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab0_729
----

query I rowsort label-6500-3
SELECT pk FROM tab0 WHERE col3 > 89
----

statement ok
DROP VIEW view_1_tab0_729

statement ok
DROP VIEW view_2_tab0_729

statement ok
DROP VIEW view_3_tab0_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_729') DROP VIEW view_1_tab1_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_729') DROP VIEW view_2_tab1_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_729') DROP VIEW view_3_tab1_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_729

statement ok
CREATE VIEW view_1_tab1_729 AS SELECT pk, col0 FROM tab1 WHERE col3 > 89

statement ok
CREATE VIEW view_2_tab1_729 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 89)

statement ok
CREATE VIEW view_3_tab1_729 AS SELECT pk FROM view_1_tab1_729

query II rowsort label-6500-1
SELECT pk, col0 FROM tab1 WHERE col3 > 89
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab1_729
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab1_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 89 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_729 UNION ALL SELECT pk, col0 FROM view_2_tab1_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 89 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_729 UNION SELECT pk, col0 FROM view_2_tab1_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 89 ) AS tab1_729
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab1_729
----

query I rowsort label-6500-3
SELECT pk FROM tab1 WHERE col3 > 89
----

statement ok
DROP VIEW view_1_tab1_729

statement ok
DROP VIEW view_2_tab1_729

statement ok
DROP VIEW view_3_tab1_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_729') DROP VIEW view_1_tab2_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_729') DROP VIEW view_2_tab2_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_729') DROP VIEW view_3_tab2_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_729

statement ok
CREATE VIEW view_1_tab2_729 AS SELECT pk, col0 FROM tab2 WHERE col3 > 89

statement ok
CREATE VIEW view_2_tab2_729 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 89)

statement ok
CREATE VIEW view_3_tab2_729 AS SELECT pk FROM view_1_tab2_729

query II rowsort label-6500-1
SELECT pk, col0 FROM tab2 WHERE col3 > 89
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab2_729
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab2_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 89 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_729 UNION ALL SELECT pk, col0 FROM view_2_tab2_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 89 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_729 UNION SELECT pk, col0 FROM view_2_tab2_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 89 ) AS tab2_729
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab2_729
----

query I rowsort label-6500-3
SELECT pk FROM tab2 WHERE col3 > 89
----

statement ok
DROP VIEW view_1_tab2_729

statement ok
DROP VIEW view_2_tab2_729

statement ok
DROP VIEW view_3_tab2_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_729') DROP VIEW view_1_tab3_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_729') DROP VIEW view_2_tab3_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_729') DROP VIEW view_3_tab3_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_729

statement ok
CREATE VIEW view_1_tab3_729 AS SELECT pk, col0 FROM tab3 WHERE col3 > 89

statement ok
CREATE VIEW view_2_tab3_729 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 89)

statement ok
CREATE VIEW view_3_tab3_729 AS SELECT pk FROM view_1_tab3_729

query II rowsort label-6500-1
SELECT pk, col0 FROM tab3 WHERE col3 > 89
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab3_729
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab3_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 89 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_729 UNION ALL SELECT pk, col0 FROM view_2_tab3_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 89 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_729 UNION SELECT pk, col0 FROM view_2_tab3_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 89 ) AS tab3_729
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab3_729
----

query I rowsort label-6500-3
SELECT pk FROM tab3 WHERE col3 > 89
----

statement ok
DROP VIEW view_1_tab3_729

statement ok
DROP VIEW view_2_tab3_729

statement ok
DROP VIEW view_3_tab3_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_729') DROP VIEW view_1_tab4_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_729') DROP VIEW view_2_tab4_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_729') DROP VIEW view_3_tab4_729

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_729

statement ok
CREATE VIEW view_1_tab4_729 AS SELECT pk, col0 FROM tab4 WHERE col3 > 89

statement ok
CREATE VIEW view_2_tab4_729 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 89)

statement ok
CREATE VIEW view_3_tab4_729 AS SELECT pk FROM view_1_tab4_729

query II rowsort label-6500-1
SELECT pk, col0 FROM tab4 WHERE col3 > 89
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab4_729
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab4_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 89 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_729 UNION ALL SELECT pk, col0 FROM view_2_tab4_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 89 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 89)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_729 UNION SELECT pk, col0 FROM view_2_tab4_729
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 89 ) AS tab4_729
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab4_729
----

query I rowsort label-6500-3
SELECT pk FROM tab4 WHERE col3 > 89
----

statement ok
DROP VIEW view_1_tab4_729

statement ok
DROP VIEW view_2_tab4_729

statement ok
DROP VIEW view_3_tab4_729

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_730') DROP VIEW view_1_tab0_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_730') DROP VIEW view_2_tab0_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_730') DROP VIEW view_3_tab0_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_730

statement ok
CREATE VIEW view_1_tab0_730 AS SELECT pk, col0 FROM tab0 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77

statement ok
CREATE VIEW view_2_tab0_730 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)

statement ok
CREATE VIEW view_3_tab0_730 AS SELECT pk FROM view_1_tab0_730

query II rowsort label-6600-1
SELECT pk, col0 FROM tab0 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab0_730
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab0_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_730 UNION ALL SELECT pk, col0 FROM view_2_tab0_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_730 UNION SELECT pk, col0 FROM view_2_tab0_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 ) AS tab0_730
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab0_730
----

query I rowsort label-6600-3
SELECT pk FROM tab0 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

statement ok
DROP VIEW view_1_tab0_730

statement ok
DROP VIEW view_2_tab0_730

statement ok
DROP VIEW view_3_tab0_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_730') DROP VIEW view_1_tab1_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_730') DROP VIEW view_2_tab1_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_730') DROP VIEW view_3_tab1_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_730

statement ok
CREATE VIEW view_1_tab1_730 AS SELECT pk, col0 FROM tab1 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77

statement ok
CREATE VIEW view_2_tab1_730 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)

statement ok
CREATE VIEW view_3_tab1_730 AS SELECT pk FROM view_1_tab1_730

query II rowsort label-6600-1
SELECT pk, col0 FROM tab1 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab1_730
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab1_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_730 UNION ALL SELECT pk, col0 FROM view_2_tab1_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_730 UNION SELECT pk, col0 FROM view_2_tab1_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 ) AS tab1_730
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab1_730
----

query I rowsort label-6600-3
SELECT pk FROM tab1 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

statement ok
DROP VIEW view_1_tab1_730

statement ok
DROP VIEW view_2_tab1_730

statement ok
DROP VIEW view_3_tab1_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_730') DROP VIEW view_1_tab2_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_730') DROP VIEW view_2_tab2_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_730') DROP VIEW view_3_tab2_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_730

statement ok
CREATE VIEW view_1_tab2_730 AS SELECT pk, col0 FROM tab2 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77

statement ok
CREATE VIEW view_2_tab2_730 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)

statement ok
CREATE VIEW view_3_tab2_730 AS SELECT pk FROM view_1_tab2_730

query II rowsort label-6600-1
SELECT pk, col0 FROM tab2 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab2_730
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab2_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_730 UNION ALL SELECT pk, col0 FROM view_2_tab2_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_730 UNION SELECT pk, col0 FROM view_2_tab2_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 ) AS tab2_730
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab2_730
----

query I rowsort label-6600-3
SELECT pk FROM tab2 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

statement ok
DROP VIEW view_1_tab2_730

statement ok
DROP VIEW view_2_tab2_730

statement ok
DROP VIEW view_3_tab2_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_730') DROP VIEW view_1_tab3_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_730') DROP VIEW view_2_tab3_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_730') DROP VIEW view_3_tab3_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_730

statement ok
CREATE VIEW view_1_tab3_730 AS SELECT pk, col0 FROM tab3 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77

statement ok
CREATE VIEW view_2_tab3_730 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)

statement ok
CREATE VIEW view_3_tab3_730 AS SELECT pk FROM view_1_tab3_730

query II rowsort label-6600-1
SELECT pk, col0 FROM tab3 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab3_730
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab3_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_730 UNION ALL SELECT pk, col0 FROM view_2_tab3_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_730 UNION SELECT pk, col0 FROM view_2_tab3_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 ) AS tab3_730
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab3_730
----

query I rowsort label-6600-3
SELECT pk FROM tab3 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

statement ok
DROP VIEW view_1_tab3_730

statement ok
DROP VIEW view_2_tab3_730

statement ok
DROP VIEW view_3_tab3_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_730') DROP VIEW view_1_tab4_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_730') DROP VIEW view_2_tab4_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_730') DROP VIEW view_3_tab4_730

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_730

statement ok
CREATE VIEW view_1_tab4_730 AS SELECT pk, col0 FROM tab4 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77

statement ok
CREATE VIEW view_2_tab4_730 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)

statement ok
CREATE VIEW view_3_tab4_730 AS SELECT pk FROM view_1_tab4_730

query II rowsort label-6600-1
SELECT pk, col0 FROM tab4 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

query II rowsort label-6600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab4_730
----

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab4_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_730 UNION ALL SELECT pk, col0 FROM view_2_tab4_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 IN (72.82,67.64,1.27))) AND col3 >= 77)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_730 UNION SELECT pk, col0 FROM view_2_tab4_730
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77 ) AS tab4_730
----

query I rowsort label-6600-3
SELECT * FROM view_3_tab4_730
----

query I rowsort label-6600-3
SELECT pk FROM tab4 WHERE ((col4 IN (72.82,67.64,1.27))) AND col3 >= 77
----

statement ok
DROP VIEW view_1_tab4_730

statement ok
DROP VIEW view_2_tab4_730

statement ok
DROP VIEW view_3_tab4_730

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_731') DROP VIEW view_1_tab0_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_731') DROP VIEW view_2_tab0_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_731') DROP VIEW view_3_tab0_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_731

statement ok
CREATE VIEW view_1_tab0_731 AS SELECT pk, col0 FROM tab0 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84

statement ok
CREATE VIEW view_2_tab0_731 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)

statement ok
CREATE VIEW view_3_tab0_731 AS SELECT pk FROM view_1_tab0_731

query II rowsort label-6700-1
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab0_731
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab0_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_731 UNION ALL SELECT pk, col0 FROM view_2_tab0_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_731 UNION SELECT pk, col0 FROM view_2_tab0_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 ) AS tab0_731
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab0_731
----

query I rowsort label-6700-3
SELECT pk FROM tab0 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

statement ok
DROP VIEW view_1_tab0_731

statement ok
DROP VIEW view_2_tab0_731

statement ok
DROP VIEW view_3_tab0_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_731') DROP VIEW view_1_tab1_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_731') DROP VIEW view_2_tab1_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_731') DROP VIEW view_3_tab1_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_731

statement ok
CREATE VIEW view_1_tab1_731 AS SELECT pk, col0 FROM tab1 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84

statement ok
CREATE VIEW view_2_tab1_731 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)

statement ok
CREATE VIEW view_3_tab1_731 AS SELECT pk FROM view_1_tab1_731

query II rowsort label-6700-1
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab1_731
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab1_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_731 UNION ALL SELECT pk, col0 FROM view_2_tab1_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_731 UNION SELECT pk, col0 FROM view_2_tab1_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 ) AS tab1_731
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab1_731
----

query I rowsort label-6700-3
SELECT pk FROM tab1 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

statement ok
DROP VIEW view_1_tab1_731

statement ok
DROP VIEW view_2_tab1_731

statement ok
DROP VIEW view_3_tab1_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_731') DROP VIEW view_1_tab2_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_731') DROP VIEW view_2_tab2_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_731') DROP VIEW view_3_tab2_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_731

statement ok
CREATE VIEW view_1_tab2_731 AS SELECT pk, col0 FROM tab2 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84

statement ok
CREATE VIEW view_2_tab2_731 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)

statement ok
CREATE VIEW view_3_tab2_731 AS SELECT pk FROM view_1_tab2_731

query II rowsort label-6700-1
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab2_731
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab2_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_731 UNION ALL SELECT pk, col0 FROM view_2_tab2_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_731 UNION SELECT pk, col0 FROM view_2_tab2_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 ) AS tab2_731
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab2_731
----

query I rowsort label-6700-3
SELECT pk FROM tab2 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

statement ok
DROP VIEW view_1_tab2_731

statement ok
DROP VIEW view_2_tab2_731

statement ok
DROP VIEW view_3_tab2_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_731') DROP VIEW view_1_tab3_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_731') DROP VIEW view_2_tab3_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_731') DROP VIEW view_3_tab3_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_731

statement ok
CREATE VIEW view_1_tab3_731 AS SELECT pk, col0 FROM tab3 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84

statement ok
CREATE VIEW view_2_tab3_731 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)

statement ok
CREATE VIEW view_3_tab3_731 AS SELECT pk FROM view_1_tab3_731

query II rowsort label-6700-1
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab3_731
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab3_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_731 UNION ALL SELECT pk, col0 FROM view_2_tab3_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_731 UNION SELECT pk, col0 FROM view_2_tab3_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 ) AS tab3_731
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab3_731
----

query I rowsort label-6700-3
SELECT pk FROM tab3 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

statement ok
DROP VIEW view_1_tab3_731

statement ok
DROP VIEW view_2_tab3_731

statement ok
DROP VIEW view_3_tab3_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_731') DROP VIEW view_1_tab4_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_731') DROP VIEW view_2_tab4_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_731') DROP VIEW view_3_tab4_731

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_731

statement ok
CREATE VIEW view_1_tab4_731 AS SELECT pk, col0 FROM tab4 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84

statement ok
CREATE VIEW view_2_tab4_731 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)

statement ok
CREATE VIEW view_3_tab4_731 AS SELECT pk FROM view_1_tab4_731

query II rowsort label-6700-1
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab4_731
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab4_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_731 UNION ALL SELECT pk, col0 FROM view_2_tab4_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_731 UNION SELECT pk, col0 FROM view_2_tab4_731
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84 ) AS tab4_731
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab4_731
----

query I rowsort label-6700-3
SELECT pk FROM tab4 WHERE ((col4 <= 56.89 AND col1 > 25.36)) AND col1 = 59.84
----

statement ok
DROP VIEW view_1_tab4_731

statement ok
DROP VIEW view_2_tab4_731

statement ok
DROP VIEW view_3_tab4_731

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_732') DROP VIEW view_1_tab0_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_732') DROP VIEW view_2_tab0_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_732') DROP VIEW view_3_tab0_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_732

statement ok
CREATE VIEW view_1_tab0_732 AS SELECT pk, col0 FROM tab0 WHERE col4 < 11.90

statement ok
CREATE VIEW view_2_tab0_732 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 11.90)

statement ok
CREATE VIEW view_3_tab0_732 AS SELECT pk FROM view_1_tab0_732

query II rowsort label-6800-1
SELECT pk, col0 FROM tab0 WHERE col4 < 11.90
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab0_732
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab0_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 11.90 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_732 UNION ALL SELECT pk, col0 FROM view_2_tab0_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 11.90 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_732 UNION SELECT pk, col0 FROM view_2_tab0_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 11.90 ) AS tab0_732
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab0_732
----

query I rowsort label-6800-3
SELECT pk FROM tab0 WHERE col4 < 11.90
----

statement ok
DROP VIEW view_1_tab0_732

statement ok
DROP VIEW view_2_tab0_732

statement ok
DROP VIEW view_3_tab0_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_732') DROP VIEW view_1_tab1_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_732') DROP VIEW view_2_tab1_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_732') DROP VIEW view_3_tab1_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_732

statement ok
CREATE VIEW view_1_tab1_732 AS SELECT pk, col0 FROM tab1 WHERE col4 < 11.90

statement ok
CREATE VIEW view_2_tab1_732 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 11.90)

statement ok
CREATE VIEW view_3_tab1_732 AS SELECT pk FROM view_1_tab1_732

query II rowsort label-6800-1
SELECT pk, col0 FROM tab1 WHERE col4 < 11.90
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab1_732
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab1_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 11.90 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_732 UNION ALL SELECT pk, col0 FROM view_2_tab1_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 11.90 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_732 UNION SELECT pk, col0 FROM view_2_tab1_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 11.90 ) AS tab1_732
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab1_732
----

query I rowsort label-6800-3
SELECT pk FROM tab1 WHERE col4 < 11.90
----

statement ok
DROP VIEW view_1_tab1_732

statement ok
DROP VIEW view_2_tab1_732

statement ok
DROP VIEW view_3_tab1_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_732') DROP VIEW view_1_tab2_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_732') DROP VIEW view_2_tab2_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_732') DROP VIEW view_3_tab2_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_732

statement ok
CREATE VIEW view_1_tab2_732 AS SELECT pk, col0 FROM tab2 WHERE col4 < 11.90

statement ok
CREATE VIEW view_2_tab2_732 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 11.90)

statement ok
CREATE VIEW view_3_tab2_732 AS SELECT pk FROM view_1_tab2_732

query II rowsort label-6800-1
SELECT pk, col0 FROM tab2 WHERE col4 < 11.90
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab2_732
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab2_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 11.90 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_732 UNION ALL SELECT pk, col0 FROM view_2_tab2_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 11.90 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_732 UNION SELECT pk, col0 FROM view_2_tab2_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 11.90 ) AS tab2_732
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab2_732
----

query I rowsort label-6800-3
SELECT pk FROM tab2 WHERE col4 < 11.90
----

statement ok
DROP VIEW view_1_tab2_732

statement ok
DROP VIEW view_2_tab2_732

statement ok
DROP VIEW view_3_tab2_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_732') DROP VIEW view_1_tab3_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_732') DROP VIEW view_2_tab3_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_732') DROP VIEW view_3_tab3_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_732

statement ok
CREATE VIEW view_1_tab3_732 AS SELECT pk, col0 FROM tab3 WHERE col4 < 11.90

statement ok
CREATE VIEW view_2_tab3_732 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 11.90)

statement ok
CREATE VIEW view_3_tab3_732 AS SELECT pk FROM view_1_tab3_732

query II rowsort label-6800-1
SELECT pk, col0 FROM tab3 WHERE col4 < 11.90
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab3_732
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab3_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 11.90 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_732 UNION ALL SELECT pk, col0 FROM view_2_tab3_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 11.90 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_732 UNION SELECT pk, col0 FROM view_2_tab3_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 11.90 ) AS tab3_732
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab3_732
----

query I rowsort label-6800-3
SELECT pk FROM tab3 WHERE col4 < 11.90
----

statement ok
DROP VIEW view_1_tab3_732

statement ok
DROP VIEW view_2_tab3_732

statement ok
DROP VIEW view_3_tab3_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_732') DROP VIEW view_1_tab4_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_732') DROP VIEW view_2_tab4_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_732') DROP VIEW view_3_tab4_732

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_732

statement ok
CREATE VIEW view_1_tab4_732 AS SELECT pk, col0 FROM tab4 WHERE col4 < 11.90

statement ok
CREATE VIEW view_2_tab4_732 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 11.90)

statement ok
CREATE VIEW view_3_tab4_732 AS SELECT pk FROM view_1_tab4_732

query II rowsort label-6800-1
SELECT pk, col0 FROM tab4 WHERE col4 < 11.90
----

query II rowsort label-6800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab4_732
----

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab4_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 11.90 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_732 UNION ALL SELECT pk, col0 FROM view_2_tab4_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 11.90 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 11.90)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_732 UNION SELECT pk, col0 FROM view_2_tab4_732
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 11.90 ) AS tab4_732
----

query I rowsort label-6800-3
SELECT * FROM view_3_tab4_732
----

query I rowsort label-6800-3
SELECT pk FROM tab4 WHERE col4 < 11.90
----

statement ok
DROP VIEW view_1_tab4_732

statement ok
DROP VIEW view_2_tab4_732

statement ok
DROP VIEW view_3_tab4_732

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_733') DROP VIEW view_1_tab0_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_733') DROP VIEW view_2_tab0_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_733') DROP VIEW view_3_tab0_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_733

statement ok
CREATE VIEW view_1_tab0_733 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30

statement ok
CREATE VIEW view_2_tab0_733 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)

statement ok
CREATE VIEW view_3_tab0_733 AS SELECT pk FROM view_1_tab0_733

query II rowsort label-6900-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab0_733
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab0_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_733 UNION ALL SELECT pk, col0 FROM view_2_tab0_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_733 UNION SELECT pk, col0 FROM view_2_tab0_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 ) AS tab0_733
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab0_733
----

query I rowsort label-6900-3
SELECT pk FROM tab0 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

statement ok
DROP VIEW view_1_tab0_733

statement ok
DROP VIEW view_2_tab0_733

statement ok
DROP VIEW view_3_tab0_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_733') DROP VIEW view_1_tab1_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_733') DROP VIEW view_2_tab1_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_733') DROP VIEW view_3_tab1_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_733

statement ok
CREATE VIEW view_1_tab1_733 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30

statement ok
CREATE VIEW view_2_tab1_733 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)

statement ok
CREATE VIEW view_3_tab1_733 AS SELECT pk FROM view_1_tab1_733

query II rowsort label-6900-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab1_733
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab1_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_733 UNION ALL SELECT pk, col0 FROM view_2_tab1_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_733 UNION SELECT pk, col0 FROM view_2_tab1_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 ) AS tab1_733
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab1_733
----

query I rowsort label-6900-3
SELECT pk FROM tab1 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

statement ok
DROP VIEW view_1_tab1_733

statement ok
DROP VIEW view_2_tab1_733

statement ok
DROP VIEW view_3_tab1_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_733') DROP VIEW view_1_tab2_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_733') DROP VIEW view_2_tab2_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_733') DROP VIEW view_3_tab2_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_733

statement ok
CREATE VIEW view_1_tab2_733 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30

statement ok
CREATE VIEW view_2_tab2_733 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)

statement ok
CREATE VIEW view_3_tab2_733 AS SELECT pk FROM view_1_tab2_733

query II rowsort label-6900-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab2_733
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab2_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_733 UNION ALL SELECT pk, col0 FROM view_2_tab2_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_733 UNION SELECT pk, col0 FROM view_2_tab2_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 ) AS tab2_733
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab2_733
----

query I rowsort label-6900-3
SELECT pk FROM tab2 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

statement ok
DROP VIEW view_1_tab2_733

statement ok
DROP VIEW view_2_tab2_733

statement ok
DROP VIEW view_3_tab2_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_733') DROP VIEW view_1_tab3_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_733') DROP VIEW view_2_tab3_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_733') DROP VIEW view_3_tab3_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_733

statement ok
CREATE VIEW view_1_tab3_733 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30

statement ok
CREATE VIEW view_2_tab3_733 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)

statement ok
CREATE VIEW view_3_tab3_733 AS SELECT pk FROM view_1_tab3_733

query II rowsort label-6900-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab3_733
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab3_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_733 UNION ALL SELECT pk, col0 FROM view_2_tab3_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_733 UNION SELECT pk, col0 FROM view_2_tab3_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 ) AS tab3_733
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab3_733
----

query I rowsort label-6900-3
SELECT pk FROM tab3 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

statement ok
DROP VIEW view_1_tab3_733

statement ok
DROP VIEW view_2_tab3_733

statement ok
DROP VIEW view_3_tab3_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_733') DROP VIEW view_1_tab4_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_733') DROP VIEW view_2_tab4_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_733') DROP VIEW view_3_tab4_733

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_733

statement ok
CREATE VIEW view_1_tab4_733 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30

statement ok
CREATE VIEW view_2_tab4_733 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)

statement ok
CREATE VIEW view_3_tab4_733 AS SELECT pk FROM view_1_tab4_733

query II rowsort label-6900-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab4_733
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab4_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_733 UNION ALL SELECT pk, col0 FROM view_2_tab4_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_733 UNION SELECT pk, col0 FROM view_2_tab4_733
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30 ) AS tab4_733
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab4_733
----

query I rowsort label-6900-3
SELECT pk FROM tab4 WHERE col3 >= 99 AND (col0 >= 55 OR ((((col0 <= 16 AND (col0 > 71) AND ((col3 > 30 AND (col1 BETWEEN 87.15 AND 70.68) OR col1 > 45.55 OR col0 IS NULL OR (((col3 >= 72))))) OR (((col4 > 4.10))) AND (col0 IS NULL) OR (col3 > 73) OR col3 >= 35 AND col3 > 64 AND col1 IN (97.79,44.87,16.74,36.37,20.54,76.30) OR ((col1 IN (94.85,37.24,19.70) AND col0 > 25 AND (col3 > 42))) AND col0 = 17 OR (col0 < 55 AND col3 IS NULL) AND col1 = 60.16 OR col4 < 22.38 OR (col4 >= 74.10) OR (col0 > 79) AND col3 >= 59 AND (col4 >= 74.72 AND col3 > 62 OR ((col1 > 42.46))))) AND (col3 < 66)))) AND col3 >= 30
----

statement ok
DROP VIEW view_1_tab4_733

statement ok
DROP VIEW view_2_tab4_733

statement ok
DROP VIEW view_3_tab4_733

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_734') DROP VIEW view_1_tab0_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_734') DROP VIEW view_2_tab0_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_734') DROP VIEW view_3_tab0_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_734

statement ok
CREATE VIEW view_1_tab0_734 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)

statement ok
CREATE VIEW view_2_tab0_734 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))

statement ok
CREATE VIEW view_3_tab0_734 AS SELECT pk FROM view_1_tab0_734

query II rowsort label-7000-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab0_734
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab0_734
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_734 UNION ALL SELECT pk, col0 FROM view_2_tab0_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_734 UNION SELECT pk, col0 FROM view_2_tab0_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) ) AS tab0_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT * FROM view_3_tab0_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT pk FROM tab0 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
3
4
7

statement ok
DROP VIEW view_1_tab0_734

statement ok
DROP VIEW view_2_tab0_734

statement ok
DROP VIEW view_3_tab0_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_734') DROP VIEW view_1_tab1_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_734') DROP VIEW view_2_tab1_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_734') DROP VIEW view_3_tab1_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_734

statement ok
CREATE VIEW view_1_tab1_734 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)

statement ok
CREATE VIEW view_2_tab1_734 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))

statement ok
CREATE VIEW view_3_tab1_734 AS SELECT pk FROM view_1_tab1_734

query II rowsort label-7000-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab1_734
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab1_734
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_734 UNION ALL SELECT pk, col0 FROM view_2_tab1_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_734 UNION SELECT pk, col0 FROM view_2_tab1_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) ) AS tab1_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT * FROM view_3_tab1_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT pk FROM tab1 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
3
4
7

statement ok
DROP VIEW view_1_tab1_734

statement ok
DROP VIEW view_2_tab1_734

statement ok
DROP VIEW view_3_tab1_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_734') DROP VIEW view_1_tab2_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_734') DROP VIEW view_2_tab2_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_734') DROP VIEW view_3_tab2_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_734

statement ok
CREATE VIEW view_1_tab2_734 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)

statement ok
CREATE VIEW view_2_tab2_734 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))

statement ok
CREATE VIEW view_3_tab2_734 AS SELECT pk FROM view_1_tab2_734

query II rowsort label-7000-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab2_734
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab2_734
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_734 UNION ALL SELECT pk, col0 FROM view_2_tab2_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_734 UNION SELECT pk, col0 FROM view_2_tab2_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) ) AS tab2_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT * FROM view_3_tab2_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT pk FROM tab2 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
3
4
7

statement ok
DROP VIEW view_1_tab2_734

statement ok
DROP VIEW view_2_tab2_734

statement ok
DROP VIEW view_3_tab2_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_734') DROP VIEW view_1_tab3_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_734') DROP VIEW view_2_tab3_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_734') DROP VIEW view_3_tab3_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_734

statement ok
CREATE VIEW view_1_tab3_734 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)

statement ok
CREATE VIEW view_2_tab3_734 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))

statement ok
CREATE VIEW view_3_tab3_734 AS SELECT pk FROM view_1_tab3_734

query II rowsort label-7000-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab3_734
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab3_734
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_734 UNION ALL SELECT pk, col0 FROM view_2_tab3_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_734 UNION SELECT pk, col0 FROM view_2_tab3_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) ) AS tab3_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT * FROM view_3_tab3_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT pk FROM tab3 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
3
4
7

statement ok
DROP VIEW view_1_tab3_734

statement ok
DROP VIEW view_2_tab3_734

statement ok
DROP VIEW view_3_tab3_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_734') DROP VIEW view_1_tab4_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_734') DROP VIEW view_2_tab4_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_734') DROP VIEW view_3_tab4_734

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_734

statement ok
CREATE VIEW view_1_tab4_734 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)

statement ok
CREATE VIEW view_2_tab4_734 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))

statement ok
CREATE VIEW view_3_tab4_734 AS SELECT pk FROM view_1_tab4_734

query II rowsort label-7000-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab4_734
----
0
48
3
93
4
44
7
37

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab4_734
----
12 values hashing to 8a1bafd580bcf74d974e42acba25eb24

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_734 UNION ALL SELECT pk, col0 FROM view_2_tab4_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81))
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_734 UNION SELECT pk, col0 FROM view_2_tab4_734
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81) ) AS tab4_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT * FROM view_3_tab4_734
----
0
3
4
7

query I rowsort label-7000-3
SELECT pk FROM tab4 WHERE (col3 < 42) OR (col4 > 2.51) AND col1 IN (56.35,14.47,97.84,3.79,13.57) AND col0 <= 86 AND (col3 <= 58) AND col0 IN (78,81)
----
0
3
4
7

statement ok
DROP VIEW view_1_tab4_734

statement ok
DROP VIEW view_2_tab4_734

statement ok
DROP VIEW view_3_tab4_734

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_736') DROP VIEW view_1_tab0_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_736') DROP VIEW view_2_tab0_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_736') DROP VIEW view_3_tab0_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_736

statement ok
CREATE VIEW view_1_tab0_736 AS SELECT pk, col0 FROM tab0 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96

statement ok
CREATE VIEW view_2_tab0_736 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)

statement ok
CREATE VIEW view_3_tab0_736 AS SELECT pk FROM view_1_tab0_736

query II rowsort label-7100-1
SELECT pk, col0 FROM tab0 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

query II rowsort label-7100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab0_736
----

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab0_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_736 UNION ALL SELECT pk, col0 FROM view_2_tab0_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_736 UNION SELECT pk, col0 FROM view_2_tab0_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 ) AS tab0_736
----

query I rowsort label-7100-3
SELECT * FROM view_3_tab0_736
----

query I rowsort label-7100-3
SELECT pk FROM tab0 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

statement ok
DROP VIEW view_1_tab0_736

statement ok
DROP VIEW view_2_tab0_736

statement ok
DROP VIEW view_3_tab0_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_736') DROP VIEW view_1_tab1_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_736') DROP VIEW view_2_tab1_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_736') DROP VIEW view_3_tab1_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_736

statement ok
CREATE VIEW view_1_tab1_736 AS SELECT pk, col0 FROM tab1 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96

statement ok
CREATE VIEW view_2_tab1_736 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)

statement ok
CREATE VIEW view_3_tab1_736 AS SELECT pk FROM view_1_tab1_736

query II rowsort label-7100-1
SELECT pk, col0 FROM tab1 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

query II rowsort label-7100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab1_736
----

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab1_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_736 UNION ALL SELECT pk, col0 FROM view_2_tab1_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_736 UNION SELECT pk, col0 FROM view_2_tab1_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 ) AS tab1_736
----

query I rowsort label-7100-3
SELECT * FROM view_3_tab1_736
----

query I rowsort label-7100-3
SELECT pk FROM tab1 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

statement ok
DROP VIEW view_1_tab1_736

statement ok
DROP VIEW view_2_tab1_736

statement ok
DROP VIEW view_3_tab1_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_736') DROP VIEW view_1_tab2_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_736') DROP VIEW view_2_tab2_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_736') DROP VIEW view_3_tab2_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_736

statement ok
CREATE VIEW view_1_tab2_736 AS SELECT pk, col0 FROM tab2 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96

statement ok
CREATE VIEW view_2_tab2_736 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)

statement ok
CREATE VIEW view_3_tab2_736 AS SELECT pk FROM view_1_tab2_736

query II rowsort label-7100-1
SELECT pk, col0 FROM tab2 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

query II rowsort label-7100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab2_736
----

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab2_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_736 UNION ALL SELECT pk, col0 FROM view_2_tab2_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_736 UNION SELECT pk, col0 FROM view_2_tab2_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 ) AS tab2_736
----

query I rowsort label-7100-3
SELECT * FROM view_3_tab2_736
----

query I rowsort label-7100-3
SELECT pk FROM tab2 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

statement ok
DROP VIEW view_1_tab2_736

statement ok
DROP VIEW view_2_tab2_736

statement ok
DROP VIEW view_3_tab2_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_736') DROP VIEW view_1_tab3_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_736') DROP VIEW view_2_tab3_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_736') DROP VIEW view_3_tab3_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_736

statement ok
CREATE VIEW view_1_tab3_736 AS SELECT pk, col0 FROM tab3 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96

statement ok
CREATE VIEW view_2_tab3_736 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)

statement ok
CREATE VIEW view_3_tab3_736 AS SELECT pk FROM view_1_tab3_736

query II rowsort label-7100-1
SELECT pk, col0 FROM tab3 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

query II rowsort label-7100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab3_736
----

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab3_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_736 UNION ALL SELECT pk, col0 FROM view_2_tab3_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_736 UNION SELECT pk, col0 FROM view_2_tab3_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 ) AS tab3_736
----

query I rowsort label-7100-3
SELECT * FROM view_3_tab3_736
----

query I rowsort label-7100-3
SELECT pk FROM tab3 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

statement ok
DROP VIEW view_1_tab3_736

statement ok
DROP VIEW view_2_tab3_736

statement ok
DROP VIEW view_3_tab3_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_736') DROP VIEW view_1_tab4_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_736') DROP VIEW view_2_tab4_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_736

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_736') DROP VIEW view_3_tab4_736

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_736

statement ok
CREATE VIEW view_1_tab4_736 AS SELECT pk, col0 FROM tab4 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96

statement ok
CREATE VIEW view_2_tab4_736 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)

statement ok
CREATE VIEW view_3_tab4_736 AS SELECT pk FROM view_1_tab4_736

query II rowsort label-7100-1
SELECT pk, col0 FROM tab4 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

query II rowsort label-7100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab4_736
----

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab4_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_736 UNION ALL SELECT pk, col0 FROM view_2_tab4_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 < 30.65) AND col4 < 64.30 AND col3 > 96)
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_736 UNION SELECT pk, col0 FROM view_2_tab4_736
----
20 values hashing to c7733d57b26c9c868ee6669da35ca4ef

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96 ) AS tab4_736
----

query I rowsort label-7100-3
SELECT * FROM view_3_tab4_736
----

query I rowsort label-7100-3
SELECT pk FROM tab4 WHERE (col4 < 30.65) AND col4 < 64.30 AND col3 > 96
----

statement ok
DROP VIEW view_1_tab4_736

statement ok
DROP VIEW view_2_tab4_736

statement ok
DROP VIEW view_3_tab4_736

