sqllogictest
Artifact Content
Not logged in

Artifact b5bf5e9d50e898c6b2aff40ad9ecd0d4fcc2efaf:


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,30,81.46,'iyrcg',91,30.73,'ifvzd')

statement ok
INSERT INTO tab0 VALUES(1,95,61.72,'rwhpv',97,41.75,'qbvag')

statement ok
INSERT INTO tab0 VALUES(2,22,73.2,'ndyff',83,78.44,'dddcg')

statement ok
INSERT INTO tab0 VALUES(3,45,69.17,'doinu',64,54.75,'slnqc')

statement ok
INSERT INTO tab0 VALUES(4,84,41.83,'jgcva',95,56.56,'qcysv')

statement ok
INSERT INTO tab0 VALUES(5,58,82.60,'eyddi',88,1.73,'zebga')

statement ok
INSERT INTO tab0 VALUES(6,0,52.14,'jxmel',22,2.27,'pzxbn')

statement ok
INSERT INTO tab0 VALUES(7,65,33.32,'dhwwf',58,31.42,'lfnyc')

statement ok
INSERT INTO tab0 VALUES(8,47,0.34,'qdhbg',51,80.85,'jaoya')

statement ok
INSERT INTO tab0 VALUES(9,88,80.81,'ulqwi',59,24.71,'rcujp')

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

statement ok
CREATE INDEX idx_tab1_0 on tab1 (col0)

statement ok
CREATE INDEX idx_tab1_1 on tab1 (col1)

statement ok
CREATE INDEX idx_tab1_3 on tab1 (col3)

statement ok
CREATE INDEX idx_tab1_4 on tab1 (col4)

statement ok
INSERT INTO tab1 SELECT * FROM tab0

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

statement ok
CREATE UNIQUE INDEX idx_tab2_0 ON tab2 (col0 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab2_1 ON tab2 (col3 DESC,col4 DESC)

statement ok
CREATE INDEX idx_tab2_5 ON tab2 (col4)

statement ok
INSERT INTO tab2 SELECT * FROM tab0

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

statement ok
CREATE INDEX idx_tab3_0 ON tab3 (col4)

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

statement ok
CREATE INDEX idx_tab3_4 ON tab3 (col3)

statement ok
CREATE INDEX idx_tab3_5 ON tab3 (col0)

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_1 ON tab4 (col4 DESC,col3 DESC)

statement ok
CREATE INDEX idx_tab4_2 ON tab4 (col3 DESC)

statement ok
CREATE INDEX idx_tab4_4 ON tab4 (col1 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 7aa228701de8d21263c44e160305731d

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_153 AS SELECT pk, col0 FROM tab0 WHERE col0 = 49

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

statement ok
CREATE VIEW view_3_tab0_153 AS SELECT pk FROM view_1_tab0_153

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE col0 = 49
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 49)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_153
----

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_153 UNION ALL SELECT pk, col0 FROM view_2_tab0_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_153 UNION SELECT pk, col0 FROM view_2_tab0_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 49 ) AS tab0_153
----

query I rowsort label-0-3
SELECT * FROM view_3_tab0_153
----

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE col0 = 49
----

statement ok
DROP VIEW view_1_tab0_153

statement ok
DROP VIEW view_2_tab0_153

statement ok
DROP VIEW view_3_tab0_153

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_153 AS SELECT pk, col0 FROM tab1 WHERE col0 = 49

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

statement ok
CREATE VIEW view_3_tab1_153 AS SELECT pk FROM view_1_tab1_153

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE col0 = 49
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 49)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_153
----

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_153 UNION ALL SELECT pk, col0 FROM view_2_tab1_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_153 UNION SELECT pk, col0 FROM view_2_tab1_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 49 ) AS tab1_153
----

query I rowsort label-0-3
SELECT * FROM view_3_tab1_153
----

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE col0 = 49
----

statement ok
DROP VIEW view_1_tab1_153

statement ok
DROP VIEW view_2_tab1_153

statement ok
DROP VIEW view_3_tab1_153

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_153 AS SELECT pk, col0 FROM tab2 WHERE col0 = 49

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

statement ok
CREATE VIEW view_3_tab2_153 AS SELECT pk FROM view_1_tab2_153

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE col0 = 49
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 49)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_153
----

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_153 UNION ALL SELECT pk, col0 FROM view_2_tab2_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_153 UNION SELECT pk, col0 FROM view_2_tab2_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 49 ) AS tab2_153
----

query I rowsort label-0-3
SELECT * FROM view_3_tab2_153
----

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE col0 = 49
----

statement ok
DROP VIEW view_1_tab2_153

statement ok
DROP VIEW view_2_tab2_153

statement ok
DROP VIEW view_3_tab2_153

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_153 AS SELECT pk, col0 FROM tab3 WHERE col0 = 49

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

statement ok
CREATE VIEW view_3_tab3_153 AS SELECT pk FROM view_1_tab3_153

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE col0 = 49
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 49)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_153
----

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_153 UNION ALL SELECT pk, col0 FROM view_2_tab3_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_153 UNION SELECT pk, col0 FROM view_2_tab3_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 49 ) AS tab3_153
----

query I rowsort label-0-3
SELECT * FROM view_3_tab3_153
----

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE col0 = 49
----

statement ok
DROP VIEW view_1_tab3_153

statement ok
DROP VIEW view_2_tab3_153

statement ok
DROP VIEW view_3_tab3_153

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_153 AS SELECT pk, col0 FROM tab4 WHERE col0 = 49

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

statement ok
CREATE VIEW view_3_tab4_153 AS SELECT pk FROM view_1_tab4_153

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE col0 = 49
----

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 49)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_153
----

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_153 UNION ALL SELECT pk, col0 FROM view_2_tab4_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_153 UNION SELECT pk, col0 FROM view_2_tab4_153
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 49 ) AS tab4_153
----

query I rowsort label-0-3
SELECT * FROM view_3_tab4_153
----

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE col0 = 49
----

statement ok
DROP VIEW view_1_tab4_153

statement ok
DROP VIEW view_2_tab4_153

statement ok
DROP VIEW view_3_tab4_153

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_154 AS SELECT pk, col0 FROM tab0 WHERE col0 > 56

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

statement ok
CREATE VIEW view_3_tab0_154 AS SELECT pk FROM view_1_tab0_154

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE col0 > 56
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 56)
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_154
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_154
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_154 UNION ALL SELECT pk, col0 FROM view_2_tab0_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_154 UNION SELECT pk, col0 FROM view_2_tab0_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 56 ) AS tab0_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT * FROM view_3_tab0_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col0 > 56
----
1
4
5
7
9

statement ok
DROP VIEW view_1_tab0_154

statement ok
DROP VIEW view_2_tab0_154

statement ok
DROP VIEW view_3_tab0_154

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_154 AS SELECT pk, col0 FROM tab1 WHERE col0 > 56

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

statement ok
CREATE VIEW view_3_tab1_154 AS SELECT pk FROM view_1_tab1_154

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE col0 > 56
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 56)
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_154
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_154
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_154 UNION ALL SELECT pk, col0 FROM view_2_tab1_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_154 UNION SELECT pk, col0 FROM view_2_tab1_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 56 ) AS tab1_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT * FROM view_3_tab1_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col0 > 56
----
1
4
5
7
9

statement ok
DROP VIEW view_1_tab1_154

statement ok
DROP VIEW view_2_tab1_154

statement ok
DROP VIEW view_3_tab1_154

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_154 AS SELECT pk, col0 FROM tab2 WHERE col0 > 56

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

statement ok
CREATE VIEW view_3_tab2_154 AS SELECT pk FROM view_1_tab2_154

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE col0 > 56
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 56)
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_154
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_154
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_154 UNION ALL SELECT pk, col0 FROM view_2_tab2_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_154 UNION SELECT pk, col0 FROM view_2_tab2_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 56 ) AS tab2_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT * FROM view_3_tab2_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col0 > 56
----
1
4
5
7
9

statement ok
DROP VIEW view_1_tab2_154

statement ok
DROP VIEW view_2_tab2_154

statement ok
DROP VIEW view_3_tab2_154

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_154 AS SELECT pk, col0 FROM tab3 WHERE col0 > 56

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

statement ok
CREATE VIEW view_3_tab3_154 AS SELECT pk FROM view_1_tab3_154

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE col0 > 56
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 56)
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_154
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_154
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_154 UNION ALL SELECT pk, col0 FROM view_2_tab3_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_154 UNION SELECT pk, col0 FROM view_2_tab3_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 56 ) AS tab3_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT * FROM view_3_tab3_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col0 > 56
----
1
4
5
7
9

statement ok
DROP VIEW view_1_tab3_154

statement ok
DROP VIEW view_2_tab3_154

statement ok
DROP VIEW view_3_tab3_154

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_154 AS SELECT pk, col0 FROM tab4 WHERE col0 > 56

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

statement ok
CREATE VIEW view_3_tab4_154 AS SELECT pk FROM view_1_tab4_154

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE col0 > 56
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 56)
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_154
----
10 values hashing to 4af792288960cfe310566d7347be6868

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_154
----
10 values hashing to 6e3d1976ccd05244488965cfcfec5d10

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_154 UNION ALL SELECT pk, col0 FROM view_2_tab4_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_154 UNION SELECT pk, col0 FROM view_2_tab4_154
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 56 ) AS tab4_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT * FROM view_3_tab4_154
----
1
4
5
7
9

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col0 > 56
----
1
4
5
7
9

statement ok
DROP VIEW view_1_tab4_154

statement ok
DROP VIEW view_2_tab4_154

statement ok
DROP VIEW view_3_tab4_154

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_155 AS SELECT pk, col0 FROM tab0 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))

statement ok
CREATE VIEW view_2_tab0_155 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))

statement ok
CREATE VIEW view_3_tab0_155 AS SELECT pk FROM view_1_tab0_155

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
6
0

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_155
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_155
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_155 UNION ALL SELECT pk, col0 FROM view_2_tab0_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_155 UNION SELECT pk, col0 FROM view_2_tab0_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) ) AS tab0_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT * FROM view_3_tab0_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_155

statement ok
DROP VIEW view_2_tab0_155

statement ok
DROP VIEW view_3_tab0_155

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_155 AS SELECT pk, col0 FROM tab1 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))

statement ok
CREATE VIEW view_2_tab1_155 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))

statement ok
CREATE VIEW view_3_tab1_155 AS SELECT pk FROM view_1_tab1_155

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
6
0

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_155
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_155
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_155 UNION ALL SELECT pk, col0 FROM view_2_tab1_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_155 UNION SELECT pk, col0 FROM view_2_tab1_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) ) AS tab1_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT * FROM view_3_tab1_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_155

statement ok
DROP VIEW view_2_tab1_155

statement ok
DROP VIEW view_3_tab1_155

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_155 AS SELECT pk, col0 FROM tab2 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))

statement ok
CREATE VIEW view_2_tab2_155 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))

statement ok
CREATE VIEW view_3_tab2_155 AS SELECT pk FROM view_1_tab2_155

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
6
0

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_155
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_155
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_155 UNION ALL SELECT pk, col0 FROM view_2_tab2_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_155 UNION SELECT pk, col0 FROM view_2_tab2_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) ) AS tab2_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT * FROM view_3_tab2_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_155

statement ok
DROP VIEW view_2_tab2_155

statement ok
DROP VIEW view_3_tab2_155

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_155 AS SELECT pk, col0 FROM tab3 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))

statement ok
CREATE VIEW view_2_tab3_155 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))

statement ok
CREATE VIEW view_3_tab3_155 AS SELECT pk FROM view_1_tab3_155

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
6
0

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_155
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_155
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_155 UNION ALL SELECT pk, col0 FROM view_2_tab3_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_155 UNION SELECT pk, col0 FROM view_2_tab3_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) ) AS tab3_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT * FROM view_3_tab3_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_155

statement ok
DROP VIEW view_2_tab3_155

statement ok
DROP VIEW view_3_tab3_155

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_155 AS SELECT pk, col0 FROM tab4 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))

statement ok
CREATE VIEW view_2_tab4_155 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))

statement ok
CREATE VIEW view_3_tab4_155 AS SELECT pk FROM view_1_tab4_155

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
6
0

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_155
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_155
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_155 UNION ALL SELECT pk, col0 FROM view_2_tab4_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_155 UNION SELECT pk, col0 FROM view_2_tab4_155
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22)) ) AS tab4_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT * FROM view_3_tab4_155
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE ((col4 >= 74.79) OR col3 > 93 AND col0 < 27 OR (col0 >= 22))
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_155

statement ok
DROP VIEW view_2_tab4_155

statement ok
DROP VIEW view_3_tab4_155

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_156 AS SELECT pk, col0 FROM tab0 WHERE (col1 >= 18.44)

statement ok
CREATE VIEW view_2_tab0_156 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 18.44))

statement ok
CREATE VIEW view_3_tab0_156 AS SELECT pk FROM view_1_tab0_156

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE (col1 >= 18.44)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 18.44))
----
8
47

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_156
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_156
----
8
47

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_156 UNION ALL SELECT pk, col0 FROM view_2_tab0_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 18.44) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 18.44))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_156 UNION SELECT pk, col0 FROM view_2_tab0_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 >= 18.44) ) AS tab0_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT * FROM view_3_tab0_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE (col1 >= 18.44)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_156

statement ok
DROP VIEW view_2_tab0_156

statement ok
DROP VIEW view_3_tab0_156

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_156 AS SELECT pk, col0 FROM tab1 WHERE (col1 >= 18.44)

statement ok
CREATE VIEW view_2_tab1_156 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 18.44))

statement ok
CREATE VIEW view_3_tab1_156 AS SELECT pk FROM view_1_tab1_156

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE (col1 >= 18.44)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 18.44))
----
8
47

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_156
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_156
----
8
47

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_156 UNION ALL SELECT pk, col0 FROM view_2_tab1_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 18.44) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 18.44))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_156 UNION SELECT pk, col0 FROM view_2_tab1_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 >= 18.44) ) AS tab1_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT * FROM view_3_tab1_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE (col1 >= 18.44)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_156

statement ok
DROP VIEW view_2_tab1_156

statement ok
DROP VIEW view_3_tab1_156

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_156 AS SELECT pk, col0 FROM tab2 WHERE (col1 >= 18.44)

statement ok
CREATE VIEW view_2_tab2_156 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 18.44))

statement ok
CREATE VIEW view_3_tab2_156 AS SELECT pk FROM view_1_tab2_156

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE (col1 >= 18.44)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 18.44))
----
8
47

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_156
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_156
----
8
47

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_156 UNION ALL SELECT pk, col0 FROM view_2_tab2_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 18.44) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 18.44))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_156 UNION SELECT pk, col0 FROM view_2_tab2_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 >= 18.44) ) AS tab2_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT * FROM view_3_tab2_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE (col1 >= 18.44)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_156

statement ok
DROP VIEW view_2_tab2_156

statement ok
DROP VIEW view_3_tab2_156

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_156 AS SELECT pk, col0 FROM tab3 WHERE (col1 >= 18.44)

statement ok
CREATE VIEW view_2_tab3_156 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 18.44))

statement ok
CREATE VIEW view_3_tab3_156 AS SELECT pk FROM view_1_tab3_156

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE (col1 >= 18.44)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 18.44))
----
8
47

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_156
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_156
----
8
47

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_156 UNION ALL SELECT pk, col0 FROM view_2_tab3_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 18.44) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 18.44))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_156 UNION SELECT pk, col0 FROM view_2_tab3_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 >= 18.44) ) AS tab3_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT * FROM view_3_tab3_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE (col1 >= 18.44)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_156

statement ok
DROP VIEW view_2_tab3_156

statement ok
DROP VIEW view_3_tab3_156

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_156 AS SELECT pk, col0 FROM tab4 WHERE (col1 >= 18.44)

statement ok
CREATE VIEW view_2_tab4_156 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 18.44))

statement ok
CREATE VIEW view_3_tab4_156 AS SELECT pk FROM view_1_tab4_156

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE (col1 >= 18.44)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 18.44))
----
8
47

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_156
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_156
----
8
47

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_156 UNION ALL SELECT pk, col0 FROM view_2_tab4_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 18.44) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 18.44))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_156 UNION SELECT pk, col0 FROM view_2_tab4_156
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 >= 18.44) ) AS tab4_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT * FROM view_3_tab4_156
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE (col1 >= 18.44)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_156

statement ok
DROP VIEW view_2_tab4_156

statement ok
DROP VIEW view_3_tab4_156

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_157 AS SELECT pk, col0 FROM tab0 WHERE (col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75

statement ok
CREATE VIEW view_2_tab0_157 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)

statement ok
CREATE VIEW view_3_tab0_157 AS SELECT pk FROM view_1_tab0_157

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE (col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_157
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_157
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_157 UNION ALL SELECT pk, col0 FROM view_2_tab0_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_157 UNION SELECT pk, col0 FROM view_2_tab0_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 ) AS tab0_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT * FROM view_3_tab0_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE (col0 IN (SELECT col3 FROM tab0 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
1
2
4
5
9

statement ok
DROP VIEW view_1_tab0_157

statement ok
DROP VIEW view_2_tab0_157

statement ok
DROP VIEW view_3_tab0_157

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_157 AS SELECT pk, col0 FROM tab1 WHERE (col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75

statement ok
CREATE VIEW view_2_tab1_157 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)

statement ok
CREATE VIEW view_3_tab1_157 AS SELECT pk FROM view_1_tab1_157

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE (col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_157
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_157
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_157 UNION ALL SELECT pk, col0 FROM view_2_tab1_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_157 UNION SELECT pk, col0 FROM view_2_tab1_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 ) AS tab1_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT * FROM view_3_tab1_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE (col0 IN (SELECT col3 FROM tab1 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
1
2
4
5
9

statement ok
DROP VIEW view_1_tab1_157

statement ok
DROP VIEW view_2_tab1_157

statement ok
DROP VIEW view_3_tab1_157

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_157 AS SELECT pk, col0 FROM tab2 WHERE (col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75

statement ok
CREATE VIEW view_2_tab2_157 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)

statement ok
CREATE VIEW view_3_tab2_157 AS SELECT pk FROM view_1_tab2_157

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE (col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_157
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_157
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_157 UNION ALL SELECT pk, col0 FROM view_2_tab2_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_157 UNION SELECT pk, col0 FROM view_2_tab2_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 ) AS tab2_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT * FROM view_3_tab2_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE (col0 IN (SELECT col3 FROM tab2 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
1
2
4
5
9

statement ok
DROP VIEW view_1_tab2_157

statement ok
DROP VIEW view_2_tab2_157

statement ok
DROP VIEW view_3_tab2_157

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_157 AS SELECT pk, col0 FROM tab3 WHERE (col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75

statement ok
CREATE VIEW view_2_tab3_157 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)

statement ok
CREATE VIEW view_3_tab3_157 AS SELECT pk FROM view_1_tab3_157

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE (col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_157
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_157
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_157 UNION ALL SELECT pk, col0 FROM view_2_tab3_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_157 UNION SELECT pk, col0 FROM view_2_tab3_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 ) AS tab3_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT * FROM view_3_tab3_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE (col0 IN (SELECT col3 FROM tab3 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
1
2
4
5
9

statement ok
DROP VIEW view_1_tab3_157

statement ok
DROP VIEW view_2_tab3_157

statement ok
DROP VIEW view_3_tab3_157

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_157 AS SELECT pk, col0 FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75

statement ok
CREATE VIEW view_2_tab4_157 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)

statement ok
CREATE VIEW view_3_tab4_157 AS SELECT pk FROM view_1_tab4_157

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_157
----
10 values hashing to 934ccec0db7c5f1e61014e14d9391b07

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_157
----
10 values hashing to c1224272a698230db3031350589afdf6

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_157 UNION ALL SELECT pk, col0 FROM view_2_tab4_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_157 UNION SELECT pk, col0 FROM view_2_tab4_157
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75 ) AS tab4_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT * FROM view_3_tab4_157
----
1
2
4
5
9

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE (col0 IN (SELECT col3 FROM tab4 WHERE ((col0 IS NULL) OR col3 > 5 OR col3 <= 50 OR col1 < 83.11))) OR col0 > 75
----
1
2
4
5
9

statement ok
DROP VIEW view_1_tab4_157

statement ok
DROP VIEW view_2_tab4_157

statement ok
DROP VIEW view_3_tab4_157

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_158 AS SELECT pk, col0 FROM tab0 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88

statement ok
CREATE VIEW view_2_tab0_158 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)

statement ok
CREATE VIEW view_3_tab0_158 AS SELECT pk FROM view_1_tab0_158

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_158 UNION ALL SELECT pk, col0 FROM view_2_tab0_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_158 UNION SELECT pk, col0 FROM view_2_tab0_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 ) AS tab0_158
----

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

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

statement ok
DROP VIEW view_1_tab0_158

statement ok
DROP VIEW view_2_tab0_158

statement ok
DROP VIEW view_3_tab0_158

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_158 AS SELECT pk, col0 FROM tab1 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88

statement ok
CREATE VIEW view_2_tab1_158 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)

statement ok
CREATE VIEW view_3_tab1_158 AS SELECT pk FROM view_1_tab1_158

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_158 UNION ALL SELECT pk, col0 FROM view_2_tab1_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_158 UNION SELECT pk, col0 FROM view_2_tab1_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 ) AS tab1_158
----

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

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

statement ok
DROP VIEW view_1_tab1_158

statement ok
DROP VIEW view_2_tab1_158

statement ok
DROP VIEW view_3_tab1_158

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_158 AS SELECT pk, col0 FROM tab2 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88

statement ok
CREATE VIEW view_2_tab2_158 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)

statement ok
CREATE VIEW view_3_tab2_158 AS SELECT pk FROM view_1_tab2_158

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_158 UNION ALL SELECT pk, col0 FROM view_2_tab2_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_158 UNION SELECT pk, col0 FROM view_2_tab2_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 ) AS tab2_158
----

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

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

statement ok
DROP VIEW view_1_tab2_158

statement ok
DROP VIEW view_2_tab2_158

statement ok
DROP VIEW view_3_tab2_158

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_158 AS SELECT pk, col0 FROM tab3 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88

statement ok
CREATE VIEW view_2_tab3_158 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)

statement ok
CREATE VIEW view_3_tab3_158 AS SELECT pk FROM view_1_tab3_158

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_158 UNION ALL SELECT pk, col0 FROM view_2_tab3_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_158 UNION SELECT pk, col0 FROM view_2_tab3_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 ) AS tab3_158
----

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

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

statement ok
DROP VIEW view_1_tab3_158

statement ok
DROP VIEW view_2_tab3_158

statement ok
DROP VIEW view_3_tab3_158

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_158 AS SELECT pk, col0 FROM tab4 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88

statement ok
CREATE VIEW view_2_tab4_158 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)

statement ok
CREATE VIEW view_3_tab4_158 AS SELECT pk FROM view_1_tab4_158

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_158 UNION ALL SELECT pk, col0 FROM view_2_tab4_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_158 UNION SELECT pk, col0 FROM view_2_tab4_158
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88 ) AS tab4_158
----

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

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col4 = 77.58 AND (col4 <= 98.11) AND col3 >= 70 AND col3 <= 88
----

statement ok
DROP VIEW view_1_tab4_158

statement ok
DROP VIEW view_2_tab4_158

statement ok
DROP VIEW view_3_tab4_158

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_159 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))

statement ok
CREATE VIEW view_2_tab0_159 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))

statement ok
CREATE VIEW view_3_tab0_159 AS SELECT pk FROM view_1_tab0_159

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_159
----

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_159 UNION ALL SELECT pk, col0 FROM view_2_tab0_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_159 UNION SELECT pk, col0 FROM view_2_tab0_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) ) AS tab0_159
----

query I rowsort label-600-3
SELECT * FROM view_3_tab0_159
----

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

statement ok
DROP VIEW view_1_tab0_159

statement ok
DROP VIEW view_2_tab0_159

statement ok
DROP VIEW view_3_tab0_159

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_159 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))

statement ok
CREATE VIEW view_2_tab1_159 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))

statement ok
CREATE VIEW view_3_tab1_159 AS SELECT pk FROM view_1_tab1_159

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_159
----

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_159 UNION ALL SELECT pk, col0 FROM view_2_tab1_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_159 UNION SELECT pk, col0 FROM view_2_tab1_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) ) AS tab1_159
----

query I rowsort label-600-3
SELECT * FROM view_3_tab1_159
----

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

statement ok
DROP VIEW view_1_tab1_159

statement ok
DROP VIEW view_2_tab1_159

statement ok
DROP VIEW view_3_tab1_159

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_159 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))

statement ok
CREATE VIEW view_2_tab2_159 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))

statement ok
CREATE VIEW view_3_tab2_159 AS SELECT pk FROM view_1_tab2_159

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_159
----

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_159 UNION ALL SELECT pk, col0 FROM view_2_tab2_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_159 UNION SELECT pk, col0 FROM view_2_tab2_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) ) AS tab2_159
----

query I rowsort label-600-3
SELECT * FROM view_3_tab2_159
----

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

statement ok
DROP VIEW view_1_tab2_159

statement ok
DROP VIEW view_2_tab2_159

statement ok
DROP VIEW view_3_tab2_159

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_159 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))

statement ok
CREATE VIEW view_2_tab3_159 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))

statement ok
CREATE VIEW view_3_tab3_159 AS SELECT pk FROM view_1_tab3_159

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_159
----

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_159 UNION ALL SELECT pk, col0 FROM view_2_tab3_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_159 UNION SELECT pk, col0 FROM view_2_tab3_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) ) AS tab3_159
----

query I rowsort label-600-3
SELECT * FROM view_3_tab3_159
----

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

statement ok
DROP VIEW view_1_tab3_159

statement ok
DROP VIEW view_2_tab3_159

statement ok
DROP VIEW view_3_tab3_159

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_159 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))

statement ok
CREATE VIEW view_2_tab4_159 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))

statement ok
CREATE VIEW view_3_tab4_159 AS SELECT pk FROM view_1_tab4_159

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_159
----

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_159 UNION ALL SELECT pk, col0 FROM view_2_tab4_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_159 UNION SELECT pk, col0 FROM view_2_tab4_159
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14)))) ) AS tab4_159
----

query I rowsort label-600-3
SELECT * FROM view_3_tab4_159
----

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE (col3 < 75) AND ((col0 >= 55 AND ((col3 < 14))))
----

statement ok
DROP VIEW view_1_tab4_159

statement ok
DROP VIEW view_2_tab4_159

statement ok
DROP VIEW view_3_tab4_159

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_160 AS SELECT pk, col0 FROM tab0 WHERE ((col3 = 34)) OR col0 > 61

statement ok
CREATE VIEW view_2_tab0_160 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 34)) OR col0 > 61)

statement ok
CREATE VIEW view_3_tab0_160 AS SELECT pk FROM view_1_tab0_160

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE ((col3 = 34)) OR col0 > 61
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab0_160
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_160
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 = 34)) OR col0 > 61 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_160 UNION ALL SELECT pk, col0 FROM view_2_tab0_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 = 34)) OR col0 > 61 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_160 UNION SELECT pk, col0 FROM view_2_tab0_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 = 34)) OR col0 > 61 ) AS tab0_160
----
1
4
7
9

query I rowsort label-700-3
SELECT * FROM view_3_tab0_160
----
1
4
7
9

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE ((col3 = 34)) OR col0 > 61
----
1
4
7
9

statement ok
DROP VIEW view_1_tab0_160

statement ok
DROP VIEW view_2_tab0_160

statement ok
DROP VIEW view_3_tab0_160

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_160 AS SELECT pk, col0 FROM tab1 WHERE ((col3 = 34)) OR col0 > 61

statement ok
CREATE VIEW view_2_tab1_160 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 34)) OR col0 > 61)

statement ok
CREATE VIEW view_3_tab1_160 AS SELECT pk FROM view_1_tab1_160

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE ((col3 = 34)) OR col0 > 61
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab1_160
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_160
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 = 34)) OR col0 > 61 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_160 UNION ALL SELECT pk, col0 FROM view_2_tab1_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 = 34)) OR col0 > 61 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_160 UNION SELECT pk, col0 FROM view_2_tab1_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 = 34)) OR col0 > 61 ) AS tab1_160
----
1
4
7
9

query I rowsort label-700-3
SELECT * FROM view_3_tab1_160
----
1
4
7
9

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE ((col3 = 34)) OR col0 > 61
----
1
4
7
9

statement ok
DROP VIEW view_1_tab1_160

statement ok
DROP VIEW view_2_tab1_160

statement ok
DROP VIEW view_3_tab1_160

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_160 AS SELECT pk, col0 FROM tab2 WHERE ((col3 = 34)) OR col0 > 61

statement ok
CREATE VIEW view_2_tab2_160 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 34)) OR col0 > 61)

statement ok
CREATE VIEW view_3_tab2_160 AS SELECT pk FROM view_1_tab2_160

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE ((col3 = 34)) OR col0 > 61
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab2_160
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_160
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 = 34)) OR col0 > 61 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_160 UNION ALL SELECT pk, col0 FROM view_2_tab2_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 = 34)) OR col0 > 61 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_160 UNION SELECT pk, col0 FROM view_2_tab2_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 = 34)) OR col0 > 61 ) AS tab2_160
----
1
4
7
9

query I rowsort label-700-3
SELECT * FROM view_3_tab2_160
----
1
4
7
9

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE ((col3 = 34)) OR col0 > 61
----
1
4
7
9

statement ok
DROP VIEW view_1_tab2_160

statement ok
DROP VIEW view_2_tab2_160

statement ok
DROP VIEW view_3_tab2_160

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_160 AS SELECT pk, col0 FROM tab3 WHERE ((col3 = 34)) OR col0 > 61

statement ok
CREATE VIEW view_2_tab3_160 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 34)) OR col0 > 61)

statement ok
CREATE VIEW view_3_tab3_160 AS SELECT pk FROM view_1_tab3_160

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE ((col3 = 34)) OR col0 > 61
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab3_160
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_160
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 = 34)) OR col0 > 61 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_160 UNION ALL SELECT pk, col0 FROM view_2_tab3_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 = 34)) OR col0 > 61 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_160 UNION SELECT pk, col0 FROM view_2_tab3_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 = 34)) OR col0 > 61 ) AS tab3_160
----
1
4
7
9

query I rowsort label-700-3
SELECT * FROM view_3_tab3_160
----
1
4
7
9

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE ((col3 = 34)) OR col0 > 61
----
1
4
7
9

statement ok
DROP VIEW view_1_tab3_160

statement ok
DROP VIEW view_2_tab3_160

statement ok
DROP VIEW view_3_tab3_160

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_160 AS SELECT pk, col0 FROM tab4 WHERE ((col3 = 34)) OR col0 > 61

statement ok
CREATE VIEW view_2_tab4_160 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 34)) OR col0 > 61)

statement ok
CREATE VIEW view_3_tab4_160 AS SELECT pk FROM view_1_tab4_160

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE ((col3 = 34)) OR col0 > 61
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-700-1
SELECT pk, col0 FROM view_1_tab4_160
----
1
95
4
84
7
65
9
88

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_160
----
12 values hashing to 1c1a30b4e574ef1f85b0242fe2385ebc

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 = 34)) OR col0 > 61 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_160 UNION ALL SELECT pk, col0 FROM view_2_tab4_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 = 34)) OR col0 > 61 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 34)) OR col0 > 61)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_160 UNION SELECT pk, col0 FROM view_2_tab4_160
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 = 34)) OR col0 > 61 ) AS tab4_160
----
1
4
7
9

query I rowsort label-700-3
SELECT * FROM view_3_tab4_160
----
1
4
7
9

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE ((col3 = 34)) OR col0 > 61
----
1
4
7
9

statement ok
DROP VIEW view_1_tab4_160

statement ok
DROP VIEW view_2_tab4_160

statement ok
DROP VIEW view_3_tab4_160

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_162 AS SELECT pk, col0 FROM tab0 WHERE col4 > 2.7

statement ok
CREATE VIEW view_2_tab0_162 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 2.7)

statement ok
CREATE VIEW view_3_tab0_162 AS SELECT pk FROM view_1_tab0_162

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE col4 > 2.7
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 2.7)
----
5
58
6
0

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_162
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_162
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 2.7 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_162 UNION ALL SELECT pk, col0 FROM view_2_tab0_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 2.7 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_162 UNION SELECT pk, col0 FROM view_2_tab0_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 2.7 ) AS tab0_162
----
0
1
2
3
4
7
8
9

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

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE col4 > 2.7
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab0_162

statement ok
DROP VIEW view_2_tab0_162

statement ok
DROP VIEW view_3_tab0_162

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_162 AS SELECT pk, col0 FROM tab1 WHERE col4 > 2.7

statement ok
CREATE VIEW view_2_tab1_162 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 2.7)

statement ok
CREATE VIEW view_3_tab1_162 AS SELECT pk FROM view_1_tab1_162

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE col4 > 2.7
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 2.7)
----
5
58
6
0

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_162
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_162
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 2.7 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_162 UNION ALL SELECT pk, col0 FROM view_2_tab1_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 2.7 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_162 UNION SELECT pk, col0 FROM view_2_tab1_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 2.7 ) AS tab1_162
----
0
1
2
3
4
7
8
9

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

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE col4 > 2.7
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab1_162

statement ok
DROP VIEW view_2_tab1_162

statement ok
DROP VIEW view_3_tab1_162

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_162 AS SELECT pk, col0 FROM tab2 WHERE col4 > 2.7

statement ok
CREATE VIEW view_2_tab2_162 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 2.7)

statement ok
CREATE VIEW view_3_tab2_162 AS SELECT pk FROM view_1_tab2_162

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE col4 > 2.7
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 2.7)
----
5
58
6
0

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_162
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_162
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 2.7 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_162 UNION ALL SELECT pk, col0 FROM view_2_tab2_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 2.7 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_162 UNION SELECT pk, col0 FROM view_2_tab2_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 2.7 ) AS tab2_162
----
0
1
2
3
4
7
8
9

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

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE col4 > 2.7
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab2_162

statement ok
DROP VIEW view_2_tab2_162

statement ok
DROP VIEW view_3_tab2_162

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_162 AS SELECT pk, col0 FROM tab3 WHERE col4 > 2.7

statement ok
CREATE VIEW view_2_tab3_162 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 2.7)

statement ok
CREATE VIEW view_3_tab3_162 AS SELECT pk FROM view_1_tab3_162

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE col4 > 2.7
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 2.7)
----
5
58
6
0

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_162
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_162
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 2.7 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_162 UNION ALL SELECT pk, col0 FROM view_2_tab3_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 2.7 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_162 UNION SELECT pk, col0 FROM view_2_tab3_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 2.7 ) AS tab3_162
----
0
1
2
3
4
7
8
9

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

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE col4 > 2.7
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab3_162

statement ok
DROP VIEW view_2_tab3_162

statement ok
DROP VIEW view_3_tab3_162

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_162 AS SELECT pk, col0 FROM tab4 WHERE col4 > 2.7

statement ok
CREATE VIEW view_2_tab4_162 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 2.7)

statement ok
CREATE VIEW view_3_tab4_162 AS SELECT pk FROM view_1_tab4_162

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE col4 > 2.7
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 2.7)
----
5
58
6
0

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_162
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_162
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 2.7 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_162 UNION ALL SELECT pk, col0 FROM view_2_tab4_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 2.7 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 2.7)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_162 UNION SELECT pk, col0 FROM view_2_tab4_162
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 2.7 ) AS tab4_162
----
0
1
2
3
4
7
8
9

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

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE col4 > 2.7
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab4_162

statement ok
DROP VIEW view_2_tab4_162

statement ok
DROP VIEW view_3_tab4_162

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_163 AS SELECT pk, col0 FROM tab0 WHERE col3 > 63 AND col0 <= 85

statement ok
CREATE VIEW view_2_tab0_163 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 63 AND col0 <= 85)

statement ok
CREATE VIEW view_3_tab0_163 AS SELECT pk FROM view_1_tab0_163

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE col3 > 63 AND col0 <= 85
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 63 AND col0 <= 85)
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_163
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_163
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 63 AND col0 <= 85 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_163 UNION ALL SELECT pk, col0 FROM view_2_tab0_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 63 AND col0 <= 85 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_163 UNION SELECT pk, col0 FROM view_2_tab0_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 63 AND col0 <= 85 ) AS tab0_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT * FROM view_3_tab0_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE col3 > 63 AND col0 <= 85
----
0
2
3
4
5

statement ok
DROP VIEW view_1_tab0_163

statement ok
DROP VIEW view_2_tab0_163

statement ok
DROP VIEW view_3_tab0_163

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_163 AS SELECT pk, col0 FROM tab1 WHERE col3 > 63 AND col0 <= 85

statement ok
CREATE VIEW view_2_tab1_163 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 63 AND col0 <= 85)

statement ok
CREATE VIEW view_3_tab1_163 AS SELECT pk FROM view_1_tab1_163

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE col3 > 63 AND col0 <= 85
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 63 AND col0 <= 85)
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_163
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_163
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 63 AND col0 <= 85 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_163 UNION ALL SELECT pk, col0 FROM view_2_tab1_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 63 AND col0 <= 85 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_163 UNION SELECT pk, col0 FROM view_2_tab1_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 63 AND col0 <= 85 ) AS tab1_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT * FROM view_3_tab1_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE col3 > 63 AND col0 <= 85
----
0
2
3
4
5

statement ok
DROP VIEW view_1_tab1_163

statement ok
DROP VIEW view_2_tab1_163

statement ok
DROP VIEW view_3_tab1_163

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_163 AS SELECT pk, col0 FROM tab2 WHERE col3 > 63 AND col0 <= 85

statement ok
CREATE VIEW view_2_tab2_163 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 63 AND col0 <= 85)

statement ok
CREATE VIEW view_3_tab2_163 AS SELECT pk FROM view_1_tab2_163

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE col3 > 63 AND col0 <= 85
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 63 AND col0 <= 85)
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_163
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_163
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 63 AND col0 <= 85 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_163 UNION ALL SELECT pk, col0 FROM view_2_tab2_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 63 AND col0 <= 85 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_163 UNION SELECT pk, col0 FROM view_2_tab2_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 63 AND col0 <= 85 ) AS tab2_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT * FROM view_3_tab2_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE col3 > 63 AND col0 <= 85
----
0
2
3
4
5

statement ok
DROP VIEW view_1_tab2_163

statement ok
DROP VIEW view_2_tab2_163

statement ok
DROP VIEW view_3_tab2_163

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_163 AS SELECT pk, col0 FROM tab3 WHERE col3 > 63 AND col0 <= 85

statement ok
CREATE VIEW view_2_tab3_163 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 63 AND col0 <= 85)

statement ok
CREATE VIEW view_3_tab3_163 AS SELECT pk FROM view_1_tab3_163

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE col3 > 63 AND col0 <= 85
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 63 AND col0 <= 85)
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_163
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_163
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 63 AND col0 <= 85 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_163 UNION ALL SELECT pk, col0 FROM view_2_tab3_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 63 AND col0 <= 85 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_163 UNION SELECT pk, col0 FROM view_2_tab3_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 63 AND col0 <= 85 ) AS tab3_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT * FROM view_3_tab3_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE col3 > 63 AND col0 <= 85
----
0
2
3
4
5

statement ok
DROP VIEW view_1_tab3_163

statement ok
DROP VIEW view_2_tab3_163

statement ok
DROP VIEW view_3_tab3_163

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_163 AS SELECT pk, col0 FROM tab4 WHERE col3 > 63 AND col0 <= 85

statement ok
CREATE VIEW view_2_tab4_163 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 63 AND col0 <= 85)

statement ok
CREATE VIEW view_3_tab4_163 AS SELECT pk FROM view_1_tab4_163

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE col3 > 63 AND col0 <= 85
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 63 AND col0 <= 85)
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_163
----
10 values hashing to 47e769cc5c72f7d7fb99c2bac6c6e04b

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_163
----
10 values hashing to 989f1ce8c2162dc45fdbe4811afab0a5

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 63 AND col0 <= 85 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_163 UNION ALL SELECT pk, col0 FROM view_2_tab4_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 63 AND col0 <= 85 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 63 AND col0 <= 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_163 UNION SELECT pk, col0 FROM view_2_tab4_163
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 63 AND col0 <= 85 ) AS tab4_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT * FROM view_3_tab4_163
----
0
2
3
4
5

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE col3 > 63 AND col0 <= 85
----
0
2
3
4
5

statement ok
DROP VIEW view_1_tab4_163

statement ok
DROP VIEW view_2_tab4_163

statement ok
DROP VIEW view_3_tab4_163

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_164 AS SELECT pk, col0 FROM tab0 WHERE col3 = 46

statement ok
CREATE VIEW view_2_tab0_164 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 46)

statement ok
CREATE VIEW view_3_tab0_164 AS SELECT pk FROM view_1_tab0_164

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE col3 = 46
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 46)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_164
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_164 UNION ALL SELECT pk, col0 FROM view_2_tab0_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_164 UNION SELECT pk, col0 FROM view_2_tab0_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 46 ) AS tab0_164
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_164
----

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE col3 = 46
----

statement ok
DROP VIEW view_1_tab0_164

statement ok
DROP VIEW view_2_tab0_164

statement ok
DROP VIEW view_3_tab0_164

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_164 AS SELECT pk, col0 FROM tab1 WHERE col3 = 46

statement ok
CREATE VIEW view_2_tab1_164 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 46)

statement ok
CREATE VIEW view_3_tab1_164 AS SELECT pk FROM view_1_tab1_164

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE col3 = 46
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 46)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_164
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_164 UNION ALL SELECT pk, col0 FROM view_2_tab1_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_164 UNION SELECT pk, col0 FROM view_2_tab1_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 46 ) AS tab1_164
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_164
----

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE col3 = 46
----

statement ok
DROP VIEW view_1_tab1_164

statement ok
DROP VIEW view_2_tab1_164

statement ok
DROP VIEW view_3_tab1_164

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_164 AS SELECT pk, col0 FROM tab2 WHERE col3 = 46

statement ok
CREATE VIEW view_2_tab2_164 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 46)

statement ok
CREATE VIEW view_3_tab2_164 AS SELECT pk FROM view_1_tab2_164

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE col3 = 46
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 46)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_164
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_164 UNION ALL SELECT pk, col0 FROM view_2_tab2_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_164 UNION SELECT pk, col0 FROM view_2_tab2_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 46 ) AS tab2_164
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_164
----

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE col3 = 46
----

statement ok
DROP VIEW view_1_tab2_164

statement ok
DROP VIEW view_2_tab2_164

statement ok
DROP VIEW view_3_tab2_164

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_164 AS SELECT pk, col0 FROM tab3 WHERE col3 = 46

statement ok
CREATE VIEW view_2_tab3_164 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 46)

statement ok
CREATE VIEW view_3_tab3_164 AS SELECT pk FROM view_1_tab3_164

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE col3 = 46
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 46)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_164
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_164 UNION ALL SELECT pk, col0 FROM view_2_tab3_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_164 UNION SELECT pk, col0 FROM view_2_tab3_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 46 ) AS tab3_164
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_164
----

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE col3 = 46
----

statement ok
DROP VIEW view_1_tab3_164

statement ok
DROP VIEW view_2_tab3_164

statement ok
DROP VIEW view_3_tab3_164

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_164 AS SELECT pk, col0 FROM tab4 WHERE col3 = 46

statement ok
CREATE VIEW view_2_tab4_164 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 46)

statement ok
CREATE VIEW view_3_tab4_164 AS SELECT pk FROM view_1_tab4_164

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE col3 = 46
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 46)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_164
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_164 UNION ALL SELECT pk, col0 FROM view_2_tab4_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_164 UNION SELECT pk, col0 FROM view_2_tab4_164
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 46 ) AS tab4_164
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_164
----

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE col3 = 46
----

statement ok
DROP VIEW view_1_tab4_164

statement ok
DROP VIEW view_2_tab4_164

statement ok
DROP VIEW view_3_tab4_164

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_165 AS SELECT pk, col0 FROM tab0 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63

statement ok
CREATE VIEW view_2_tab0_165 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)

statement ok
CREATE VIEW view_3_tab0_165 AS SELECT pk FROM view_1_tab0_165

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_165
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_165
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_165 UNION ALL SELECT pk, col0 FROM view_2_tab0_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_165 UNION SELECT pk, col0 FROM view_2_tab0_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 ) AS tab0_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
7
8
9

statement ok
DROP VIEW view_1_tab0_165

statement ok
DROP VIEW view_2_tab0_165

statement ok
DROP VIEW view_3_tab0_165

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_165 AS SELECT pk, col0 FROM tab1 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63

statement ok
CREATE VIEW view_2_tab1_165 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)

statement ok
CREATE VIEW view_3_tab1_165 AS SELECT pk FROM view_1_tab1_165

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_165
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_165
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_165 UNION ALL SELECT pk, col0 FROM view_2_tab1_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_165 UNION SELECT pk, col0 FROM view_2_tab1_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 ) AS tab1_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
7
8
9

statement ok
DROP VIEW view_1_tab1_165

statement ok
DROP VIEW view_2_tab1_165

statement ok
DROP VIEW view_3_tab1_165

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_165 AS SELECT pk, col0 FROM tab2 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63

statement ok
CREATE VIEW view_2_tab2_165 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)

statement ok
CREATE VIEW view_3_tab2_165 AS SELECT pk FROM view_1_tab2_165

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_165
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_165
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_165 UNION ALL SELECT pk, col0 FROM view_2_tab2_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_165 UNION SELECT pk, col0 FROM view_2_tab2_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 ) AS tab2_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
7
8
9

statement ok
DROP VIEW view_1_tab2_165

statement ok
DROP VIEW view_2_tab2_165

statement ok
DROP VIEW view_3_tab2_165

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_165 AS SELECT pk, col0 FROM tab3 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63

statement ok
CREATE VIEW view_2_tab3_165 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)

statement ok
CREATE VIEW view_3_tab3_165 AS SELECT pk FROM view_1_tab3_165

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_165
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_165
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_165 UNION ALL SELECT pk, col0 FROM view_2_tab3_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_165 UNION SELECT pk, col0 FROM view_2_tab3_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 ) AS tab3_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
7
8
9

statement ok
DROP VIEW view_1_tab3_165

statement ok
DROP VIEW view_2_tab3_165

statement ok
DROP VIEW view_3_tab3_165

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_165 AS SELECT pk, col0 FROM tab4 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63

statement ok
CREATE VIEW view_2_tab4_165 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)

statement ok
CREATE VIEW view_3_tab4_165 AS SELECT pk FROM view_1_tab4_165

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_165
----
6
0
7
65
8
47
9
88

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_165
----
12 values hashing to 5a81da09eb3ccc227179e892e7713df8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_165 UNION ALL SELECT pk, col0 FROM view_2_tab4_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_165 UNION SELECT pk, col0 FROM view_2_tab4_165
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63 ) AS tab4_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_165
----
6
7
8
9

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE col4 = 54.74 AND (col0 < 41 AND ((col3 < 49)) OR col3 > 73 OR (col0 <= 96 OR col0 IS NULL AND col0 >= 94 OR col3 >= 7 OR col1 >= 7.7 OR (col0 < 54) AND (col0 IS NULL) AND ((col3 < 26 OR col0 IS NULL AND col1 <= 9.26 AND col0 = 83 AND col3 > 20))) OR (col1 >= 51.83 AND col0 >= 40) AND col4 = 36.36 AND col4 > 71.13 AND (col4 = 82.45)) OR col3 < 63
----
6
7
8
9

statement ok
DROP VIEW view_1_tab4_165

statement ok
DROP VIEW view_2_tab4_165

statement ok
DROP VIEW view_3_tab4_165

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_166 AS SELECT pk, col0 FROM tab0 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31

statement ok
CREATE VIEW view_2_tab0_166 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)

statement ok
CREATE VIEW view_3_tab0_166 AS SELECT pk FROM view_1_tab0_166

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_166
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_166 UNION ALL SELECT pk, col0 FROM view_2_tab0_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_166 UNION SELECT pk, col0 FROM view_2_tab0_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 ) AS tab0_166
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_166
----

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

statement ok
DROP VIEW view_1_tab0_166

statement ok
DROP VIEW view_2_tab0_166

statement ok
DROP VIEW view_3_tab0_166

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_166 AS SELECT pk, col0 FROM tab1 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31

statement ok
CREATE VIEW view_2_tab1_166 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)

statement ok
CREATE VIEW view_3_tab1_166 AS SELECT pk FROM view_1_tab1_166

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_166
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_166 UNION ALL SELECT pk, col0 FROM view_2_tab1_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_166 UNION SELECT pk, col0 FROM view_2_tab1_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 ) AS tab1_166
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_166
----

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

statement ok
DROP VIEW view_1_tab1_166

statement ok
DROP VIEW view_2_tab1_166

statement ok
DROP VIEW view_3_tab1_166

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_166 AS SELECT pk, col0 FROM tab2 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31

statement ok
CREATE VIEW view_2_tab2_166 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)

statement ok
CREATE VIEW view_3_tab2_166 AS SELECT pk FROM view_1_tab2_166

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_166
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_166 UNION ALL SELECT pk, col0 FROM view_2_tab2_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_166 UNION SELECT pk, col0 FROM view_2_tab2_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 ) AS tab2_166
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_166
----

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

statement ok
DROP VIEW view_1_tab2_166

statement ok
DROP VIEW view_2_tab2_166

statement ok
DROP VIEW view_3_tab2_166

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_166 AS SELECT pk, col0 FROM tab3 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31

statement ok
CREATE VIEW view_2_tab3_166 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)

statement ok
CREATE VIEW view_3_tab3_166 AS SELECT pk FROM view_1_tab3_166

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_166
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_166 UNION ALL SELECT pk, col0 FROM view_2_tab3_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_166 UNION SELECT pk, col0 FROM view_2_tab3_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 ) AS tab3_166
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_166
----

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

statement ok
DROP VIEW view_1_tab3_166

statement ok
DROP VIEW view_2_tab3_166

statement ok
DROP VIEW view_3_tab3_166

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_166 AS SELECT pk, col0 FROM tab4 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31

statement ok
CREATE VIEW view_2_tab4_166 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)

statement ok
CREATE VIEW view_3_tab4_166 AS SELECT pk FROM view_1_tab4_166

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_166
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_166 UNION ALL SELECT pk, col0 FROM view_2_tab4_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 22) AND col3 > 39 AND col1 >= 50.31)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_166 UNION SELECT pk, col0 FROM view_2_tab4_166
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31 ) AS tab4_166
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_166
----

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE (col3 = 22) AND col3 > 39 AND col1 >= 50.31
----

statement ok
DROP VIEW view_1_tab4_166

statement ok
DROP VIEW view_2_tab4_166

statement ok
DROP VIEW view_3_tab4_166

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_167 AS SELECT pk, col0 FROM tab0 WHERE col0 = 83

statement ok
CREATE VIEW view_2_tab0_167 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 83)

statement ok
CREATE VIEW view_3_tab0_167 AS SELECT pk FROM view_1_tab0_167

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col0 = 83
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_167
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 83 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_167 UNION ALL SELECT pk, col0 FROM view_2_tab0_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 83 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_167 UNION SELECT pk, col0 FROM view_2_tab0_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 83 ) AS tab0_167
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_167
----

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col0 = 83
----

statement ok
DROP VIEW view_1_tab0_167

statement ok
DROP VIEW view_2_tab0_167

statement ok
DROP VIEW view_3_tab0_167

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_167 AS SELECT pk, col0 FROM tab1 WHERE col0 = 83

statement ok
CREATE VIEW view_2_tab1_167 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 83)

statement ok
CREATE VIEW view_3_tab1_167 AS SELECT pk FROM view_1_tab1_167

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col0 = 83
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_167
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 83 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_167 UNION ALL SELECT pk, col0 FROM view_2_tab1_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 83 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_167 UNION SELECT pk, col0 FROM view_2_tab1_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 83 ) AS tab1_167
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_167
----

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col0 = 83
----

statement ok
DROP VIEW view_1_tab1_167

statement ok
DROP VIEW view_2_tab1_167

statement ok
DROP VIEW view_3_tab1_167

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_167 AS SELECT pk, col0 FROM tab2 WHERE col0 = 83

statement ok
CREATE VIEW view_2_tab2_167 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 83)

statement ok
CREATE VIEW view_3_tab2_167 AS SELECT pk FROM view_1_tab2_167

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col0 = 83
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_167
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 83 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_167 UNION ALL SELECT pk, col0 FROM view_2_tab2_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 83 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_167 UNION SELECT pk, col0 FROM view_2_tab2_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 83 ) AS tab2_167
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_167
----

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col0 = 83
----

statement ok
DROP VIEW view_1_tab2_167

statement ok
DROP VIEW view_2_tab2_167

statement ok
DROP VIEW view_3_tab2_167

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_167 AS SELECT pk, col0 FROM tab3 WHERE col0 = 83

statement ok
CREATE VIEW view_2_tab3_167 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 83)

statement ok
CREATE VIEW view_3_tab3_167 AS SELECT pk FROM view_1_tab3_167

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col0 = 83
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_167
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 83 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_167 UNION ALL SELECT pk, col0 FROM view_2_tab3_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 83 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_167 UNION SELECT pk, col0 FROM view_2_tab3_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 83 ) AS tab3_167
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_167
----

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col0 = 83
----

statement ok
DROP VIEW view_1_tab3_167

statement ok
DROP VIEW view_2_tab3_167

statement ok
DROP VIEW view_3_tab3_167

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_167 AS SELECT pk, col0 FROM tab4 WHERE col0 = 83

statement ok
CREATE VIEW view_2_tab4_167 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 83)

statement ok
CREATE VIEW view_3_tab4_167 AS SELECT pk FROM view_1_tab4_167

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col0 = 83
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_167
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 83 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_167 UNION ALL SELECT pk, col0 FROM view_2_tab4_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 83 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 83)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_167 UNION SELECT pk, col0 FROM view_2_tab4_167
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 83 ) AS tab4_167
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_167
----

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col0 = 83
----

statement ok
DROP VIEW view_1_tab4_167

statement ok
DROP VIEW view_2_tab4_167

statement ok
DROP VIEW view_3_tab4_167

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_168 AS SELECT pk, col0 FROM tab0 WHERE ((col0 = 13 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab0_168 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 13 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_168 AS SELECT pk FROM view_1_tab0_168

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE ((col0 = 13 OR col0 IS NULL))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_168
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 = 13 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_168 UNION ALL SELECT pk, col0 FROM view_2_tab0_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 = 13 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_168 UNION SELECT pk, col0 FROM view_2_tab0_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 = 13 OR col0 IS NULL)) ) AS tab0_168
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_168
----

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE ((col0 = 13 OR col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab0_168

statement ok
DROP VIEW view_2_tab0_168

statement ok
DROP VIEW view_3_tab0_168

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_168 AS SELECT pk, col0 FROM tab1 WHERE ((col0 = 13 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab1_168 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 13 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_168 AS SELECT pk FROM view_1_tab1_168

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE ((col0 = 13 OR col0 IS NULL))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_168
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 = 13 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_168 UNION ALL SELECT pk, col0 FROM view_2_tab1_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 = 13 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_168 UNION SELECT pk, col0 FROM view_2_tab1_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 = 13 OR col0 IS NULL)) ) AS tab1_168
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_168
----

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE ((col0 = 13 OR col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab1_168

statement ok
DROP VIEW view_2_tab1_168

statement ok
DROP VIEW view_3_tab1_168

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_168 AS SELECT pk, col0 FROM tab2 WHERE ((col0 = 13 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab2_168 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 13 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_168 AS SELECT pk FROM view_1_tab2_168

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE ((col0 = 13 OR col0 IS NULL))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_168
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 = 13 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_168 UNION ALL SELECT pk, col0 FROM view_2_tab2_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 = 13 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_168 UNION SELECT pk, col0 FROM view_2_tab2_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 = 13 OR col0 IS NULL)) ) AS tab2_168
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_168
----

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE ((col0 = 13 OR col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab2_168

statement ok
DROP VIEW view_2_tab2_168

statement ok
DROP VIEW view_3_tab2_168

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_168 AS SELECT pk, col0 FROM tab3 WHERE ((col0 = 13 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab3_168 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 13 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_168 AS SELECT pk FROM view_1_tab3_168

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE ((col0 = 13 OR col0 IS NULL))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_168
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 = 13 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_168 UNION ALL SELECT pk, col0 FROM view_2_tab3_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 = 13 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_168 UNION SELECT pk, col0 FROM view_2_tab3_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 = 13 OR col0 IS NULL)) ) AS tab3_168
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_168
----

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE ((col0 = 13 OR col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab3_168

statement ok
DROP VIEW view_2_tab3_168

statement ok
DROP VIEW view_3_tab3_168

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_168 AS SELECT pk, col0 FROM tab4 WHERE ((col0 = 13 OR col0 IS NULL))

statement ok
CREATE VIEW view_2_tab4_168 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 13 OR col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_168 AS SELECT pk FROM view_1_tab4_168

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE ((col0 = 13 OR col0 IS NULL))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_168
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 = 13 OR col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_168 UNION ALL SELECT pk, col0 FROM view_2_tab4_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 = 13 OR col0 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 13 OR col0 IS NULL)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_168 UNION SELECT pk, col0 FROM view_2_tab4_168
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 = 13 OR col0 IS NULL)) ) AS tab4_168
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_168
----

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE ((col0 = 13 OR col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab4_168

statement ok
DROP VIEW view_2_tab4_168

statement ok
DROP VIEW view_3_tab4_168

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab0_169 AS SELECT pk FROM view_1_tab0_169

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE (col0 <= 83)
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 83))
----
1
95
4
84
9
88

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_169
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_169
----
1
95
4
84
9
88

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_169 UNION ALL SELECT pk, col0 FROM view_2_tab0_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_169 UNION SELECT pk, col0 FROM view_2_tab0_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 <= 83) ) AS tab0_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE (col0 <= 83)
----
0
2
3
5
6
7
8

statement ok
DROP VIEW view_1_tab0_169

statement ok
DROP VIEW view_2_tab0_169

statement ok
DROP VIEW view_3_tab0_169

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab1_169 AS SELECT pk FROM view_1_tab1_169

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE (col0 <= 83)
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 83))
----
1
95
4
84
9
88

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_169
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_169
----
1
95
4
84
9
88

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_169 UNION ALL SELECT pk, col0 FROM view_2_tab1_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_169 UNION SELECT pk, col0 FROM view_2_tab1_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 <= 83) ) AS tab1_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE (col0 <= 83)
----
0
2
3
5
6
7
8

statement ok
DROP VIEW view_1_tab1_169

statement ok
DROP VIEW view_2_tab1_169

statement ok
DROP VIEW view_3_tab1_169

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab2_169 AS SELECT pk FROM view_1_tab2_169

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE (col0 <= 83)
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 83))
----
1
95
4
84
9
88

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_169
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_169
----
1
95
4
84
9
88

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_169 UNION ALL SELECT pk, col0 FROM view_2_tab2_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_169 UNION SELECT pk, col0 FROM view_2_tab2_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 <= 83) ) AS tab2_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE (col0 <= 83)
----
0
2
3
5
6
7
8

statement ok
DROP VIEW view_1_tab2_169

statement ok
DROP VIEW view_2_tab2_169

statement ok
DROP VIEW view_3_tab2_169

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab3_169 AS SELECT pk FROM view_1_tab3_169

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE (col0 <= 83)
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 83))
----
1
95
4
84
9
88

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_169
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_169
----
1
95
4
84
9
88

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_169 UNION ALL SELECT pk, col0 FROM view_2_tab3_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_169 UNION SELECT pk, col0 FROM view_2_tab3_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 <= 83) ) AS tab3_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE (col0 <= 83)
----
0
2
3
5
6
7
8

statement ok
DROP VIEW view_1_tab3_169

statement ok
DROP VIEW view_2_tab3_169

statement ok
DROP VIEW view_3_tab3_169

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab4_169 AS SELECT pk FROM view_1_tab4_169

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE (col0 <= 83)
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 83))
----
1
95
4
84
9
88

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_169
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_169
----
1
95
4
84
9
88

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_169 UNION ALL SELECT pk, col0 FROM view_2_tab4_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_169 UNION SELECT pk, col0 FROM view_2_tab4_169
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 <= 83) ) AS tab4_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_169
----
0
2
3
5
6
7
8

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE (col0 <= 83)
----
0
2
3
5
6
7
8

statement ok
DROP VIEW view_1_tab4_169

statement ok
DROP VIEW view_2_tab4_169

statement ok
DROP VIEW view_3_tab4_169

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_170 AS SELECT pk, col0 FROM tab0 WHERE (((col0 < 21)))

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

statement ok
CREATE VIEW view_3_tab0_170 AS SELECT pk FROM view_1_tab0_170

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE (((col0 < 21)))
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 21))))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_170
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_170
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_170 UNION ALL SELECT pk, col0 FROM view_2_tab0_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_170 UNION SELECT pk, col0 FROM view_2_tab0_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 < 21))) ) AS tab0_170
----
6

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_170
----
6

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE (((col0 < 21)))
----
6

statement ok
DROP VIEW view_1_tab0_170

statement ok
DROP VIEW view_2_tab0_170

statement ok
DROP VIEW view_3_tab0_170

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_170 AS SELECT pk, col0 FROM tab1 WHERE (((col0 < 21)))

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

statement ok
CREATE VIEW view_3_tab1_170 AS SELECT pk FROM view_1_tab1_170

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE (((col0 < 21)))
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 21))))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_170
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_170
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_170 UNION ALL SELECT pk, col0 FROM view_2_tab1_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_170 UNION SELECT pk, col0 FROM view_2_tab1_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 < 21))) ) AS tab1_170
----
6

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_170
----
6

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE (((col0 < 21)))
----
6

statement ok
DROP VIEW view_1_tab1_170

statement ok
DROP VIEW view_2_tab1_170

statement ok
DROP VIEW view_3_tab1_170

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_170 AS SELECT pk, col0 FROM tab2 WHERE (((col0 < 21)))

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

statement ok
CREATE VIEW view_3_tab2_170 AS SELECT pk FROM view_1_tab2_170

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE (((col0 < 21)))
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 21))))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_170
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_170
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_170 UNION ALL SELECT pk, col0 FROM view_2_tab2_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_170 UNION SELECT pk, col0 FROM view_2_tab2_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 < 21))) ) AS tab2_170
----
6

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_170
----
6

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE (((col0 < 21)))
----
6

statement ok
DROP VIEW view_1_tab2_170

statement ok
DROP VIEW view_2_tab2_170

statement ok
DROP VIEW view_3_tab2_170

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_170 AS SELECT pk, col0 FROM tab3 WHERE (((col0 < 21)))

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

statement ok
CREATE VIEW view_3_tab3_170 AS SELECT pk FROM view_1_tab3_170

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE (((col0 < 21)))
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 21))))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_170
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_170
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_170 UNION ALL SELECT pk, col0 FROM view_2_tab3_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_170 UNION SELECT pk, col0 FROM view_2_tab3_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 < 21))) ) AS tab3_170
----
6

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_170
----
6

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE (((col0 < 21)))
----
6

statement ok
DROP VIEW view_1_tab3_170

statement ok
DROP VIEW view_2_tab3_170

statement ok
DROP VIEW view_3_tab3_170

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_170 AS SELECT pk, col0 FROM tab4 WHERE (((col0 < 21)))

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

statement ok
CREATE VIEW view_3_tab4_170 AS SELECT pk FROM view_1_tab4_170

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE (((col0 < 21)))
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 21))))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_170
----
6
0

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_170
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_170 UNION ALL SELECT pk, col0 FROM view_2_tab4_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_170 UNION SELECT pk, col0 FROM view_2_tab4_170
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 < 21))) ) AS tab4_170
----
6

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_170
----
6

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE (((col0 < 21)))
----
6

statement ok
DROP VIEW view_1_tab4_170

statement ok
DROP VIEW view_2_tab4_170

statement ok
DROP VIEW view_3_tab4_170

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_171 AS SELECT pk, col0 FROM tab0 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)

statement ok
CREATE VIEW view_2_tab0_171 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))

statement ok
CREATE VIEW view_3_tab0_171 AS SELECT pk FROM view_1_tab0_171

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_171
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_171
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_171 UNION ALL SELECT pk, col0 FROM view_2_tab0_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_171 UNION SELECT pk, col0 FROM view_2_tab0_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) ) AS tab0_171
----
8

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_171
----
8

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8

statement ok
DROP VIEW view_1_tab0_171

statement ok
DROP VIEW view_2_tab0_171

statement ok
DROP VIEW view_3_tab0_171

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_171 AS SELECT pk, col0 FROM tab1 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)

statement ok
CREATE VIEW view_2_tab1_171 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))

statement ok
CREATE VIEW view_3_tab1_171 AS SELECT pk FROM view_1_tab1_171

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_171
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_171
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_171 UNION ALL SELECT pk, col0 FROM view_2_tab1_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_171 UNION SELECT pk, col0 FROM view_2_tab1_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) ) AS tab1_171
----
8

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_171
----
8

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8

statement ok
DROP VIEW view_1_tab1_171

statement ok
DROP VIEW view_2_tab1_171

statement ok
DROP VIEW view_3_tab1_171

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_171 AS SELECT pk, col0 FROM tab2 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)

statement ok
CREATE VIEW view_2_tab2_171 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))

statement ok
CREATE VIEW view_3_tab2_171 AS SELECT pk FROM view_1_tab2_171

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_171
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_171
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_171 UNION ALL SELECT pk, col0 FROM view_2_tab2_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_171 UNION SELECT pk, col0 FROM view_2_tab2_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) ) AS tab2_171
----
8

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_171
----
8

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8

statement ok
DROP VIEW view_1_tab2_171

statement ok
DROP VIEW view_2_tab2_171

statement ok
DROP VIEW view_3_tab2_171

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_171 AS SELECT pk, col0 FROM tab3 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)

statement ok
CREATE VIEW view_2_tab3_171 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))

statement ok
CREATE VIEW view_3_tab3_171 AS SELECT pk FROM view_1_tab3_171

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_171
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_171
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_171 UNION ALL SELECT pk, col0 FROM view_2_tab3_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_171 UNION SELECT pk, col0 FROM view_2_tab3_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) ) AS tab3_171
----
8

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_171
----
8

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8

statement ok
DROP VIEW view_1_tab3_171

statement ok
DROP VIEW view_2_tab3_171

statement ok
DROP VIEW view_3_tab3_171

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_171 AS SELECT pk, col0 FROM tab4 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)

statement ok
CREATE VIEW view_2_tab4_171 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))

statement ok
CREATE VIEW view_3_tab4_171 AS SELECT pk FROM view_1_tab4_171

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_171
----
8
47

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_171
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_171 UNION ALL SELECT pk, col0 FROM view_2_tab4_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 < 1) AND col3 > 81 OR col1 < 33.10))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_171 UNION SELECT pk, col0 FROM view_2_tab4_171
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10) ) AS tab4_171
----
8

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_171
----
8

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE ((col0 < 1) AND col3 > 81 OR col1 < 33.10)
----
8

statement ok
DROP VIEW view_1_tab4_171

statement ok
DROP VIEW view_2_tab4_171

statement ok
DROP VIEW view_3_tab4_171

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_172 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 37

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

statement ok
CREATE VIEW view_3_tab0_172 AS SELECT pk FROM view_1_tab0_172

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 37
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 37)
----
6
0

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_172
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_172
----
6
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_172 UNION ALL SELECT pk, col0 FROM view_2_tab0_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_172 UNION SELECT pk, col0 FROM view_2_tab0_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 37 ) AS tab0_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE col3 >= 37
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_172

statement ok
DROP VIEW view_2_tab0_172

statement ok
DROP VIEW view_3_tab0_172

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_172 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 37

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

statement ok
CREATE VIEW view_3_tab1_172 AS SELECT pk FROM view_1_tab1_172

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 37
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 37)
----
6
0

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_172
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_172
----
6
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_172 UNION ALL SELECT pk, col0 FROM view_2_tab1_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_172 UNION SELECT pk, col0 FROM view_2_tab1_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 37 ) AS tab1_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE col3 >= 37
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_172

statement ok
DROP VIEW view_2_tab1_172

statement ok
DROP VIEW view_3_tab1_172

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_172 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 37

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

statement ok
CREATE VIEW view_3_tab2_172 AS SELECT pk FROM view_1_tab2_172

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 37
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 37)
----
6
0

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_172
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_172
----
6
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_172 UNION ALL SELECT pk, col0 FROM view_2_tab2_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_172 UNION SELECT pk, col0 FROM view_2_tab2_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 37 ) AS tab2_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE col3 >= 37
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_172

statement ok
DROP VIEW view_2_tab2_172

statement ok
DROP VIEW view_3_tab2_172

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_172 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 37

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

statement ok
CREATE VIEW view_3_tab3_172 AS SELECT pk FROM view_1_tab3_172

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 37
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 37)
----
6
0

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_172
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_172
----
6
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_172 UNION ALL SELECT pk, col0 FROM view_2_tab3_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_172 UNION SELECT pk, col0 FROM view_2_tab3_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 37 ) AS tab3_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE col3 >= 37
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_172

statement ok
DROP VIEW view_2_tab3_172

statement ok
DROP VIEW view_3_tab3_172

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_172 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 37

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

statement ok
CREATE VIEW view_3_tab4_172 AS SELECT pk FROM view_1_tab4_172

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 37
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 37)
----
6
0

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_172
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_172
----
6
0

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_172 UNION ALL SELECT pk, col0 FROM view_2_tab4_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_172 UNION SELECT pk, col0 FROM view_2_tab4_172
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 37 ) AS tab4_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_172
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE col3 >= 37
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_172

statement ok
DROP VIEW view_2_tab4_172

statement ok
DROP VIEW view_3_tab4_172

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_173 AS SELECT pk, col0 FROM tab0 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)

statement ok
CREATE VIEW view_2_tab0_173 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))

statement ok
CREATE VIEW view_3_tab0_173 AS SELECT pk FROM view_1_tab0_173

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_173
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_173 UNION ALL SELECT pk, col0 FROM view_2_tab0_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_173 UNION SELECT pk, col0 FROM view_2_tab0_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) ) AS tab0_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_173

statement ok
DROP VIEW view_2_tab0_173

statement ok
DROP VIEW view_3_tab0_173

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_173 AS SELECT pk, col0 FROM tab1 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)

statement ok
CREATE VIEW view_2_tab1_173 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))

statement ok
CREATE VIEW view_3_tab1_173 AS SELECT pk FROM view_1_tab1_173

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_173
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_173 UNION ALL SELECT pk, col0 FROM view_2_tab1_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_173 UNION SELECT pk, col0 FROM view_2_tab1_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) ) AS tab1_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_173

statement ok
DROP VIEW view_2_tab1_173

statement ok
DROP VIEW view_3_tab1_173

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_173 AS SELECT pk, col0 FROM tab2 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)

statement ok
CREATE VIEW view_2_tab2_173 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))

statement ok
CREATE VIEW view_3_tab2_173 AS SELECT pk FROM view_1_tab2_173

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_173
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_173 UNION ALL SELECT pk, col0 FROM view_2_tab2_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_173 UNION SELECT pk, col0 FROM view_2_tab2_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) ) AS tab2_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_173

statement ok
DROP VIEW view_2_tab2_173

statement ok
DROP VIEW view_3_tab2_173

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_173 AS SELECT pk, col0 FROM tab3 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)

statement ok
CREATE VIEW view_2_tab3_173 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))

statement ok
CREATE VIEW view_3_tab3_173 AS SELECT pk FROM view_1_tab3_173

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_173
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_173 UNION ALL SELECT pk, col0 FROM view_2_tab3_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_173 UNION SELECT pk, col0 FROM view_2_tab3_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) ) AS tab3_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_173

statement ok
DROP VIEW view_2_tab3_173

statement ok
DROP VIEW view_3_tab3_173

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_173 AS SELECT pk, col0 FROM tab4 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)

statement ok
CREATE VIEW view_2_tab4_173 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))

statement ok
CREATE VIEW view_3_tab4_173 AS SELECT pk FROM view_1_tab4_173

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_173
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_173 UNION ALL SELECT pk, col0 FROM view_2_tab4_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.1 AND col0 < 88 OR (col4 < 93.8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_173 UNION SELECT pk, col0 FROM view_2_tab4_173
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8) ) AS tab4_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_173
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col1 > 56.1 AND col0 < 88 OR (col4 < 93.8)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_173

statement ok
DROP VIEW view_2_tab4_173

statement ok
DROP VIEW view_3_tab4_173

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_174 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 16)

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

statement ok
CREATE VIEW view_3_tab0_174 AS SELECT pk FROM view_1_tab0_174

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 16)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_174
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_174 UNION ALL SELECT pk, col0 FROM view_2_tab0_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_174 UNION SELECT pk, col0 FROM view_2_tab0_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 16) ) AS tab0_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE (col3 >= 16)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_174

statement ok
DROP VIEW view_2_tab0_174

statement ok
DROP VIEW view_3_tab0_174

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_174 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 16)

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

statement ok
CREATE VIEW view_3_tab1_174 AS SELECT pk FROM view_1_tab1_174

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 16)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_174
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_174 UNION ALL SELECT pk, col0 FROM view_2_tab1_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_174 UNION SELECT pk, col0 FROM view_2_tab1_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 16) ) AS tab1_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE (col3 >= 16)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_174

statement ok
DROP VIEW view_2_tab1_174

statement ok
DROP VIEW view_3_tab1_174

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_174 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 16)

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

statement ok
CREATE VIEW view_3_tab2_174 AS SELECT pk FROM view_1_tab2_174

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 16)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_174
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_174 UNION ALL SELECT pk, col0 FROM view_2_tab2_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_174 UNION SELECT pk, col0 FROM view_2_tab2_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 16) ) AS tab2_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE (col3 >= 16)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_174

statement ok
DROP VIEW view_2_tab2_174

statement ok
DROP VIEW view_3_tab2_174

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_174 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 16)

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

statement ok
CREATE VIEW view_3_tab3_174 AS SELECT pk FROM view_1_tab3_174

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 16)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_174
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_174 UNION ALL SELECT pk, col0 FROM view_2_tab3_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_174 UNION SELECT pk, col0 FROM view_2_tab3_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 16) ) AS tab3_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE (col3 >= 16)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_174

statement ok
DROP VIEW view_2_tab3_174

statement ok
DROP VIEW view_3_tab3_174

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_174 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 16)

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

statement ok
CREATE VIEW view_3_tab4_174 AS SELECT pk FROM view_1_tab4_174

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 16)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_174
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_174 UNION ALL SELECT pk, col0 FROM view_2_tab4_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_174 UNION SELECT pk, col0 FROM view_2_tab4_174
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 16) ) AS tab4_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_174
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE (col3 >= 16)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_174

statement ok
DROP VIEW view_2_tab4_174

statement ok
DROP VIEW view_3_tab4_174

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_175 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)

statement ok
CREATE VIEW view_2_tab0_175 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))

statement ok
CREATE VIEW view_3_tab0_175 AS SELECT pk FROM view_1_tab0_175

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_175
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_175
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_175 UNION ALL SELECT pk, col0 FROM view_2_tab0_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_175 UNION SELECT pk, col0 FROM view_2_tab0_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) ) AS tab0_175
----
1

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_175
----
1

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1

statement ok
DROP VIEW view_1_tab0_175

statement ok
DROP VIEW view_2_tab0_175

statement ok
DROP VIEW view_3_tab0_175

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_175 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)

statement ok
CREATE VIEW view_2_tab1_175 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))

statement ok
CREATE VIEW view_3_tab1_175 AS SELECT pk FROM view_1_tab1_175

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_175
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_175
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_175 UNION ALL SELECT pk, col0 FROM view_2_tab1_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_175 UNION SELECT pk, col0 FROM view_2_tab1_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) ) AS tab1_175
----
1

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_175
----
1

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1

statement ok
DROP VIEW view_1_tab1_175

statement ok
DROP VIEW view_2_tab1_175

statement ok
DROP VIEW view_3_tab1_175

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_175 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)

statement ok
CREATE VIEW view_2_tab2_175 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))

statement ok
CREATE VIEW view_3_tab2_175 AS SELECT pk FROM view_1_tab2_175

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_175
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_175
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_175 UNION ALL SELECT pk, col0 FROM view_2_tab2_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_175 UNION SELECT pk, col0 FROM view_2_tab2_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) ) AS tab2_175
----
1

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_175
----
1

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1

statement ok
DROP VIEW view_1_tab2_175

statement ok
DROP VIEW view_2_tab2_175

statement ok
DROP VIEW view_3_tab2_175

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_175 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)

statement ok
CREATE VIEW view_2_tab3_175 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))

statement ok
CREATE VIEW view_3_tab3_175 AS SELECT pk FROM view_1_tab3_175

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_175
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_175
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_175 UNION ALL SELECT pk, col0 FROM view_2_tab3_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_175 UNION SELECT pk, col0 FROM view_2_tab3_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) ) AS tab3_175
----
1

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_175
----
1

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1

statement ok
DROP VIEW view_1_tab3_175

statement ok
DROP VIEW view_2_tab3_175

statement ok
DROP VIEW view_3_tab3_175

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_175 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)

statement ok
CREATE VIEW view_2_tab4_175 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))

statement ok
CREATE VIEW view_3_tab4_175 AS SELECT pk FROM view_1_tab4_175

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_175
----
1
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_175
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_175 UNION ALL SELECT pk, col0 FROM view_2_tab4_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 = 32 OR (col0 > 89))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_175 UNION SELECT pk, col0 FROM view_2_tab4_175
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89) ) AS tab4_175
----
1

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_175
----
1

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE col0 IS NULL OR col3 = 32 OR (col0 > 89)
----
1

statement ok
DROP VIEW view_1_tab4_175

statement ok
DROP VIEW view_2_tab4_175

statement ok
DROP VIEW view_3_tab4_175

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_176 AS SELECT pk, col0 FROM tab0 WHERE col0 > 89

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

statement ok
CREATE VIEW view_3_tab0_176 AS SELECT pk FROM view_1_tab0_176

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE col0 > 89
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 89)
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_176
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_176
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_176 UNION ALL SELECT pk, col0 FROM view_2_tab0_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_176 UNION SELECT pk, col0 FROM view_2_tab0_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 89 ) AS tab0_176
----
1

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_176
----
1

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE col0 > 89
----
1

statement ok
DROP VIEW view_1_tab0_176

statement ok
DROP VIEW view_2_tab0_176

statement ok
DROP VIEW view_3_tab0_176

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_176 AS SELECT pk, col0 FROM tab1 WHERE col0 > 89

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

statement ok
CREATE VIEW view_3_tab1_176 AS SELECT pk FROM view_1_tab1_176

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE col0 > 89
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 89)
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_176
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_176
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 89 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_176 UNION ALL SELECT pk, col0 FROM view_2_tab1_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 89 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_176 UNION SELECT pk, col0 FROM view_2_tab1_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 89 ) AS tab1_176
----
1

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_176
----
1

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE col0 > 89
----
1

statement ok
DROP VIEW view_1_tab1_176

statement ok
DROP VIEW view_2_tab1_176

statement ok
DROP VIEW view_3_tab1_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_176') DROP VIEW view_1_tab2_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_176') DROP VIEW view_2_tab2_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_176') DROP VIEW view_3_tab2_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_176

statement ok
CREATE VIEW view_1_tab2_176 AS SELECT pk, col0 FROM tab2 WHERE col0 > 89

statement ok
CREATE VIEW view_2_tab2_176 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 89)

statement ok
CREATE VIEW view_3_tab2_176 AS SELECT pk FROM view_1_tab2_176

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE col0 > 89
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 89)
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_176
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_176
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 89 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_176 UNION ALL SELECT pk, col0 FROM view_2_tab2_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 89 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_176 UNION SELECT pk, col0 FROM view_2_tab2_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 89 ) AS tab2_176
----
1

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_176
----
1

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE col0 > 89
----
1

statement ok
DROP VIEW view_1_tab2_176

statement ok
DROP VIEW view_2_tab2_176

statement ok
DROP VIEW view_3_tab2_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_176') DROP VIEW view_1_tab3_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_176') DROP VIEW view_2_tab3_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_176') DROP VIEW view_3_tab3_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_176

statement ok
CREATE VIEW view_1_tab3_176 AS SELECT pk, col0 FROM tab3 WHERE col0 > 89

statement ok
CREATE VIEW view_2_tab3_176 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 89)

statement ok
CREATE VIEW view_3_tab3_176 AS SELECT pk FROM view_1_tab3_176

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE col0 > 89
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 89)
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_176
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_176
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 89 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_176 UNION ALL SELECT pk, col0 FROM view_2_tab3_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 89 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_176 UNION SELECT pk, col0 FROM view_2_tab3_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 89 ) AS tab3_176
----
1

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_176
----
1

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE col0 > 89
----
1

statement ok
DROP VIEW view_1_tab3_176

statement ok
DROP VIEW view_2_tab3_176

statement ok
DROP VIEW view_3_tab3_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_176') DROP VIEW view_1_tab4_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_176') DROP VIEW view_2_tab4_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_176') DROP VIEW view_3_tab4_176

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_176

statement ok
CREATE VIEW view_1_tab4_176 AS SELECT pk, col0 FROM tab4 WHERE col0 > 89

statement ok
CREATE VIEW view_2_tab4_176 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 89)

statement ok
CREATE VIEW view_3_tab4_176 AS SELECT pk FROM view_1_tab4_176

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE col0 > 89
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 89)
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_176
----
1
95

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_176
----
18 values hashing to 9dcb19751e9878db981c24c73d7f3465

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 89 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_176 UNION ALL SELECT pk, col0 FROM view_2_tab4_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 89 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_176 UNION SELECT pk, col0 FROM view_2_tab4_176
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 89 ) AS tab4_176
----
1

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_176
----
1

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE col0 > 89
----
1

statement ok
DROP VIEW view_1_tab4_176

statement ok
DROP VIEW view_2_tab4_176

statement ok
DROP VIEW view_3_tab4_176

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_177') DROP VIEW view_1_tab0_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_177') DROP VIEW view_2_tab0_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_177') DROP VIEW view_3_tab0_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_177

statement ok
CREATE VIEW view_1_tab0_177 AS SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))

statement ok
CREATE VIEW view_2_tab0_177 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))

statement ok
CREATE VIEW view_3_tab0_177 AS SELECT pk FROM view_1_tab0_177

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_177
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_177
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_177 UNION ALL SELECT pk, col0 FROM view_2_tab0_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_177 UNION SELECT pk, col0 FROM view_2_tab0_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) ) AS tab0_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
5
6
7

statement ok
DROP VIEW view_1_tab0_177

statement ok
DROP VIEW view_2_tab0_177

statement ok
DROP VIEW view_3_tab0_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_177') DROP VIEW view_1_tab1_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_177') DROP VIEW view_2_tab1_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_177') DROP VIEW view_3_tab1_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_177

statement ok
CREATE VIEW view_1_tab1_177 AS SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))

statement ok
CREATE VIEW view_2_tab1_177 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))

statement ok
CREATE VIEW view_3_tab1_177 AS SELECT pk FROM view_1_tab1_177

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_177
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_177
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_177 UNION ALL SELECT pk, col0 FROM view_2_tab1_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_177 UNION SELECT pk, col0 FROM view_2_tab1_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) ) AS tab1_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
5
6
7

statement ok
DROP VIEW view_1_tab1_177

statement ok
DROP VIEW view_2_tab1_177

statement ok
DROP VIEW view_3_tab1_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_177') DROP VIEW view_1_tab2_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_177') DROP VIEW view_2_tab2_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_177') DROP VIEW view_3_tab2_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_177

statement ok
CREATE VIEW view_1_tab2_177 AS SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))

statement ok
CREATE VIEW view_2_tab2_177 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))

statement ok
CREATE VIEW view_3_tab2_177 AS SELECT pk FROM view_1_tab2_177

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_177
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_177
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_177 UNION ALL SELECT pk, col0 FROM view_2_tab2_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_177 UNION SELECT pk, col0 FROM view_2_tab2_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) ) AS tab2_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
5
6
7

statement ok
DROP VIEW view_1_tab2_177

statement ok
DROP VIEW view_2_tab2_177

statement ok
DROP VIEW view_3_tab2_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_177') DROP VIEW view_1_tab3_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_177') DROP VIEW view_2_tab3_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_177') DROP VIEW view_3_tab3_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_177

statement ok
CREATE VIEW view_1_tab3_177 AS SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))

statement ok
CREATE VIEW view_2_tab3_177 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))

statement ok
CREATE VIEW view_3_tab3_177 AS SELECT pk FROM view_1_tab3_177

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_177
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_177
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_177 UNION ALL SELECT pk, col0 FROM view_2_tab3_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_177 UNION SELECT pk, col0 FROM view_2_tab3_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) ) AS tab3_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
5
6
7

statement ok
DROP VIEW view_1_tab3_177

statement ok
DROP VIEW view_2_tab3_177

statement ok
DROP VIEW view_3_tab3_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_177') DROP VIEW view_1_tab4_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_177') DROP VIEW view_2_tab4_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_177') DROP VIEW view_3_tab4_177

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_177

statement ok
CREATE VIEW view_1_tab4_177 AS SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))

statement ok
CREATE VIEW view_2_tab4_177 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))

statement ok
CREATE VIEW view_3_tab4_177 AS SELECT pk FROM view_1_tab4_177

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_177
----
4
84
5
58
6
0
7
65

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_177
----
12 values hashing to cd8c31e1e33656afa6515b69baa934e8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_177 UNION ALL SELECT pk, col0 FROM view_2_tab4_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_177 UNION SELECT pk, col0 FROM view_2_tab4_177
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62)))) ) AS tab4_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_177
----
4
5
6
7

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE ((col0 >= 99 AND (col1 IS NULL OR col3 < 92 AND col0 >= 39 AND col1 >= 35.88 OR ((col0 IS NULL AND ((col3 > 62) AND (col3 > 59) OR ((col1 IS NULL))) AND col0 >= 13)) AND (((col4 > 43.91 AND ((col0 > 33 OR col3 < 42 OR col1 > 49.5)) OR col0 <= 9 OR (col3 > 76)))) AND (col3 > 56)) AND col4 IN (70.62,69.41,26.9,98.29))) OR ((((((((col4 <= 82.44 OR (col3 IN (20)) AND col0 IN (81,42))))) OR col3 <= 38)) OR col4 < 68.31 AND (col3 < 82 AND col0 < 62))))
----
4
5
6
7

statement ok
DROP VIEW view_1_tab4_177

statement ok
DROP VIEW view_2_tab4_177

statement ok
DROP VIEW view_3_tab4_177

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_178') DROP VIEW view_1_tab0_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_178') DROP VIEW view_2_tab0_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_178') DROP VIEW view_3_tab0_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_178

statement ok
CREATE VIEW view_1_tab0_178 AS SELECT pk, col0 FROM tab0 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)

statement ok
CREATE VIEW view_2_tab0_178 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))

statement ok
CREATE VIEW view_3_tab0_178 AS SELECT pk FROM view_1_tab0_178

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_178
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_178 UNION ALL SELECT pk, col0 FROM view_2_tab0_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_178 UNION SELECT pk, col0 FROM view_2_tab0_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) ) AS tab0_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab0 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab0 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab0 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab0 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_178

statement ok
DROP VIEW view_2_tab0_178

statement ok
DROP VIEW view_3_tab0_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_178') DROP VIEW view_1_tab1_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_178') DROP VIEW view_2_tab1_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_178') DROP VIEW view_3_tab1_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_178

statement ok
CREATE VIEW view_1_tab1_178 AS SELECT pk, col0 FROM tab1 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)

statement ok
CREATE VIEW view_2_tab1_178 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))

statement ok
CREATE VIEW view_3_tab1_178 AS SELECT pk FROM view_1_tab1_178

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_178
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_178 UNION ALL SELECT pk, col0 FROM view_2_tab1_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_178 UNION SELECT pk, col0 FROM view_2_tab1_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) ) AS tab1_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab1 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab1 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab1 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab1 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_178

statement ok
DROP VIEW view_2_tab1_178

statement ok
DROP VIEW view_3_tab1_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_178') DROP VIEW view_1_tab2_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_178') DROP VIEW view_2_tab2_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_178') DROP VIEW view_3_tab2_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_178

statement ok
CREATE VIEW view_1_tab2_178 AS SELECT pk, col0 FROM tab2 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)

statement ok
CREATE VIEW view_2_tab2_178 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))

statement ok
CREATE VIEW view_3_tab2_178 AS SELECT pk FROM view_1_tab2_178

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_178
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_178 UNION ALL SELECT pk, col0 FROM view_2_tab2_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_178 UNION SELECT pk, col0 FROM view_2_tab2_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) ) AS tab2_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab2 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab2 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab2 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab2 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_178

statement ok
DROP VIEW view_2_tab2_178

statement ok
DROP VIEW view_3_tab2_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_178') DROP VIEW view_1_tab3_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_178') DROP VIEW view_2_tab3_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_178') DROP VIEW view_3_tab3_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_178

statement ok
CREATE VIEW view_1_tab3_178 AS SELECT pk, col0 FROM tab3 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)

statement ok
CREATE VIEW view_2_tab3_178 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))

statement ok
CREATE VIEW view_3_tab3_178 AS SELECT pk FROM view_1_tab3_178

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_178
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_178 UNION ALL SELECT pk, col0 FROM view_2_tab3_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_178 UNION SELECT pk, col0 FROM view_2_tab3_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) ) AS tab3_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab3 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab3 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab3 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab3 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_178

statement ok
DROP VIEW view_2_tab3_178

statement ok
DROP VIEW view_3_tab3_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_178') DROP VIEW view_1_tab4_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_178') DROP VIEW view_2_tab4_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_178') DROP VIEW view_3_tab4_178

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_178

statement ok
CREATE VIEW view_1_tab4_178 AS SELECT pk, col0 FROM tab4 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)

statement ok
CREATE VIEW view_2_tab4_178 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))

statement ok
CREATE VIEW view_3_tab4_178 AS SELECT pk FROM view_1_tab4_178

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_178
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_178 UNION ALL SELECT pk, col0 FROM view_2_tab4_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_178 UNION SELECT pk, col0 FROM view_2_tab4_178
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50) ) AS tab4_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_178
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE (((col0 = 19 AND col3 < 41)) OR (col0 <= 25 OR col1 > 12.63 OR (col3 > 50 OR col3 < 10 AND (col0 >= 51 AND col4 > 36.17 OR (((col0 >= 95) OR (col1 < 85.14 OR (((col0 > 74 OR col0 IS NULL AND ((col0 <= 28)) AND col4 IN (SELECT col1 FROM tab4 WHERE col1 IN (85.83,99.74,5.30,88.59,55.47,91.6))))) AND col4 < 21.68 AND col3 > 11 OR col0 IN (SELECT col3 FROM tab4 WHERE (col3 IS NULL) AND col0 IS NULL OR col4 > 99.14 OR (col3 < 88 OR ((col3 = 60 AND (col3 > 37))) AND col1 BETWEEN 13.77 AND 24.18) AND (col0 > 54)) AND (col3 = 83))))) AND col4 > 93.78 AND col4 < 8.75))) OR col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 35)) AND col0 >= 54 OR col4 IN (19.96) AND ((((col4 >= 36.99)) AND (col0 = 90) OR ((col3 > 42 AND col3 <= 50)) AND (col0 < 16 OR col3 < 61 AND col0 < 82 OR col0 IS NULL OR ((col1 < 85.69) AND col4 < 70.47) AND col1 <= 94.31 AND ((col0 >= 65 OR col1 IN (SELECT col4 FROM tab4 WHERE (col0 < 66 OR col3 < 50)) OR col1 >= 83.17 AND col3 = 1 AND col0 <= 51 AND (col1 IS NULL) OR (col3 = 68 AND (col4 IS NULL)) OR col3 > 41 AND col3 > 50 OR ((col0 >= 1 OR (col1 <= 6.41)) AND col4 < 37.84) OR col3 IN (SELECT col0 FROM tab4 WHERE col0 < 80) OR (col1 > 71.6) AND col0 = 19)) AND (col0 >= 69) AND col4 >= 38.57) OR col3 > 73 OR col3 < 60 AND (col0 < 78) AND col0 < 38 AND col4 < 44.50 OR ((col3 IS NULL AND (col0 = 69) OR col0 <= 7)) OR (col3 > 12) AND col0 < 99)) AND (col3 < 50)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_178

statement ok
DROP VIEW view_2_tab4_178

statement ok
DROP VIEW view_3_tab4_178

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_179') DROP VIEW view_1_tab0_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_179') DROP VIEW view_2_tab0_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_179') DROP VIEW view_3_tab0_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_179

statement ok
CREATE VIEW view_1_tab0_179 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 82)

statement ok
CREATE VIEW view_2_tab0_179 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 82))

statement ok
CREATE VIEW view_3_tab0_179 AS SELECT pk FROM view_1_tab0_179

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 82)
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 82))
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_179
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_179
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 82) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_179 UNION ALL SELECT pk, col0 FROM view_2_tab0_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 82) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_179 UNION SELECT pk, col0 FROM view_2_tab0_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 82) ) AS tab0_179
----
1
4
9

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_179
----
1
4
9

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE (col0 >= 82)
----
1
4
9

statement ok
DROP VIEW view_1_tab0_179

statement ok
DROP VIEW view_2_tab0_179

statement ok
DROP VIEW view_3_tab0_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_179') DROP VIEW view_1_tab1_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_179') DROP VIEW view_2_tab1_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_179') DROP VIEW view_3_tab1_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_179

statement ok
CREATE VIEW view_1_tab1_179 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 82)

statement ok
CREATE VIEW view_2_tab1_179 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 82))

statement ok
CREATE VIEW view_3_tab1_179 AS SELECT pk FROM view_1_tab1_179

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 82)
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 82))
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_179
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_179
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 82) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_179 UNION ALL SELECT pk, col0 FROM view_2_tab1_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 82) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_179 UNION SELECT pk, col0 FROM view_2_tab1_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 82) ) AS tab1_179
----
1
4
9

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_179
----
1
4
9

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE (col0 >= 82)
----
1
4
9

statement ok
DROP VIEW view_1_tab1_179

statement ok
DROP VIEW view_2_tab1_179

statement ok
DROP VIEW view_3_tab1_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_179') DROP VIEW view_1_tab2_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_179') DROP VIEW view_2_tab2_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_179') DROP VIEW view_3_tab2_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_179

statement ok
CREATE VIEW view_1_tab2_179 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 82)

statement ok
CREATE VIEW view_2_tab2_179 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 82))

statement ok
CREATE VIEW view_3_tab2_179 AS SELECT pk FROM view_1_tab2_179

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 82)
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 82))
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_179
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_179
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 82) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_179 UNION ALL SELECT pk, col0 FROM view_2_tab2_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 82) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_179 UNION SELECT pk, col0 FROM view_2_tab2_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 82) ) AS tab2_179
----
1
4
9

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_179
----
1
4
9

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE (col0 >= 82)
----
1
4
9

statement ok
DROP VIEW view_1_tab2_179

statement ok
DROP VIEW view_2_tab2_179

statement ok
DROP VIEW view_3_tab2_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_179') DROP VIEW view_1_tab3_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_179') DROP VIEW view_2_tab3_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_179') DROP VIEW view_3_tab3_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_179

statement ok
CREATE VIEW view_1_tab3_179 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 82)

statement ok
CREATE VIEW view_2_tab3_179 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 82))

statement ok
CREATE VIEW view_3_tab3_179 AS SELECT pk FROM view_1_tab3_179

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 82)
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 82))
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_179
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_179
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 82) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_179 UNION ALL SELECT pk, col0 FROM view_2_tab3_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 82) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_179 UNION SELECT pk, col0 FROM view_2_tab3_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 82) ) AS tab3_179
----
1
4
9

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_179
----
1
4
9

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE (col0 >= 82)
----
1
4
9

statement ok
DROP VIEW view_1_tab3_179

statement ok
DROP VIEW view_2_tab3_179

statement ok
DROP VIEW view_3_tab3_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_179') DROP VIEW view_1_tab4_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_179') DROP VIEW view_2_tab4_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_179') DROP VIEW view_3_tab4_179

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_179

statement ok
CREATE VIEW view_1_tab4_179 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 82)

statement ok
CREATE VIEW view_2_tab4_179 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 82))

statement ok
CREATE VIEW view_3_tab4_179 AS SELECT pk FROM view_1_tab4_179

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 82)
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 82))
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_179
----
1
95
4
84
9
88

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_179
----
14 values hashing to 0f193040dcd83852c46a164ad338c336

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 82) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_179 UNION ALL SELECT pk, col0 FROM view_2_tab4_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 82) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 82))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_179 UNION SELECT pk, col0 FROM view_2_tab4_179
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 82) ) AS tab4_179
----
1
4
9

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_179
----
1
4
9

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE (col0 >= 82)
----
1
4
9

statement ok
DROP VIEW view_1_tab4_179

statement ok
DROP VIEW view_2_tab4_179

statement ok
DROP VIEW view_3_tab4_179

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_180') DROP VIEW view_1_tab0_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_180') DROP VIEW view_2_tab0_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_180') DROP VIEW view_3_tab0_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_180

statement ok
CREATE VIEW view_1_tab0_180 AS SELECT pk, col0 FROM tab0 WHERE col3 > 8

statement ok
CREATE VIEW view_2_tab0_180 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 8)

statement ok
CREATE VIEW view_3_tab0_180 AS SELECT pk FROM view_1_tab0_180

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE col3 > 8
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 8)
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_180
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 8 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_180 UNION ALL SELECT pk, col0 FROM view_2_tab0_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 8 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_180 UNION SELECT pk, col0 FROM view_2_tab0_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 8 ) AS tab0_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE col3 > 8
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_180

statement ok
DROP VIEW view_2_tab0_180

statement ok
DROP VIEW view_3_tab0_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_180') DROP VIEW view_1_tab1_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_180') DROP VIEW view_2_tab1_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_180') DROP VIEW view_3_tab1_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_180

statement ok
CREATE VIEW view_1_tab1_180 AS SELECT pk, col0 FROM tab1 WHERE col3 > 8

statement ok
CREATE VIEW view_2_tab1_180 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 8)

statement ok
CREATE VIEW view_3_tab1_180 AS SELECT pk FROM view_1_tab1_180

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE col3 > 8
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 8)
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_180
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 8 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_180 UNION ALL SELECT pk, col0 FROM view_2_tab1_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 8 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_180 UNION SELECT pk, col0 FROM view_2_tab1_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 8 ) AS tab1_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE col3 > 8
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_180

statement ok
DROP VIEW view_2_tab1_180

statement ok
DROP VIEW view_3_tab1_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_180') DROP VIEW view_1_tab2_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_180') DROP VIEW view_2_tab2_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_180') DROP VIEW view_3_tab2_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_180

statement ok
CREATE VIEW view_1_tab2_180 AS SELECT pk, col0 FROM tab2 WHERE col3 > 8

statement ok
CREATE VIEW view_2_tab2_180 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 8)

statement ok
CREATE VIEW view_3_tab2_180 AS SELECT pk FROM view_1_tab2_180

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE col3 > 8
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 8)
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_180
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 8 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_180 UNION ALL SELECT pk, col0 FROM view_2_tab2_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 8 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_180 UNION SELECT pk, col0 FROM view_2_tab2_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 8 ) AS tab2_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE col3 > 8
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_180

statement ok
DROP VIEW view_2_tab2_180

statement ok
DROP VIEW view_3_tab2_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_180') DROP VIEW view_1_tab3_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_180') DROP VIEW view_2_tab3_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_180') DROP VIEW view_3_tab3_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_180

statement ok
CREATE VIEW view_1_tab3_180 AS SELECT pk, col0 FROM tab3 WHERE col3 > 8

statement ok
CREATE VIEW view_2_tab3_180 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 8)

statement ok
CREATE VIEW view_3_tab3_180 AS SELECT pk FROM view_1_tab3_180

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE col3 > 8
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 8)
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_180
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 8 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_180 UNION ALL SELECT pk, col0 FROM view_2_tab3_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 8 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_180 UNION SELECT pk, col0 FROM view_2_tab3_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 8 ) AS tab3_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE col3 > 8
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_180

statement ok
DROP VIEW view_2_tab3_180

statement ok
DROP VIEW view_3_tab3_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_180') DROP VIEW view_1_tab4_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_180') DROP VIEW view_2_tab4_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_180') DROP VIEW view_3_tab4_180

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_180

statement ok
CREATE VIEW view_1_tab4_180 AS SELECT pk, col0 FROM tab4 WHERE col3 > 8

statement ok
CREATE VIEW view_2_tab4_180 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 8)

statement ok
CREATE VIEW view_3_tab4_180 AS SELECT pk FROM view_1_tab4_180

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE col3 > 8
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 8)
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_180
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 8 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_180 UNION ALL SELECT pk, col0 FROM view_2_tab4_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 8 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 8)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_180 UNION SELECT pk, col0 FROM view_2_tab4_180
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 8 ) AS tab4_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_180
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE col3 > 8
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_180

statement ok
DROP VIEW view_2_tab4_180

statement ok
DROP VIEW view_3_tab4_180

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_181') DROP VIEW view_1_tab0_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_181') DROP VIEW view_2_tab0_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_181') DROP VIEW view_3_tab0_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_181

statement ok
CREATE VIEW view_1_tab0_181 AS SELECT pk, col0 FROM tab0 WHERE (col4 > 38.90)

statement ok
CREATE VIEW view_2_tab0_181 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 38.90))

statement ok
CREATE VIEW view_3_tab0_181 AS SELECT pk FROM view_1_tab0_181

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE (col4 > 38.90)
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 38.90))
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_181
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_181
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 38.90) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_181 UNION ALL SELECT pk, col0 FROM view_2_tab0_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 38.90) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_181 UNION SELECT pk, col0 FROM view_2_tab0_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 > 38.90) ) AS tab0_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE (col4 > 38.90)
----
1
2
3
4
8

statement ok
DROP VIEW view_1_tab0_181

statement ok
DROP VIEW view_2_tab0_181

statement ok
DROP VIEW view_3_tab0_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_181') DROP VIEW view_1_tab1_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_181') DROP VIEW view_2_tab1_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_181') DROP VIEW view_3_tab1_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_181

statement ok
CREATE VIEW view_1_tab1_181 AS SELECT pk, col0 FROM tab1 WHERE (col4 > 38.90)

statement ok
CREATE VIEW view_2_tab1_181 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 38.90))

statement ok
CREATE VIEW view_3_tab1_181 AS SELECT pk FROM view_1_tab1_181

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE (col4 > 38.90)
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 38.90))
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_181
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_181
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 38.90) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_181 UNION ALL SELECT pk, col0 FROM view_2_tab1_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 38.90) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_181 UNION SELECT pk, col0 FROM view_2_tab1_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 > 38.90) ) AS tab1_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE (col4 > 38.90)
----
1
2
3
4
8

statement ok
DROP VIEW view_1_tab1_181

statement ok
DROP VIEW view_2_tab1_181

statement ok
DROP VIEW view_3_tab1_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_181') DROP VIEW view_1_tab2_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_181') DROP VIEW view_2_tab2_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_181') DROP VIEW view_3_tab2_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_181

statement ok
CREATE VIEW view_1_tab2_181 AS SELECT pk, col0 FROM tab2 WHERE (col4 > 38.90)

statement ok
CREATE VIEW view_2_tab2_181 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 38.90))

statement ok
CREATE VIEW view_3_tab2_181 AS SELECT pk FROM view_1_tab2_181

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE (col4 > 38.90)
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 38.90))
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_181
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_181
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 38.90) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_181 UNION ALL SELECT pk, col0 FROM view_2_tab2_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 38.90) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_181 UNION SELECT pk, col0 FROM view_2_tab2_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 > 38.90) ) AS tab2_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE (col4 > 38.90)
----
1
2
3
4
8

statement ok
DROP VIEW view_1_tab2_181

statement ok
DROP VIEW view_2_tab2_181

statement ok
DROP VIEW view_3_tab2_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_181') DROP VIEW view_1_tab3_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_181') DROP VIEW view_2_tab3_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_181') DROP VIEW view_3_tab3_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_181

statement ok
CREATE VIEW view_1_tab3_181 AS SELECT pk, col0 FROM tab3 WHERE (col4 > 38.90)

statement ok
CREATE VIEW view_2_tab3_181 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 38.90))

statement ok
CREATE VIEW view_3_tab3_181 AS SELECT pk FROM view_1_tab3_181

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE (col4 > 38.90)
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 38.90))
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_181
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_181
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 38.90) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_181 UNION ALL SELECT pk, col0 FROM view_2_tab3_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 38.90) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_181 UNION SELECT pk, col0 FROM view_2_tab3_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 > 38.90) ) AS tab3_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE (col4 > 38.90)
----
1
2
3
4
8

statement ok
DROP VIEW view_1_tab3_181

statement ok
DROP VIEW view_2_tab3_181

statement ok
DROP VIEW view_3_tab3_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_181') DROP VIEW view_1_tab4_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_181') DROP VIEW view_2_tab4_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_181') DROP VIEW view_3_tab4_181

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_181

statement ok
CREATE VIEW view_1_tab4_181 AS SELECT pk, col0 FROM tab4 WHERE (col4 > 38.90)

statement ok
CREATE VIEW view_2_tab4_181 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 38.90))

statement ok
CREATE VIEW view_3_tab4_181 AS SELECT pk FROM view_1_tab4_181

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE (col4 > 38.90)
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 38.90))
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_181
----
10 values hashing to 362a2eedb07449f68ab6c94cce154cc6

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_181
----
10 values hashing to 8177cf7ce473654883bc8e82df59cad3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 38.90) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_181 UNION ALL SELECT pk, col0 FROM view_2_tab4_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 38.90) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 38.90))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_181 UNION SELECT pk, col0 FROM view_2_tab4_181
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 > 38.90) ) AS tab4_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_181
----
1
2
3
4
8

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE (col4 > 38.90)
----
1
2
3
4
8

statement ok
DROP VIEW view_1_tab4_181

statement ok
DROP VIEW view_2_tab4_181

statement ok
DROP VIEW view_3_tab4_181

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_182') DROP VIEW view_1_tab0_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_182') DROP VIEW view_2_tab0_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_182') DROP VIEW view_3_tab0_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_182

statement ok
CREATE VIEW view_1_tab0_182 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)

statement ok
CREATE VIEW view_2_tab0_182 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))

statement ok
CREATE VIEW view_3_tab0_182 AS SELECT pk FROM view_1_tab0_182

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_182
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_182
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_182 UNION ALL SELECT pk, col0 FROM view_2_tab0_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_182 UNION SELECT pk, col0 FROM view_2_tab0_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) ) AS tab0_182
----
8

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_182
----
8

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8

statement ok
DROP VIEW view_1_tab0_182

statement ok
DROP VIEW view_2_tab0_182

statement ok
DROP VIEW view_3_tab0_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_182') DROP VIEW view_1_tab1_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_182') DROP VIEW view_2_tab1_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_182') DROP VIEW view_3_tab1_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_182

statement ok
CREATE VIEW view_1_tab1_182 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)

statement ok
CREATE VIEW view_2_tab1_182 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))

statement ok
CREATE VIEW view_3_tab1_182 AS SELECT pk FROM view_1_tab1_182

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_182
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_182
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_182 UNION ALL SELECT pk, col0 FROM view_2_tab1_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_182 UNION SELECT pk, col0 FROM view_2_tab1_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) ) AS tab1_182
----
8

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_182
----
8

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8

statement ok
DROP VIEW view_1_tab1_182

statement ok
DROP VIEW view_2_tab1_182

statement ok
DROP VIEW view_3_tab1_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_182') DROP VIEW view_1_tab2_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_182') DROP VIEW view_2_tab2_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_182') DROP VIEW view_3_tab2_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_182

statement ok
CREATE VIEW view_1_tab2_182 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)

statement ok
CREATE VIEW view_2_tab2_182 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))

statement ok
CREATE VIEW view_3_tab2_182 AS SELECT pk FROM view_1_tab2_182

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_182
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_182
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_182 UNION ALL SELECT pk, col0 FROM view_2_tab2_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_182 UNION SELECT pk, col0 FROM view_2_tab2_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) ) AS tab2_182
----
8

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_182
----
8

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8

statement ok
DROP VIEW view_1_tab2_182

statement ok
DROP VIEW view_2_tab2_182

statement ok
DROP VIEW view_3_tab2_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_182') DROP VIEW view_1_tab3_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_182') DROP VIEW view_2_tab3_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_182') DROP VIEW view_3_tab3_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_182

statement ok
CREATE VIEW view_1_tab3_182 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)

statement ok
CREATE VIEW view_2_tab3_182 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))

statement ok
CREATE VIEW view_3_tab3_182 AS SELECT pk FROM view_1_tab3_182

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_182
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_182
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_182 UNION ALL SELECT pk, col0 FROM view_2_tab3_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_182 UNION SELECT pk, col0 FROM view_2_tab3_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) ) AS tab3_182
----
8

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_182
----
8

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8

statement ok
DROP VIEW view_1_tab3_182

statement ok
DROP VIEW view_2_tab3_182

statement ok
DROP VIEW view_3_tab3_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_182') DROP VIEW view_1_tab4_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_182') DROP VIEW view_2_tab4_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_182') DROP VIEW view_3_tab4_182

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_182

statement ok
CREATE VIEW view_1_tab4_182 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)

statement ok
CREATE VIEW view_2_tab4_182 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))

statement ok
CREATE VIEW view_3_tab4_182 AS SELECT pk FROM view_1_tab4_182

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_182
----
8
47

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_182
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_182 UNION ALL SELECT pk, col0 FROM view_2_tab4_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_182 UNION SELECT pk, col0 FROM view_2_tab4_182
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8) ) AS tab4_182
----
8

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_182
----
8

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE col1 <= 5.36 AND (col4 > 11.88 OR col3 >= 8)
----
8

statement ok
DROP VIEW view_1_tab4_182

statement ok
DROP VIEW view_2_tab4_182

statement ok
DROP VIEW view_3_tab4_182

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_183') DROP VIEW view_1_tab0_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_183') DROP VIEW view_2_tab0_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_183') DROP VIEW view_3_tab0_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_183

statement ok
CREATE VIEW view_1_tab0_183 AS SELECT pk, col0 FROM tab0 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))

statement ok
CREATE VIEW view_2_tab0_183 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))

statement ok
CREATE VIEW view_3_tab0_183 AS SELECT pk FROM view_1_tab0_183

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
8
47

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_183
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_183
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_183 UNION ALL SELECT pk, col0 FROM view_2_tab0_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_183 UNION SELECT pk, col0 FROM view_2_tab0_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) ) AS tab0_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_183

statement ok
DROP VIEW view_2_tab0_183

statement ok
DROP VIEW view_3_tab0_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_183') DROP VIEW view_1_tab1_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_183') DROP VIEW view_2_tab1_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_183') DROP VIEW view_3_tab1_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_183

statement ok
CREATE VIEW view_1_tab1_183 AS SELECT pk, col0 FROM tab1 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))

statement ok
CREATE VIEW view_2_tab1_183 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))

statement ok
CREATE VIEW view_3_tab1_183 AS SELECT pk FROM view_1_tab1_183

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
8
47

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_183
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_183
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_183 UNION ALL SELECT pk, col0 FROM view_2_tab1_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_183 UNION SELECT pk, col0 FROM view_2_tab1_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) ) AS tab1_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_183

statement ok
DROP VIEW view_2_tab1_183

statement ok
DROP VIEW view_3_tab1_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_183') DROP VIEW view_1_tab2_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_183') DROP VIEW view_2_tab2_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_183') DROP VIEW view_3_tab2_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_183

statement ok
CREATE VIEW view_1_tab2_183 AS SELECT pk, col0 FROM tab2 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))

statement ok
CREATE VIEW view_2_tab2_183 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))

statement ok
CREATE VIEW view_3_tab2_183 AS SELECT pk FROM view_1_tab2_183

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
8
47

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_183
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_183
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_183 UNION ALL SELECT pk, col0 FROM view_2_tab2_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_183 UNION SELECT pk, col0 FROM view_2_tab2_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) ) AS tab2_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_183

statement ok
DROP VIEW view_2_tab2_183

statement ok
DROP VIEW view_3_tab2_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_183') DROP VIEW view_1_tab3_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_183') DROP VIEW view_2_tab3_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_183') DROP VIEW view_3_tab3_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_183

statement ok
CREATE VIEW view_1_tab3_183 AS SELECT pk, col0 FROM tab3 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))

statement ok
CREATE VIEW view_2_tab3_183 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))

statement ok
CREATE VIEW view_3_tab3_183 AS SELECT pk FROM view_1_tab3_183

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
8
47

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_183
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_183
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_183 UNION ALL SELECT pk, col0 FROM view_2_tab3_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_183 UNION SELECT pk, col0 FROM view_2_tab3_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) ) AS tab3_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_183

statement ok
DROP VIEW view_2_tab3_183

statement ok
DROP VIEW view_3_tab3_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_183') DROP VIEW view_1_tab4_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_183') DROP VIEW view_2_tab4_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_183') DROP VIEW view_3_tab4_183

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_183

statement ok
CREATE VIEW view_1_tab4_183 AS SELECT pk, col0 FROM tab4 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))

statement ok
CREATE VIEW view_2_tab4_183 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))

statement ok
CREATE VIEW view_3_tab4_183 AS SELECT pk FROM view_1_tab4_183

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
8
47

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_183
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_183
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_183 UNION ALL SELECT pk, col0 FROM view_2_tab4_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_183 UNION SELECT pk, col0 FROM view_2_tab4_183
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50)) ) AS tab4_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_183
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE ((col1 < 73.59 AND (col4 > 98.28 OR (col0 >= 41 AND col1 IS NULL AND col0 < 97 AND (col0 < 62)) OR (((((col1 > 80.99) AND (col4 = 53.19)) AND col0 > 35 AND (col0 <= 41 OR col0 BETWEEN 6 AND 91 AND col1 >= 33.73 OR col3 > 79 AND (col4 > 47.38) AND (col0 > 75 AND col4 = 89.83) AND ((col3 <= 53)) AND col3 < 20) AND ((col3 >= 9)) OR col3 < 54 OR col3 > 39 OR ((col0 < 25 OR col0 IS NULL AND col1 IN (21.49,0.7) AND (col3 <= 86) OR (col1 IS NULL) OR col4 IS NULL) AND col1 >= 12.50) AND (col3 > 6)))) AND (col0 < 29) OR (col3 > 54))) OR (col1 > 3.50))
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_183

statement ok
DROP VIEW view_2_tab4_183

statement ok
DROP VIEW view_3_tab4_183

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_184') DROP VIEW view_1_tab0_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_184') DROP VIEW view_2_tab0_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_184') DROP VIEW view_3_tab0_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_184

statement ok
CREATE VIEW view_1_tab0_184 AS SELECT pk, col0 FROM tab0 WHERE col1 >= 24.28

statement ok
CREATE VIEW view_2_tab0_184 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 24.28)

statement ok
CREATE VIEW view_3_tab0_184 AS SELECT pk FROM view_1_tab0_184

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE col1 >= 24.28
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 24.28)
----
8
47

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_184
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_184
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 24.28 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_184 UNION ALL SELECT pk, col0 FROM view_2_tab0_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 24.28 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_184 UNION SELECT pk, col0 FROM view_2_tab0_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 >= 24.28 ) AS tab0_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE col1 >= 24.28
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_184

statement ok
DROP VIEW view_2_tab0_184

statement ok
DROP VIEW view_3_tab0_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_184') DROP VIEW view_1_tab1_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_184') DROP VIEW view_2_tab1_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_184') DROP VIEW view_3_tab1_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_184

statement ok
CREATE VIEW view_1_tab1_184 AS SELECT pk, col0 FROM tab1 WHERE col1 >= 24.28

statement ok
CREATE VIEW view_2_tab1_184 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 24.28)

statement ok
CREATE VIEW view_3_tab1_184 AS SELECT pk FROM view_1_tab1_184

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE col1 >= 24.28
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 24.28)
----
8
47

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_184
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_184
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 24.28 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_184 UNION ALL SELECT pk, col0 FROM view_2_tab1_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 24.28 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_184 UNION SELECT pk, col0 FROM view_2_tab1_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 >= 24.28 ) AS tab1_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE col1 >= 24.28
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_184

statement ok
DROP VIEW view_2_tab1_184

statement ok
DROP VIEW view_3_tab1_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_184') DROP VIEW view_1_tab2_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_184') DROP VIEW view_2_tab2_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_184') DROP VIEW view_3_tab2_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_184

statement ok
CREATE VIEW view_1_tab2_184 AS SELECT pk, col0 FROM tab2 WHERE col1 >= 24.28

statement ok
CREATE VIEW view_2_tab2_184 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 24.28)

statement ok
CREATE VIEW view_3_tab2_184 AS SELECT pk FROM view_1_tab2_184

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE col1 >= 24.28
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 24.28)
----
8
47

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_184
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_184
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 24.28 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_184 UNION ALL SELECT pk, col0 FROM view_2_tab2_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 24.28 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_184 UNION SELECT pk, col0 FROM view_2_tab2_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 >= 24.28 ) AS tab2_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE col1 >= 24.28
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_184

statement ok
DROP VIEW view_2_tab2_184

statement ok
DROP VIEW view_3_tab2_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_184') DROP VIEW view_1_tab3_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_184') DROP VIEW view_2_tab3_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_184') DROP VIEW view_3_tab3_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_184

statement ok
CREATE VIEW view_1_tab3_184 AS SELECT pk, col0 FROM tab3 WHERE col1 >= 24.28

statement ok
CREATE VIEW view_2_tab3_184 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 24.28)

statement ok
CREATE VIEW view_3_tab3_184 AS SELECT pk FROM view_1_tab3_184

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE col1 >= 24.28
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 24.28)
----
8
47

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_184
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_184
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 24.28 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_184 UNION ALL SELECT pk, col0 FROM view_2_tab3_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 24.28 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_184 UNION SELECT pk, col0 FROM view_2_tab3_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 >= 24.28 ) AS tab3_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE col1 >= 24.28
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_184

statement ok
DROP VIEW view_2_tab3_184

statement ok
DROP VIEW view_3_tab3_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_184') DROP VIEW view_1_tab4_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_184') DROP VIEW view_2_tab4_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_184') DROP VIEW view_3_tab4_184

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_184

statement ok
CREATE VIEW view_1_tab4_184 AS SELECT pk, col0 FROM tab4 WHERE col1 >= 24.28

statement ok
CREATE VIEW view_2_tab4_184 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 24.28)

statement ok
CREATE VIEW view_3_tab4_184 AS SELECT pk FROM view_1_tab4_184

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE col1 >= 24.28
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 24.28)
----
8
47

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_184
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_184
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 24.28 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_184 UNION ALL SELECT pk, col0 FROM view_2_tab4_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 24.28 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 24.28)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_184 UNION SELECT pk, col0 FROM view_2_tab4_184
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 >= 24.28 ) AS tab4_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_184
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE col1 >= 24.28
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_184

statement ok
DROP VIEW view_2_tab4_184

statement ok
DROP VIEW view_3_tab4_184

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_185') DROP VIEW view_1_tab0_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_185') DROP VIEW view_2_tab0_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_185') DROP VIEW view_3_tab0_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_185

statement ok
CREATE VIEW view_1_tab0_185 AS SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)

statement ok
CREATE VIEW view_2_tab0_185 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))

statement ok
CREATE VIEW view_3_tab0_185 AS SELECT pk FROM view_1_tab0_185

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_185
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_185
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_185 UNION ALL SELECT pk, col0 FROM view_2_tab0_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_185 UNION SELECT pk, col0 FROM view_2_tab0_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) ) AS tab0_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
0
2
3
5
8

statement ok
DROP VIEW view_1_tab0_185

statement ok
DROP VIEW view_2_tab0_185

statement ok
DROP VIEW view_3_tab0_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_185') DROP VIEW view_1_tab1_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_185') DROP VIEW view_2_tab1_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_185') DROP VIEW view_3_tab1_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_185

statement ok
CREATE VIEW view_1_tab1_185 AS SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)

statement ok
CREATE VIEW view_2_tab1_185 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))

statement ok
CREATE VIEW view_3_tab1_185 AS SELECT pk FROM view_1_tab1_185

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_185
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_185
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_185 UNION ALL SELECT pk, col0 FROM view_2_tab1_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_185 UNION SELECT pk, col0 FROM view_2_tab1_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) ) AS tab1_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
0
2
3
5
8

statement ok
DROP VIEW view_1_tab1_185

statement ok
DROP VIEW view_2_tab1_185

statement ok
DROP VIEW view_3_tab1_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_185') DROP VIEW view_1_tab2_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_185') DROP VIEW view_2_tab2_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_185') DROP VIEW view_3_tab2_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_185

statement ok
CREATE VIEW view_1_tab2_185 AS SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)

statement ok
CREATE VIEW view_2_tab2_185 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))

statement ok
CREATE VIEW view_3_tab2_185 AS SELECT pk FROM view_1_tab2_185

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_185
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_185
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_185 UNION ALL SELECT pk, col0 FROM view_2_tab2_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_185 UNION SELECT pk, col0 FROM view_2_tab2_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) ) AS tab2_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
0
2
3
5
8

statement ok
DROP VIEW view_1_tab2_185

statement ok
DROP VIEW view_2_tab2_185

statement ok
DROP VIEW view_3_tab2_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_185') DROP VIEW view_1_tab3_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_185') DROP VIEW view_2_tab3_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_185') DROP VIEW view_3_tab3_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_185

statement ok
CREATE VIEW view_1_tab3_185 AS SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)

statement ok
CREATE VIEW view_2_tab3_185 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))

statement ok
CREATE VIEW view_3_tab3_185 AS SELECT pk FROM view_1_tab3_185

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_185
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_185
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_185 UNION ALL SELECT pk, col0 FROM view_2_tab3_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_185 UNION SELECT pk, col0 FROM view_2_tab3_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) ) AS tab3_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
0
2
3
5
8

statement ok
DROP VIEW view_1_tab3_185

statement ok
DROP VIEW view_2_tab3_185

statement ok
DROP VIEW view_3_tab3_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_185') DROP VIEW view_1_tab4_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_185') DROP VIEW view_2_tab4_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_185') DROP VIEW view_3_tab4_185

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_185

statement ok
CREATE VIEW view_1_tab4_185 AS SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)

statement ok
CREATE VIEW view_2_tab4_185 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))

statement ok
CREATE VIEW view_3_tab4_185 AS SELECT pk FROM view_1_tab4_185

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_185
----
10 values hashing to 3bda18558e00983c1fc59bd12883efbe

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_185
----
10 values hashing to 6c75e4f13ee01de01e2cb8c672844aef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_185 UNION ALL SELECT pk, col0 FROM view_2_tab4_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 32 AND 94 AND (col0 <= 62))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_185 UNION SELECT pk, col0 FROM view_2_tab4_185
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62) ) AS tab4_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_185
----
0
2
3
5
8

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col3 BETWEEN 32 AND 94 AND (col0 <= 62)
----
0
2
3
5
8

statement ok
DROP VIEW view_1_tab4_185

statement ok
DROP VIEW view_2_tab4_185

statement ok
DROP VIEW view_3_tab4_185

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_186') DROP VIEW view_1_tab0_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_186') DROP VIEW view_2_tab0_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_186') DROP VIEW view_3_tab0_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_186

statement ok
CREATE VIEW view_1_tab0_186 AS SELECT pk, col0 FROM tab0 WHERE ((col4 >= 29.76))

statement ok
CREATE VIEW view_2_tab0_186 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 29.76)))

statement ok
CREATE VIEW view_3_tab0_186 AS SELECT pk FROM view_1_tab0_186

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 29.76))
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 29.76)))
----
5
58
6
0
9
88

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_186
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_186
----
5
58
6
0
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 29.76)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_186 UNION ALL SELECT pk, col0 FROM view_2_tab0_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 >= 29.76)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_186 UNION SELECT pk, col0 FROM view_2_tab0_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 >= 29.76)) ) AS tab0_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE ((col4 >= 29.76))
----
0
1
2
3
4
7
8

statement ok
DROP VIEW view_1_tab0_186

statement ok
DROP VIEW view_2_tab0_186

statement ok
DROP VIEW view_3_tab0_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_186') DROP VIEW view_1_tab1_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_186') DROP VIEW view_2_tab1_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_186') DROP VIEW view_3_tab1_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_186

statement ok
CREATE VIEW view_1_tab1_186 AS SELECT pk, col0 FROM tab1 WHERE ((col4 >= 29.76))

statement ok
CREATE VIEW view_2_tab1_186 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 29.76)))

statement ok
CREATE VIEW view_3_tab1_186 AS SELECT pk FROM view_1_tab1_186

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 29.76))
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 29.76)))
----
5
58
6
0
9
88

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_186
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_186
----
5
58
6
0
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 29.76)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_186 UNION ALL SELECT pk, col0 FROM view_2_tab1_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 >= 29.76)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_186 UNION SELECT pk, col0 FROM view_2_tab1_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 >= 29.76)) ) AS tab1_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE ((col4 >= 29.76))
----
0
1
2
3
4
7
8

statement ok
DROP VIEW view_1_tab1_186

statement ok
DROP VIEW view_2_tab1_186

statement ok
DROP VIEW view_3_tab1_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_186') DROP VIEW view_1_tab2_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_186') DROP VIEW view_2_tab2_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_186') DROP VIEW view_3_tab2_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_186

statement ok
CREATE VIEW view_1_tab2_186 AS SELECT pk, col0 FROM tab2 WHERE ((col4 >= 29.76))

statement ok
CREATE VIEW view_2_tab2_186 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 29.76)))

statement ok
CREATE VIEW view_3_tab2_186 AS SELECT pk FROM view_1_tab2_186

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 29.76))
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 29.76)))
----
5
58
6
0
9
88

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_186
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_186
----
5
58
6
0
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 29.76)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_186 UNION ALL SELECT pk, col0 FROM view_2_tab2_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 >= 29.76)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_186 UNION SELECT pk, col0 FROM view_2_tab2_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 >= 29.76)) ) AS tab2_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE ((col4 >= 29.76))
----
0
1
2
3
4
7
8

statement ok
DROP VIEW view_1_tab2_186

statement ok
DROP VIEW view_2_tab2_186

statement ok
DROP VIEW view_3_tab2_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_186') DROP VIEW view_1_tab3_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_186') DROP VIEW view_2_tab3_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_186') DROP VIEW view_3_tab3_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_186

statement ok
CREATE VIEW view_1_tab3_186 AS SELECT pk, col0 FROM tab3 WHERE ((col4 >= 29.76))

statement ok
CREATE VIEW view_2_tab3_186 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 29.76)))

statement ok
CREATE VIEW view_3_tab3_186 AS SELECT pk FROM view_1_tab3_186

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 29.76))
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 29.76)))
----
5
58
6
0
9
88

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_186
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_186
----
5
58
6
0
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 29.76)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_186 UNION ALL SELECT pk, col0 FROM view_2_tab3_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 >= 29.76)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_186 UNION SELECT pk, col0 FROM view_2_tab3_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 >= 29.76)) ) AS tab3_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE ((col4 >= 29.76))
----
0
1
2
3
4
7
8

statement ok
DROP VIEW view_1_tab3_186

statement ok
DROP VIEW view_2_tab3_186

statement ok
DROP VIEW view_3_tab3_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_186') DROP VIEW view_1_tab4_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_186') DROP VIEW view_2_tab4_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_186') DROP VIEW view_3_tab4_186

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_186

statement ok
CREATE VIEW view_1_tab4_186 AS SELECT pk, col0 FROM tab4 WHERE ((col4 >= 29.76))

statement ok
CREATE VIEW view_2_tab4_186 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 29.76)))

statement ok
CREATE VIEW view_3_tab4_186 AS SELECT pk FROM view_1_tab4_186

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 29.76))
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 29.76)))
----
5
58
6
0
9
88

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_186
----
14 values hashing to 980c1fe8ab9d57bd0e450a3cdace3fc8

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_186
----
5
58
6
0
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 29.76)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_186 UNION ALL SELECT pk, col0 FROM view_2_tab4_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 >= 29.76)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 >= 29.76)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_186 UNION SELECT pk, col0 FROM view_2_tab4_186
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 >= 29.76)) ) AS tab4_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_186
----
0
1
2
3
4
7
8

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE ((col4 >= 29.76))
----
0
1
2
3
4
7
8

statement ok
DROP VIEW view_1_tab4_186

statement ok
DROP VIEW view_2_tab4_186

statement ok
DROP VIEW view_3_tab4_186

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_187') DROP VIEW view_1_tab0_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_187') DROP VIEW view_2_tab0_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_187') DROP VIEW view_3_tab0_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_187

statement ok
CREATE VIEW view_1_tab0_187 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 69))

statement ok
CREATE VIEW view_2_tab0_187 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 69)))

statement ok
CREATE VIEW view_3_tab0_187 AS SELECT pk FROM view_1_tab0_187

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 69))
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 69)))
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_187
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_187
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_187 UNION ALL SELECT pk, col0 FROM view_2_tab0_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_187 UNION SELECT pk, col0 FROM view_2_tab0_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 69)) ) AS tab0_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE ((col3 > 69))
----
0
1
2
4
5

statement ok
DROP VIEW view_1_tab0_187

statement ok
DROP VIEW view_2_tab0_187

statement ok
DROP VIEW view_3_tab0_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_187') DROP VIEW view_1_tab1_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_187') DROP VIEW view_2_tab1_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_187') DROP VIEW view_3_tab1_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_187

statement ok
CREATE VIEW view_1_tab1_187 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 69))

statement ok
CREATE VIEW view_2_tab1_187 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 69)))

statement ok
CREATE VIEW view_3_tab1_187 AS SELECT pk FROM view_1_tab1_187

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 69))
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 69)))
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_187
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_187
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_187 UNION ALL SELECT pk, col0 FROM view_2_tab1_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_187 UNION SELECT pk, col0 FROM view_2_tab1_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 69)) ) AS tab1_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE ((col3 > 69))
----
0
1
2
4
5

statement ok
DROP VIEW view_1_tab1_187

statement ok
DROP VIEW view_2_tab1_187

statement ok
DROP VIEW view_3_tab1_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_187') DROP VIEW view_1_tab2_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_187') DROP VIEW view_2_tab2_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_187') DROP VIEW view_3_tab2_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_187

statement ok
CREATE VIEW view_1_tab2_187 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 69))

statement ok
CREATE VIEW view_2_tab2_187 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 69)))

statement ok
CREATE VIEW view_3_tab2_187 AS SELECT pk FROM view_1_tab2_187

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 69))
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 69)))
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_187
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_187
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_187 UNION ALL SELECT pk, col0 FROM view_2_tab2_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_187 UNION SELECT pk, col0 FROM view_2_tab2_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 69)) ) AS tab2_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE ((col3 > 69))
----
0
1
2
4
5

statement ok
DROP VIEW view_1_tab2_187

statement ok
DROP VIEW view_2_tab2_187

statement ok
DROP VIEW view_3_tab2_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_187') DROP VIEW view_1_tab3_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_187') DROP VIEW view_2_tab3_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_187') DROP VIEW view_3_tab3_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_187

statement ok
CREATE VIEW view_1_tab3_187 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 69))

statement ok
CREATE VIEW view_2_tab3_187 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 69)))

statement ok
CREATE VIEW view_3_tab3_187 AS SELECT pk FROM view_1_tab3_187

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 69))
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 69)))
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_187
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_187
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_187 UNION ALL SELECT pk, col0 FROM view_2_tab3_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_187 UNION SELECT pk, col0 FROM view_2_tab3_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 69)) ) AS tab3_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE ((col3 > 69))
----
0
1
2
4
5

statement ok
DROP VIEW view_1_tab3_187

statement ok
DROP VIEW view_2_tab3_187

statement ok
DROP VIEW view_3_tab3_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_187') DROP VIEW view_1_tab4_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_187') DROP VIEW view_2_tab4_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_187') DROP VIEW view_3_tab4_187

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_187

statement ok
CREATE VIEW view_1_tab4_187 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 69))

statement ok
CREATE VIEW view_2_tab4_187 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 69)))

statement ok
CREATE VIEW view_3_tab4_187 AS SELECT pk FROM view_1_tab4_187

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 69))
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 69)))
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_187
----
10 values hashing to 5f0bdc6a2921a22fe6b62b1a4bc8bfde

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_187
----
10 values hashing to 773f6a38ed7a7a6ae91c8679a2482520

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_187 UNION ALL SELECT pk, col0 FROM view_2_tab4_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

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 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_187 UNION SELECT pk, col0 FROM view_2_tab4_187
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 69)) ) AS tab4_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_187
----
0
1
2
4
5

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE ((col3 > 69))
----
0
1
2
4
5

statement ok
DROP VIEW view_1_tab4_187

statement ok
DROP VIEW view_2_tab4_187

statement ok
DROP VIEW view_3_tab4_187

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_188') DROP VIEW view_1_tab0_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_188') DROP VIEW view_2_tab0_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_188') DROP VIEW view_3_tab0_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_188

statement ok
CREATE VIEW view_1_tab0_188 AS SELECT pk, col0 FROM tab0 WHERE col4 = 69.29

statement ok
CREATE VIEW view_2_tab0_188 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 69.29)

statement ok
CREATE VIEW view_3_tab0_188 AS SELECT pk FROM view_1_tab0_188

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col4 = 69.29
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_188
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 69.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_188 UNION ALL SELECT pk, col0 FROM view_2_tab0_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 69.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_188 UNION SELECT pk, col0 FROM view_2_tab0_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 = 69.29 ) AS tab0_188
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_188
----

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col4 = 69.29
----

statement ok
DROP VIEW view_1_tab0_188

statement ok
DROP VIEW view_2_tab0_188

statement ok
DROP VIEW view_3_tab0_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_188') DROP VIEW view_1_tab1_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_188') DROP VIEW view_2_tab1_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_188') DROP VIEW view_3_tab1_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_188

statement ok
CREATE VIEW view_1_tab1_188 AS SELECT pk, col0 FROM tab1 WHERE col4 = 69.29

statement ok
CREATE VIEW view_2_tab1_188 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 69.29)

statement ok
CREATE VIEW view_3_tab1_188 AS SELECT pk FROM view_1_tab1_188

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col4 = 69.29
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_188
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 69.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_188 UNION ALL SELECT pk, col0 FROM view_2_tab1_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 69.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_188 UNION SELECT pk, col0 FROM view_2_tab1_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 = 69.29 ) AS tab1_188
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_188
----

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col4 = 69.29
----

statement ok
DROP VIEW view_1_tab1_188

statement ok
DROP VIEW view_2_tab1_188

statement ok
DROP VIEW view_3_tab1_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_188') DROP VIEW view_1_tab2_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_188') DROP VIEW view_2_tab2_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_188') DROP VIEW view_3_tab2_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_188

statement ok
CREATE VIEW view_1_tab2_188 AS SELECT pk, col0 FROM tab2 WHERE col4 = 69.29

statement ok
CREATE VIEW view_2_tab2_188 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 69.29)

statement ok
CREATE VIEW view_3_tab2_188 AS SELECT pk FROM view_1_tab2_188

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col4 = 69.29
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_188
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 69.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_188 UNION ALL SELECT pk, col0 FROM view_2_tab2_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 69.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_188 UNION SELECT pk, col0 FROM view_2_tab2_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 = 69.29 ) AS tab2_188
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_188
----

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col4 = 69.29
----

statement ok
DROP VIEW view_1_tab2_188

statement ok
DROP VIEW view_2_tab2_188

statement ok
DROP VIEW view_3_tab2_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_188') DROP VIEW view_1_tab3_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_188') DROP VIEW view_2_tab3_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_188') DROP VIEW view_3_tab3_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_188

statement ok
CREATE VIEW view_1_tab3_188 AS SELECT pk, col0 FROM tab3 WHERE col4 = 69.29

statement ok
CREATE VIEW view_2_tab3_188 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 69.29)

statement ok
CREATE VIEW view_3_tab3_188 AS SELECT pk FROM view_1_tab3_188

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col4 = 69.29
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_188
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 69.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_188 UNION ALL SELECT pk, col0 FROM view_2_tab3_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 69.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_188 UNION SELECT pk, col0 FROM view_2_tab3_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 = 69.29 ) AS tab3_188
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_188
----

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col4 = 69.29
----

statement ok
DROP VIEW view_1_tab3_188

statement ok
DROP VIEW view_2_tab3_188

statement ok
DROP VIEW view_3_tab3_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_188') DROP VIEW view_1_tab4_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_188') DROP VIEW view_2_tab4_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_188') DROP VIEW view_3_tab4_188

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_188

statement ok
CREATE VIEW view_1_tab4_188 AS SELECT pk, col0 FROM tab4 WHERE col4 = 69.29

statement ok
CREATE VIEW view_2_tab4_188 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 69.29)

statement ok
CREATE VIEW view_3_tab4_188 AS SELECT pk FROM view_1_tab4_188

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col4 = 69.29
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_188
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 69.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_188 UNION ALL SELECT pk, col0 FROM view_2_tab4_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 69.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 69.29)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_188 UNION SELECT pk, col0 FROM view_2_tab4_188
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 = 69.29 ) AS tab4_188
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_188
----

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col4 = 69.29
----

statement ok
DROP VIEW view_1_tab4_188

statement ok
DROP VIEW view_2_tab4_188

statement ok
DROP VIEW view_3_tab4_188

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_189') DROP VIEW view_1_tab0_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_189') DROP VIEW view_2_tab0_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_189') DROP VIEW view_3_tab0_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_189

statement ok
CREATE VIEW view_1_tab0_189 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84

statement ok
CREATE VIEW view_2_tab0_189 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)

statement ok
CREATE VIEW view_3_tab0_189 AS SELECT pk FROM view_1_tab0_189

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_189
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_189
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_189 UNION ALL SELECT pk, col0 FROM view_2_tab0_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_189 UNION SELECT pk, col0 FROM view_2_tab0_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 ) AS tab0_189
----
0
5

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_189
----
0
5

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
5

statement ok
DROP VIEW view_1_tab0_189

statement ok
DROP VIEW view_2_tab0_189

statement ok
DROP VIEW view_3_tab0_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_189') DROP VIEW view_1_tab1_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_189') DROP VIEW view_2_tab1_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_189') DROP VIEW view_3_tab1_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_189

statement ok
CREATE VIEW view_1_tab1_189 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84

statement ok
CREATE VIEW view_2_tab1_189 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)

statement ok
CREATE VIEW view_3_tab1_189 AS SELECT pk FROM view_1_tab1_189

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_189
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_189
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_189 UNION ALL SELECT pk, col0 FROM view_2_tab1_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_189 UNION SELECT pk, col0 FROM view_2_tab1_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 ) AS tab1_189
----
0
5

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_189
----
0
5

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
5

statement ok
DROP VIEW view_1_tab1_189

statement ok
DROP VIEW view_2_tab1_189

statement ok
DROP VIEW view_3_tab1_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_189') DROP VIEW view_1_tab2_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_189') DROP VIEW view_2_tab2_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_189') DROP VIEW view_3_tab2_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_189

statement ok
CREATE VIEW view_1_tab2_189 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84

statement ok
CREATE VIEW view_2_tab2_189 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)

statement ok
CREATE VIEW view_3_tab2_189 AS SELECT pk FROM view_1_tab2_189

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_189
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_189
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_189 UNION ALL SELECT pk, col0 FROM view_2_tab2_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_189 UNION SELECT pk, col0 FROM view_2_tab2_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 ) AS tab2_189
----
0
5

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_189
----
0
5

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
5

statement ok
DROP VIEW view_1_tab2_189

statement ok
DROP VIEW view_2_tab2_189

statement ok
DROP VIEW view_3_tab2_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_189') DROP VIEW view_1_tab3_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_189') DROP VIEW view_2_tab3_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_189') DROP VIEW view_3_tab3_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_189

statement ok
CREATE VIEW view_1_tab3_189 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84

statement ok
CREATE VIEW view_2_tab3_189 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)

statement ok
CREATE VIEW view_3_tab3_189 AS SELECT pk FROM view_1_tab3_189

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_189
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_189
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_189 UNION ALL SELECT pk, col0 FROM view_2_tab3_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_189 UNION SELECT pk, col0 FROM view_2_tab3_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 ) AS tab3_189
----
0
5

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_189
----
0
5

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
5

statement ok
DROP VIEW view_1_tab3_189

statement ok
DROP VIEW view_2_tab3_189

statement ok
DROP VIEW view_3_tab3_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_189') DROP VIEW view_1_tab4_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_189') DROP VIEW view_2_tab4_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_189') DROP VIEW view_3_tab4_189

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_189

statement ok
CREATE VIEW view_1_tab4_189 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84

statement ok
CREATE VIEW view_2_tab4_189 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)

statement ok
CREATE VIEW view_3_tab4_189 AS SELECT pk FROM view_1_tab4_189

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_189
----
0
30
5
58

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_189
----
16 values hashing to 12d4b115c9afae689091021c809ed0dd

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_189 UNION ALL SELECT pk, col0 FROM view_2_tab4_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_189 UNION SELECT pk, col0 FROM view_2_tab4_189
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84 ) AS tab4_189
----
0
5

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_189
----
0
5

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE (col0 < 73) AND (col0 > 18 AND col3 > 86) AND col3 > 84
----
0
5

statement ok
DROP VIEW view_1_tab4_189

statement ok
DROP VIEW view_2_tab4_189

statement ok
DROP VIEW view_3_tab4_189

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_190') DROP VIEW view_1_tab0_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_190') DROP VIEW view_2_tab0_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_190') DROP VIEW view_3_tab0_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_190

statement ok
CREATE VIEW view_1_tab0_190 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 32.53

statement ok
CREATE VIEW view_2_tab0_190 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 32.53)

statement ok
CREATE VIEW view_3_tab0_190 AS SELECT pk FROM view_1_tab0_190

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 32.53
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 32.53)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_190
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_190
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 32.53 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_190 UNION ALL SELECT pk, col0 FROM view_2_tab0_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 32.53 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_190 UNION SELECT pk, col0 FROM view_2_tab0_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 32.53 ) AS tab0_190
----
8

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_190
----
8

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE col1 <= 32.53
----
8

statement ok
DROP VIEW view_1_tab0_190

statement ok
DROP VIEW view_2_tab0_190

statement ok
DROP VIEW view_3_tab0_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_190') DROP VIEW view_1_tab1_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_190') DROP VIEW view_2_tab1_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_190') DROP VIEW view_3_tab1_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_190

statement ok
CREATE VIEW view_1_tab1_190 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 32.53

statement ok
CREATE VIEW view_2_tab1_190 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 32.53)

statement ok
CREATE VIEW view_3_tab1_190 AS SELECT pk FROM view_1_tab1_190

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 32.53
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 32.53)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_190
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_190
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 32.53 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_190 UNION ALL SELECT pk, col0 FROM view_2_tab1_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 32.53 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_190 UNION SELECT pk, col0 FROM view_2_tab1_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 32.53 ) AS tab1_190
----
8

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_190
----
8

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE col1 <= 32.53
----
8

statement ok
DROP VIEW view_1_tab1_190

statement ok
DROP VIEW view_2_tab1_190

statement ok
DROP VIEW view_3_tab1_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_190') DROP VIEW view_1_tab2_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_190') DROP VIEW view_2_tab2_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_190') DROP VIEW view_3_tab2_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_190

statement ok
CREATE VIEW view_1_tab2_190 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 32.53

statement ok
CREATE VIEW view_2_tab2_190 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 32.53)

statement ok
CREATE VIEW view_3_tab2_190 AS SELECT pk FROM view_1_tab2_190

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 32.53
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 32.53)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_190
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_190
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 32.53 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_190 UNION ALL SELECT pk, col0 FROM view_2_tab2_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 32.53 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_190 UNION SELECT pk, col0 FROM view_2_tab2_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 32.53 ) AS tab2_190
----
8

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_190
----
8

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE col1 <= 32.53
----
8

statement ok
DROP VIEW view_1_tab2_190

statement ok
DROP VIEW view_2_tab2_190

statement ok
DROP VIEW view_3_tab2_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_190') DROP VIEW view_1_tab3_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_190') DROP VIEW view_2_tab3_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_190') DROP VIEW view_3_tab3_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_190

statement ok
CREATE VIEW view_1_tab3_190 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 32.53

statement ok
CREATE VIEW view_2_tab3_190 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 32.53)

statement ok
CREATE VIEW view_3_tab3_190 AS SELECT pk FROM view_1_tab3_190

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 32.53
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 32.53)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_190
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_190
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 32.53 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_190 UNION ALL SELECT pk, col0 FROM view_2_tab3_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 32.53 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_190 UNION SELECT pk, col0 FROM view_2_tab3_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 32.53 ) AS tab3_190
----
8

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_190
----
8

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE col1 <= 32.53
----
8

statement ok
DROP VIEW view_1_tab3_190

statement ok
DROP VIEW view_2_tab3_190

statement ok
DROP VIEW view_3_tab3_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_190') DROP VIEW view_1_tab4_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_190') DROP VIEW view_2_tab4_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_190') DROP VIEW view_3_tab4_190

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_190

statement ok
CREATE VIEW view_1_tab4_190 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 32.53

statement ok
CREATE VIEW view_2_tab4_190 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 32.53)

statement ok
CREATE VIEW view_3_tab4_190 AS SELECT pk FROM view_1_tab4_190

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 32.53
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 32.53)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_190
----
8
47

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_190
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 32.53 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_190 UNION ALL SELECT pk, col0 FROM view_2_tab4_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 32.53 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 32.53)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_190 UNION SELECT pk, col0 FROM view_2_tab4_190
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 32.53 ) AS tab4_190
----
8

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_190
----
8

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE col1 <= 32.53
----
8

statement ok
DROP VIEW view_1_tab4_190

statement ok
DROP VIEW view_2_tab4_190

statement ok
DROP VIEW view_3_tab4_190

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_191') DROP VIEW view_1_tab0_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_191') DROP VIEW view_2_tab0_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_191') DROP VIEW view_3_tab0_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_191

statement ok
CREATE VIEW view_1_tab0_191 AS SELECT pk, col0 FROM tab0 WHERE col0 < 85

statement ok
CREATE VIEW view_2_tab0_191 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 85)

statement ok
CREATE VIEW view_3_tab0_191 AS SELECT pk FROM view_1_tab0_191

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE col0 < 85
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 85)
----
1
95
9
88

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_191
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_191
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 85 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_191 UNION ALL SELECT pk, col0 FROM view_2_tab0_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 85 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_191 UNION SELECT pk, col0 FROM view_2_tab0_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 85 ) AS tab0_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE col0 < 85
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_191

statement ok
DROP VIEW view_2_tab0_191

statement ok
DROP VIEW view_3_tab0_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_191') DROP VIEW view_1_tab1_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_191') DROP VIEW view_2_tab1_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_191') DROP VIEW view_3_tab1_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_191

statement ok
CREATE VIEW view_1_tab1_191 AS SELECT pk, col0 FROM tab1 WHERE col0 < 85

statement ok
CREATE VIEW view_2_tab1_191 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 85)

statement ok
CREATE VIEW view_3_tab1_191 AS SELECT pk FROM view_1_tab1_191

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE col0 < 85
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 85)
----
1
95
9
88

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_191
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_191
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 85 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_191 UNION ALL SELECT pk, col0 FROM view_2_tab1_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 85 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_191 UNION SELECT pk, col0 FROM view_2_tab1_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 85 ) AS tab1_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE col0 < 85
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_191

statement ok
DROP VIEW view_2_tab1_191

statement ok
DROP VIEW view_3_tab1_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_191') DROP VIEW view_1_tab2_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_191') DROP VIEW view_2_tab2_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_191') DROP VIEW view_3_tab2_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_191

statement ok
CREATE VIEW view_1_tab2_191 AS SELECT pk, col0 FROM tab2 WHERE col0 < 85

statement ok
CREATE VIEW view_2_tab2_191 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 85)

statement ok
CREATE VIEW view_3_tab2_191 AS SELECT pk FROM view_1_tab2_191

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE col0 < 85
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 85)
----
1
95
9
88

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_191
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_191
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 85 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_191 UNION ALL SELECT pk, col0 FROM view_2_tab2_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 85 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_191 UNION SELECT pk, col0 FROM view_2_tab2_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 85 ) AS tab2_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE col0 < 85
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_191

statement ok
DROP VIEW view_2_tab2_191

statement ok
DROP VIEW view_3_tab2_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_191') DROP VIEW view_1_tab3_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_191') DROP VIEW view_2_tab3_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_191') DROP VIEW view_3_tab3_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_191

statement ok
CREATE VIEW view_1_tab3_191 AS SELECT pk, col0 FROM tab3 WHERE col0 < 85

statement ok
CREATE VIEW view_2_tab3_191 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 85)

statement ok
CREATE VIEW view_3_tab3_191 AS SELECT pk FROM view_1_tab3_191

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE col0 < 85
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 85)
----
1
95
9
88

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_191
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_191
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 85 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_191 UNION ALL SELECT pk, col0 FROM view_2_tab3_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 85 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_191 UNION SELECT pk, col0 FROM view_2_tab3_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 85 ) AS tab3_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE col0 < 85
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_191

statement ok
DROP VIEW view_2_tab3_191

statement ok
DROP VIEW view_3_tab3_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_191') DROP VIEW view_1_tab4_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_191') DROP VIEW view_2_tab4_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_191') DROP VIEW view_3_tab4_191

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_191

statement ok
CREATE VIEW view_1_tab4_191 AS SELECT pk, col0 FROM tab4 WHERE col0 < 85

statement ok
CREATE VIEW view_2_tab4_191 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 85)

statement ok
CREATE VIEW view_3_tab4_191 AS SELECT pk FROM view_1_tab4_191

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE col0 < 85
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 85)
----
1
95
9
88

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_191
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_191
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 85 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_191 UNION ALL SELECT pk, col0 FROM view_2_tab4_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 85 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 85)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_191 UNION SELECT pk, col0 FROM view_2_tab4_191
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 85 ) AS tab4_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_191
----
0
2
3
4
5
6
7
8

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE col0 < 85
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_191

statement ok
DROP VIEW view_2_tab4_191

statement ok
DROP VIEW view_3_tab4_191

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_192') DROP VIEW view_1_tab0_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_192') DROP VIEW view_2_tab0_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_192') DROP VIEW view_3_tab0_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_192

statement ok
CREATE VIEW view_1_tab0_192 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 <= 98

statement ok
CREATE VIEW view_2_tab0_192 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 <= 98)

statement ok
CREATE VIEW view_3_tab0_192 AS SELECT pk FROM view_1_tab0_192

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 <= 98
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 <= 98)
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_192
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 <= 98 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_192 UNION ALL SELECT pk, col0 FROM view_2_tab0_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 <= 98 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_192 UNION SELECT pk, col0 FROM view_2_tab0_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col3 <= 98 ) AS tab0_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE col0 IS NULL OR col3 <= 98
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_192

statement ok
DROP VIEW view_2_tab0_192

statement ok
DROP VIEW view_3_tab0_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_192') DROP VIEW view_1_tab1_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_192') DROP VIEW view_2_tab1_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_192') DROP VIEW view_3_tab1_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_192

statement ok
CREATE VIEW view_1_tab1_192 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 <= 98

statement ok
CREATE VIEW view_2_tab1_192 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 <= 98)

statement ok
CREATE VIEW view_3_tab1_192 AS SELECT pk FROM view_1_tab1_192

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 <= 98
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 <= 98)
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_192
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 <= 98 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_192 UNION ALL SELECT pk, col0 FROM view_2_tab1_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 <= 98 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_192 UNION SELECT pk, col0 FROM view_2_tab1_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col3 <= 98 ) AS tab1_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE col0 IS NULL OR col3 <= 98
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_192

statement ok
DROP VIEW view_2_tab1_192

statement ok
DROP VIEW view_3_tab1_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_192') DROP VIEW view_1_tab2_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_192') DROP VIEW view_2_tab2_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_192') DROP VIEW view_3_tab2_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_192

statement ok
CREATE VIEW view_1_tab2_192 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 <= 98

statement ok
CREATE VIEW view_2_tab2_192 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 <= 98)

statement ok
CREATE VIEW view_3_tab2_192 AS SELECT pk FROM view_1_tab2_192

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 <= 98
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 <= 98)
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_192
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 <= 98 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_192 UNION ALL SELECT pk, col0 FROM view_2_tab2_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 <= 98 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_192 UNION SELECT pk, col0 FROM view_2_tab2_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col3 <= 98 ) AS tab2_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE col0 IS NULL OR col3 <= 98
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_192

statement ok
DROP VIEW view_2_tab2_192

statement ok
DROP VIEW view_3_tab2_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_192') DROP VIEW view_1_tab3_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_192') DROP VIEW view_2_tab3_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_192') DROP VIEW view_3_tab3_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_192

statement ok
CREATE VIEW view_1_tab3_192 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 <= 98

statement ok
CREATE VIEW view_2_tab3_192 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 <= 98)

statement ok
CREATE VIEW view_3_tab3_192 AS SELECT pk FROM view_1_tab3_192

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 <= 98
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 <= 98)
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_192
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 <= 98 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_192 UNION ALL SELECT pk, col0 FROM view_2_tab3_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 <= 98 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_192 UNION SELECT pk, col0 FROM view_2_tab3_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col3 <= 98 ) AS tab3_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE col0 IS NULL OR col3 <= 98
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_192

statement ok
DROP VIEW view_2_tab3_192

statement ok
DROP VIEW view_3_tab3_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_192') DROP VIEW view_1_tab4_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_192') DROP VIEW view_2_tab4_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_192') DROP VIEW view_3_tab4_192

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_192

statement ok
CREATE VIEW view_1_tab4_192 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 <= 98

statement ok
CREATE VIEW view_2_tab4_192 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 <= 98)

statement ok
CREATE VIEW view_3_tab4_192 AS SELECT pk FROM view_1_tab4_192

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 <= 98
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 <= 98)
----

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_192
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 <= 98 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_192 UNION ALL SELECT pk, col0 FROM view_2_tab4_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 <= 98 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col3 <= 98)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_192 UNION SELECT pk, col0 FROM view_2_tab4_192
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col3 <= 98 ) AS tab4_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_192
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE col0 IS NULL OR col3 <= 98
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_192

statement ok
DROP VIEW view_2_tab4_192

statement ok
DROP VIEW view_3_tab4_192

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_193') DROP VIEW view_1_tab0_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_193') DROP VIEW view_2_tab0_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_193') DROP VIEW view_3_tab0_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_193

statement ok
CREATE VIEW view_1_tab0_193 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 70.6

statement ok
CREATE VIEW view_2_tab0_193 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 70.6)

statement ok
CREATE VIEW view_3_tab0_193 AS SELECT pk FROM view_1_tab0_193

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 70.6
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 70.6)
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_193
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_193
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 70.6 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_193 UNION ALL SELECT pk, col0 FROM view_2_tab0_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 70.6 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_193 UNION SELECT pk, col0 FROM view_2_tab0_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 70.6 ) AS tab0_193
----
2
8

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_193
----
2
8

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE col4 >= 70.6
----
2
8

statement ok
DROP VIEW view_1_tab0_193

statement ok
DROP VIEW view_2_tab0_193

statement ok
DROP VIEW view_3_tab0_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_193') DROP VIEW view_1_tab1_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_193') DROP VIEW view_2_tab1_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_193') DROP VIEW view_3_tab1_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_193

statement ok
CREATE VIEW view_1_tab1_193 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 70.6

statement ok
CREATE VIEW view_2_tab1_193 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 70.6)

statement ok
CREATE VIEW view_3_tab1_193 AS SELECT pk FROM view_1_tab1_193

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 70.6
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 70.6)
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_193
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_193
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 70.6 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_193 UNION ALL SELECT pk, col0 FROM view_2_tab1_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 70.6 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_193 UNION SELECT pk, col0 FROM view_2_tab1_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 70.6 ) AS tab1_193
----
2
8

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_193
----
2
8

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE col4 >= 70.6
----
2
8

statement ok
DROP VIEW view_1_tab1_193

statement ok
DROP VIEW view_2_tab1_193

statement ok
DROP VIEW view_3_tab1_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_193') DROP VIEW view_1_tab2_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_193') DROP VIEW view_2_tab2_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_193') DROP VIEW view_3_tab2_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_193

statement ok
CREATE VIEW view_1_tab2_193 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 70.6

statement ok
CREATE VIEW view_2_tab2_193 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 70.6)

statement ok
CREATE VIEW view_3_tab2_193 AS SELECT pk FROM view_1_tab2_193

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 70.6
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 70.6)
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_193
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_193
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 70.6 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_193 UNION ALL SELECT pk, col0 FROM view_2_tab2_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 70.6 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_193 UNION SELECT pk, col0 FROM view_2_tab2_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 70.6 ) AS tab2_193
----
2
8

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_193
----
2
8

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE col4 >= 70.6
----
2
8

statement ok
DROP VIEW view_1_tab2_193

statement ok
DROP VIEW view_2_tab2_193

statement ok
DROP VIEW view_3_tab2_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_193') DROP VIEW view_1_tab3_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_193') DROP VIEW view_2_tab3_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_193') DROP VIEW view_3_tab3_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_193

statement ok
CREATE VIEW view_1_tab3_193 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 70.6

statement ok
CREATE VIEW view_2_tab3_193 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 70.6)

statement ok
CREATE VIEW view_3_tab3_193 AS SELECT pk FROM view_1_tab3_193

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 70.6
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 70.6)
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_193
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_193
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 70.6 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_193 UNION ALL SELECT pk, col0 FROM view_2_tab3_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 70.6 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_193 UNION SELECT pk, col0 FROM view_2_tab3_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 70.6 ) AS tab3_193
----
2
8

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_193
----
2
8

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE col4 >= 70.6
----
2
8

statement ok
DROP VIEW view_1_tab3_193

statement ok
DROP VIEW view_2_tab3_193

statement ok
DROP VIEW view_3_tab3_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_193') DROP VIEW view_1_tab4_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_193') DROP VIEW view_2_tab4_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_193') DROP VIEW view_3_tab4_193

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_193

statement ok
CREATE VIEW view_1_tab4_193 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 70.6

statement ok
CREATE VIEW view_2_tab4_193 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 70.6)

statement ok
CREATE VIEW view_3_tab4_193 AS SELECT pk FROM view_1_tab4_193

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 70.6
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 70.6)
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_193
----
2
22
8
47

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_193
----
16 values hashing to ceeb9357f8587f019c791ba490acecf9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 70.6 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_193 UNION ALL SELECT pk, col0 FROM view_2_tab4_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 70.6 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 70.6)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_193 UNION SELECT pk, col0 FROM view_2_tab4_193
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 70.6 ) AS tab4_193
----
2
8

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_193
----
2
8

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE col4 >= 70.6
----
2
8

statement ok
DROP VIEW view_1_tab4_193

statement ok
DROP VIEW view_2_tab4_193

statement ok
DROP VIEW view_3_tab4_193

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_194') DROP VIEW view_1_tab0_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_194') DROP VIEW view_2_tab0_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_194') DROP VIEW view_3_tab0_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_194

statement ok
CREATE VIEW view_1_tab0_194 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 21)

statement ok
CREATE VIEW view_2_tab0_194 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 21))

statement ok
CREATE VIEW view_3_tab0_194 AS SELECT pk FROM view_1_tab0_194

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 21)
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 21))
----
6
0

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_194
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_194
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 21) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_194 UNION ALL SELECT pk, col0 FROM view_2_tab0_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 21) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_194 UNION SELECT pk, col0 FROM view_2_tab0_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 21) ) AS tab0_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE (col0 >= 21)
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_194

statement ok
DROP VIEW view_2_tab0_194

statement ok
DROP VIEW view_3_tab0_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_194') DROP VIEW view_1_tab1_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_194') DROP VIEW view_2_tab1_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_194') DROP VIEW view_3_tab1_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_194

statement ok
CREATE VIEW view_1_tab1_194 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 21)

statement ok
CREATE VIEW view_2_tab1_194 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 21))

statement ok
CREATE VIEW view_3_tab1_194 AS SELECT pk FROM view_1_tab1_194

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 21)
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 21))
----
6
0

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_194
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_194
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 21) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_194 UNION ALL SELECT pk, col0 FROM view_2_tab1_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 21) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_194 UNION SELECT pk, col0 FROM view_2_tab1_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 21) ) AS tab1_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE (col0 >= 21)
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_194

statement ok
DROP VIEW view_2_tab1_194

statement ok
DROP VIEW view_3_tab1_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_194') DROP VIEW view_1_tab2_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_194') DROP VIEW view_2_tab2_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_194') DROP VIEW view_3_tab2_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_194

statement ok
CREATE VIEW view_1_tab2_194 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 21)

statement ok
CREATE VIEW view_2_tab2_194 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 21))

statement ok
CREATE VIEW view_3_tab2_194 AS SELECT pk FROM view_1_tab2_194

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 21)
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 21))
----
6
0

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_194
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_194
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 21) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_194 UNION ALL SELECT pk, col0 FROM view_2_tab2_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 21) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_194 UNION SELECT pk, col0 FROM view_2_tab2_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 21) ) AS tab2_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE (col0 >= 21)
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_194

statement ok
DROP VIEW view_2_tab2_194

statement ok
DROP VIEW view_3_tab2_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_194') DROP VIEW view_1_tab3_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_194') DROP VIEW view_2_tab3_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_194') DROP VIEW view_3_tab3_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_194

statement ok
CREATE VIEW view_1_tab3_194 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 21)

statement ok
CREATE VIEW view_2_tab3_194 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 21))

statement ok
CREATE VIEW view_3_tab3_194 AS SELECT pk FROM view_1_tab3_194

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 21)
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 21))
----
6
0

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_194
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_194
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 21) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_194 UNION ALL SELECT pk, col0 FROM view_2_tab3_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 21) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_194 UNION SELECT pk, col0 FROM view_2_tab3_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 21) ) AS tab3_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE (col0 >= 21)
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_194

statement ok
DROP VIEW view_2_tab3_194

statement ok
DROP VIEW view_3_tab3_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_194') DROP VIEW view_1_tab4_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_194') DROP VIEW view_2_tab4_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_194') DROP VIEW view_3_tab4_194

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_194

statement ok
CREATE VIEW view_1_tab4_194 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 21)

statement ok
CREATE VIEW view_2_tab4_194 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 21))

statement ok
CREATE VIEW view_3_tab4_194 AS SELECT pk FROM view_1_tab4_194

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 21)
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 21))
----
6
0

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_194
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_194
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 21) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_194 UNION ALL SELECT pk, col0 FROM view_2_tab4_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 21) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 21))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_194 UNION SELECT pk, col0 FROM view_2_tab4_194
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 21) ) AS tab4_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_194
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE (col0 >= 21)
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_194

statement ok
DROP VIEW view_2_tab4_194

statement ok
DROP VIEW view_3_tab4_194

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_195') DROP VIEW view_1_tab0_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_195') DROP VIEW view_2_tab0_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_195') DROP VIEW view_3_tab0_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_195

statement ok
CREATE VIEW view_1_tab0_195 AS SELECT pk, col0 FROM tab0 WHERE col4 = 27.89

statement ok
CREATE VIEW view_2_tab0_195 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 27.89)

statement ok
CREATE VIEW view_3_tab0_195 AS SELECT pk FROM view_1_tab0_195

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE col4 = 27.89
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_195
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 27.89 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_195 UNION ALL SELECT pk, col0 FROM view_2_tab0_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 = 27.89 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_195 UNION SELECT pk, col0 FROM view_2_tab0_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 = 27.89 ) AS tab0_195
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_195
----

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE col4 = 27.89
----

statement ok
DROP VIEW view_1_tab0_195

statement ok
DROP VIEW view_2_tab0_195

statement ok
DROP VIEW view_3_tab0_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_195') DROP VIEW view_1_tab1_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_195') DROP VIEW view_2_tab1_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_195') DROP VIEW view_3_tab1_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_195

statement ok
CREATE VIEW view_1_tab1_195 AS SELECT pk, col0 FROM tab1 WHERE col4 = 27.89

statement ok
CREATE VIEW view_2_tab1_195 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 27.89)

statement ok
CREATE VIEW view_3_tab1_195 AS SELECT pk FROM view_1_tab1_195

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE col4 = 27.89
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_195
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 27.89 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_195 UNION ALL SELECT pk, col0 FROM view_2_tab1_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 = 27.89 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_195 UNION SELECT pk, col0 FROM view_2_tab1_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 = 27.89 ) AS tab1_195
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_195
----

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE col4 = 27.89
----

statement ok
DROP VIEW view_1_tab1_195

statement ok
DROP VIEW view_2_tab1_195

statement ok
DROP VIEW view_3_tab1_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_195') DROP VIEW view_1_tab2_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_195') DROP VIEW view_2_tab2_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_195') DROP VIEW view_3_tab2_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_195

statement ok
CREATE VIEW view_1_tab2_195 AS SELECT pk, col0 FROM tab2 WHERE col4 = 27.89

statement ok
CREATE VIEW view_2_tab2_195 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 27.89)

statement ok
CREATE VIEW view_3_tab2_195 AS SELECT pk FROM view_1_tab2_195

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE col4 = 27.89
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_195
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 27.89 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_195 UNION ALL SELECT pk, col0 FROM view_2_tab2_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 = 27.89 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_195 UNION SELECT pk, col0 FROM view_2_tab2_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 = 27.89 ) AS tab2_195
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_195
----

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE col4 = 27.89
----

statement ok
DROP VIEW view_1_tab2_195

statement ok
DROP VIEW view_2_tab2_195

statement ok
DROP VIEW view_3_tab2_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_195') DROP VIEW view_1_tab3_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_195') DROP VIEW view_2_tab3_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_195') DROP VIEW view_3_tab3_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_195

statement ok
CREATE VIEW view_1_tab3_195 AS SELECT pk, col0 FROM tab3 WHERE col4 = 27.89

statement ok
CREATE VIEW view_2_tab3_195 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 27.89)

statement ok
CREATE VIEW view_3_tab3_195 AS SELECT pk FROM view_1_tab3_195

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE col4 = 27.89
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_195
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 27.89 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_195 UNION ALL SELECT pk, col0 FROM view_2_tab3_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 = 27.89 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_195 UNION SELECT pk, col0 FROM view_2_tab3_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 = 27.89 ) AS tab3_195
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_195
----

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE col4 = 27.89
----

statement ok
DROP VIEW view_1_tab3_195

statement ok
DROP VIEW view_2_tab3_195

statement ok
DROP VIEW view_3_tab3_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_195') DROP VIEW view_1_tab4_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_195') DROP VIEW view_2_tab4_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_195') DROP VIEW view_3_tab4_195

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_195

statement ok
CREATE VIEW view_1_tab4_195 AS SELECT pk, col0 FROM tab4 WHERE col4 = 27.89

statement ok
CREATE VIEW view_2_tab4_195 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 27.89)

statement ok
CREATE VIEW view_3_tab4_195 AS SELECT pk FROM view_1_tab4_195

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE col4 = 27.89
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_195
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 27.89 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_195 UNION ALL SELECT pk, col0 FROM view_2_tab4_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 = 27.89 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 = 27.89)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_195 UNION SELECT pk, col0 FROM view_2_tab4_195
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 = 27.89 ) AS tab4_195
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_195
----

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE col4 = 27.89
----

statement ok
DROP VIEW view_1_tab4_195

statement ok
DROP VIEW view_2_tab4_195

statement ok
DROP VIEW view_3_tab4_195

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_196') DROP VIEW view_1_tab0_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_196') DROP VIEW view_2_tab0_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_196') DROP VIEW view_3_tab0_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_196

statement ok
CREATE VIEW view_1_tab0_196 AS SELECT pk, col0 FROM tab0 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))

statement ok
CREATE VIEW view_2_tab0_196 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))

statement ok
CREATE VIEW view_3_tab0_196 AS SELECT pk FROM view_1_tab0_196

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
0
30
2
22
6
0

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_196
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_196
----
0
30
2
22
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_196 UNION ALL SELECT pk, col0 FROM view_2_tab0_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_196 UNION SELECT pk, col0 FROM view_2_tab0_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) ) AS tab0_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab0_196

statement ok
DROP VIEW view_2_tab0_196

statement ok
DROP VIEW view_3_tab0_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_196') DROP VIEW view_1_tab1_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_196') DROP VIEW view_2_tab1_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_196') DROP VIEW view_3_tab1_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_196

statement ok
CREATE VIEW view_1_tab1_196 AS SELECT pk, col0 FROM tab1 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))

statement ok
CREATE VIEW view_2_tab1_196 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))

statement ok
CREATE VIEW view_3_tab1_196 AS SELECT pk FROM view_1_tab1_196

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
0
30
2
22
6
0

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_196
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_196
----
0
30
2
22
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_196 UNION ALL SELECT pk, col0 FROM view_2_tab1_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_196 UNION SELECT pk, col0 FROM view_2_tab1_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) ) AS tab1_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab1_196

statement ok
DROP VIEW view_2_tab1_196

statement ok
DROP VIEW view_3_tab1_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_196') DROP VIEW view_1_tab2_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_196') DROP VIEW view_2_tab2_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_196') DROP VIEW view_3_tab2_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_196

statement ok
CREATE VIEW view_1_tab2_196 AS SELECT pk, col0 FROM tab2 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))

statement ok
CREATE VIEW view_2_tab2_196 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))

statement ok
CREATE VIEW view_3_tab2_196 AS SELECT pk FROM view_1_tab2_196

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
0
30
2
22
6
0

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_196
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_196
----
0
30
2
22
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_196 UNION ALL SELECT pk, col0 FROM view_2_tab2_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_196 UNION SELECT pk, col0 FROM view_2_tab2_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) ) AS tab2_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab2_196

statement ok
DROP VIEW view_2_tab2_196

statement ok
DROP VIEW view_3_tab2_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_196') DROP VIEW view_1_tab3_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_196') DROP VIEW view_2_tab3_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_196') DROP VIEW view_3_tab3_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_196

statement ok
CREATE VIEW view_1_tab3_196 AS SELECT pk, col0 FROM tab3 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))

statement ok
CREATE VIEW view_2_tab3_196 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))

statement ok
CREATE VIEW view_3_tab3_196 AS SELECT pk FROM view_1_tab3_196

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
0
30
2
22
6
0

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_196
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_196
----
0
30
2
22
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_196 UNION ALL SELECT pk, col0 FROM view_2_tab3_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_196 UNION SELECT pk, col0 FROM view_2_tab3_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) ) AS tab3_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab3_196

statement ok
DROP VIEW view_2_tab3_196

statement ok
DROP VIEW view_3_tab3_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_196') DROP VIEW view_1_tab4_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_196') DROP VIEW view_2_tab4_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_196') DROP VIEW view_3_tab4_196

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_196

statement ok
CREATE VIEW view_1_tab4_196 AS SELECT pk, col0 FROM tab4 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))

statement ok
CREATE VIEW view_2_tab4_196 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))

statement ok
CREATE VIEW view_3_tab4_196 AS SELECT pk FROM view_1_tab4_196

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
0
30
2
22
6
0

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_196
----
14 values hashing to 37f5e60023ce2f2ca9914bc81350b241

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_196
----
0
30
2
22
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_196 UNION ALL SELECT pk, col0 FROM view_2_tab4_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_196 UNION SELECT pk, col0 FROM view_2_tab4_196
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7))) ) AS tab4_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_196
----
1
3
4
5
7
8
9

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE col0 > 34 AND ((col3 > 29) OR col4 > 73.13) AND (((col0 >= 7)))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab4_196

statement ok
DROP VIEW view_2_tab4_196

statement ok
DROP VIEW view_3_tab4_196

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_197') DROP VIEW view_1_tab0_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_197') DROP VIEW view_2_tab0_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_197') DROP VIEW view_3_tab0_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_197

statement ok
CREATE VIEW view_1_tab0_197 AS SELECT pk, col0 FROM tab0 WHERE col0 > 99

statement ok
CREATE VIEW view_2_tab0_197 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 99)

statement ok
CREATE VIEW view_3_tab0_197 AS SELECT pk FROM view_1_tab0_197

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col0 > 99
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_197
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 99 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_197 UNION ALL SELECT pk, col0 FROM view_2_tab0_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 99 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_197 UNION SELECT pk, col0 FROM view_2_tab0_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 99 ) AS tab0_197
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_197
----

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col0 > 99
----

statement ok
DROP VIEW view_1_tab0_197

statement ok
DROP VIEW view_2_tab0_197

statement ok
DROP VIEW view_3_tab0_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_197') DROP VIEW view_1_tab1_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_197') DROP VIEW view_2_tab1_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_197') DROP VIEW view_3_tab1_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_197

statement ok
CREATE VIEW view_1_tab1_197 AS SELECT pk, col0 FROM tab1 WHERE col0 > 99

statement ok
CREATE VIEW view_2_tab1_197 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 99)

statement ok
CREATE VIEW view_3_tab1_197 AS SELECT pk FROM view_1_tab1_197

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col0 > 99
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_197
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 99 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_197 UNION ALL SELECT pk, col0 FROM view_2_tab1_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 99 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_197 UNION SELECT pk, col0 FROM view_2_tab1_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 99 ) AS tab1_197
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_197
----

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col0 > 99
----

statement ok
DROP VIEW view_1_tab1_197

statement ok
DROP VIEW view_2_tab1_197

statement ok
DROP VIEW view_3_tab1_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_197') DROP VIEW view_1_tab2_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_197') DROP VIEW view_2_tab2_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_197') DROP VIEW view_3_tab2_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_197

statement ok
CREATE VIEW view_1_tab2_197 AS SELECT pk, col0 FROM tab2 WHERE col0 > 99

statement ok
CREATE VIEW view_2_tab2_197 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 99)

statement ok
CREATE VIEW view_3_tab2_197 AS SELECT pk FROM view_1_tab2_197

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col0 > 99
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_197
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 99 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_197 UNION ALL SELECT pk, col0 FROM view_2_tab2_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 99 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_197 UNION SELECT pk, col0 FROM view_2_tab2_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 99 ) AS tab2_197
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_197
----

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col0 > 99
----

statement ok
DROP VIEW view_1_tab2_197

statement ok
DROP VIEW view_2_tab2_197

statement ok
DROP VIEW view_3_tab2_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_197') DROP VIEW view_1_tab3_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_197') DROP VIEW view_2_tab3_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_197') DROP VIEW view_3_tab3_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_197

statement ok
CREATE VIEW view_1_tab3_197 AS SELECT pk, col0 FROM tab3 WHERE col0 > 99

statement ok
CREATE VIEW view_2_tab3_197 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 99)

statement ok
CREATE VIEW view_3_tab3_197 AS SELECT pk FROM view_1_tab3_197

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col0 > 99
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_197
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 99 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_197 UNION ALL SELECT pk, col0 FROM view_2_tab3_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 99 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_197 UNION SELECT pk, col0 FROM view_2_tab3_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 99 ) AS tab3_197
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_197
----

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col0 > 99
----

statement ok
DROP VIEW view_1_tab3_197

statement ok
DROP VIEW view_2_tab3_197

statement ok
DROP VIEW view_3_tab3_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_197') DROP VIEW view_1_tab4_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_197') DROP VIEW view_2_tab4_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_197') DROP VIEW view_3_tab4_197

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_197

statement ok
CREATE VIEW view_1_tab4_197 AS SELECT pk, col0 FROM tab4 WHERE col0 > 99

statement ok
CREATE VIEW view_2_tab4_197 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 99)

statement ok
CREATE VIEW view_3_tab4_197 AS SELECT pk FROM view_1_tab4_197

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col0 > 99
----

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_197
----

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 99 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_197 UNION ALL SELECT pk, col0 FROM view_2_tab4_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 99 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 99)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_197 UNION SELECT pk, col0 FROM view_2_tab4_197
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 99 ) AS tab4_197
----

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_197
----

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col0 > 99
----

statement ok
DROP VIEW view_1_tab4_197

statement ok
DROP VIEW view_2_tab4_197

statement ok
DROP VIEW view_3_tab4_197

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_198') DROP VIEW view_1_tab0_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_198') DROP VIEW view_2_tab0_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_198') DROP VIEW view_3_tab0_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_198

statement ok
CREATE VIEW view_1_tab0_198 AS SELECT pk, col0 FROM tab0 WHERE col4 IN (72.21,41.70,5.75)

statement ok
CREATE VIEW view_2_tab0_198 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (72.21,41.70,5.75))

statement ok
CREATE VIEW view_3_tab0_198 AS SELECT pk FROM view_1_tab0_198

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col4 IN (72.21,41.70,5.75)
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_198
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IN (72.21,41.70,5.75) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_198 UNION ALL SELECT pk, col0 FROM view_2_tab0_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 IN (72.21,41.70,5.75) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_198 UNION SELECT pk, col0 FROM view_2_tab0_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 IN (72.21,41.70,5.75) ) AS tab0_198
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_198
----

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col4 IN (72.21,41.70,5.75)
----

statement ok
DROP VIEW view_1_tab0_198

statement ok
DROP VIEW view_2_tab0_198

statement ok
DROP VIEW view_3_tab0_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_198') DROP VIEW view_1_tab1_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_198') DROP VIEW view_2_tab1_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_198') DROP VIEW view_3_tab1_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_198

statement ok
CREATE VIEW view_1_tab1_198 AS SELECT pk, col0 FROM tab1 WHERE col4 IN (72.21,41.70,5.75)

statement ok
CREATE VIEW view_2_tab1_198 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (72.21,41.70,5.75))

statement ok
CREATE VIEW view_3_tab1_198 AS SELECT pk FROM view_1_tab1_198

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col4 IN (72.21,41.70,5.75)
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_198
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IN (72.21,41.70,5.75) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_198 UNION ALL SELECT pk, col0 FROM view_2_tab1_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 IN (72.21,41.70,5.75) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_198 UNION SELECT pk, col0 FROM view_2_tab1_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 IN (72.21,41.70,5.75) ) AS tab1_198
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_198
----

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col4 IN (72.21,41.70,5.75)
----

statement ok
DROP VIEW view_1_tab1_198

statement ok
DROP VIEW view_2_tab1_198

statement ok
DROP VIEW view_3_tab1_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_198') DROP VIEW view_1_tab2_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_198') DROP VIEW view_2_tab2_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_198') DROP VIEW view_3_tab2_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_198

statement ok
CREATE VIEW view_1_tab2_198 AS SELECT pk, col0 FROM tab2 WHERE col4 IN (72.21,41.70,5.75)

statement ok
CREATE VIEW view_2_tab2_198 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (72.21,41.70,5.75))

statement ok
CREATE VIEW view_3_tab2_198 AS SELECT pk FROM view_1_tab2_198

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col4 IN (72.21,41.70,5.75)
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_198
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IN (72.21,41.70,5.75) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_198 UNION ALL SELECT pk, col0 FROM view_2_tab2_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 IN (72.21,41.70,5.75) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_198 UNION SELECT pk, col0 FROM view_2_tab2_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 IN (72.21,41.70,5.75) ) AS tab2_198
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_198
----

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col4 IN (72.21,41.70,5.75)
----

statement ok
DROP VIEW view_1_tab2_198

statement ok
DROP VIEW view_2_tab2_198

statement ok
DROP VIEW view_3_tab2_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_198') DROP VIEW view_1_tab3_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_198') DROP VIEW view_2_tab3_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_198') DROP VIEW view_3_tab3_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_198

statement ok
CREATE VIEW view_1_tab3_198 AS SELECT pk, col0 FROM tab3 WHERE col4 IN (72.21,41.70,5.75)

statement ok
CREATE VIEW view_2_tab3_198 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (72.21,41.70,5.75))

statement ok
CREATE VIEW view_3_tab3_198 AS SELECT pk FROM view_1_tab3_198

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col4 IN (72.21,41.70,5.75)
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_198
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IN (72.21,41.70,5.75) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_198 UNION ALL SELECT pk, col0 FROM view_2_tab3_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 IN (72.21,41.70,5.75) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_198 UNION SELECT pk, col0 FROM view_2_tab3_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 IN (72.21,41.70,5.75) ) AS tab3_198
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_198
----

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col4 IN (72.21,41.70,5.75)
----

statement ok
DROP VIEW view_1_tab3_198

statement ok
DROP VIEW view_2_tab3_198

statement ok
DROP VIEW view_3_tab3_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_198') DROP VIEW view_1_tab4_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_198') DROP VIEW view_2_tab4_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_198') DROP VIEW view_3_tab4_198

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_198

statement ok
CREATE VIEW view_1_tab4_198 AS SELECT pk, col0 FROM tab4 WHERE col4 IN (72.21,41.70,5.75)

statement ok
CREATE VIEW view_2_tab4_198 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (72.21,41.70,5.75))

statement ok
CREATE VIEW view_3_tab4_198 AS SELECT pk FROM view_1_tab4_198

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col4 IN (72.21,41.70,5.75)
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_198
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IN (72.21,41.70,5.75) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_198 UNION ALL SELECT pk, col0 FROM view_2_tab4_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 IN (72.21,41.70,5.75) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 IN (72.21,41.70,5.75))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_198 UNION SELECT pk, col0 FROM view_2_tab4_198
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 IN (72.21,41.70,5.75) ) AS tab4_198
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_198
----

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col4 IN (72.21,41.70,5.75)
----

statement ok
DROP VIEW view_1_tab4_198

statement ok
DROP VIEW view_2_tab4_198

statement ok
DROP VIEW view_3_tab4_198

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_199') DROP VIEW view_1_tab0_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_199') DROP VIEW view_2_tab0_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_199') DROP VIEW view_3_tab0_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_199

statement ok
CREATE VIEW view_1_tab0_199 AS SELECT pk, col0 FROM tab0 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42

statement ok
CREATE VIEW view_2_tab0_199 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)

statement ok
CREATE VIEW view_3_tab0_199 AS SELECT pk FROM view_1_tab0_199

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_199
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_199 UNION ALL SELECT pk, col0 FROM view_2_tab0_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_199 UNION SELECT pk, col0 FROM view_2_tab0_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 ) AS tab0_199
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_199
----

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

statement ok
DROP VIEW view_1_tab0_199

statement ok
DROP VIEW view_2_tab0_199

statement ok
DROP VIEW view_3_tab0_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_199') DROP VIEW view_1_tab1_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_199') DROP VIEW view_2_tab1_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_199') DROP VIEW view_3_tab1_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_199

statement ok
CREATE VIEW view_1_tab1_199 AS SELECT pk, col0 FROM tab1 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42

statement ok
CREATE VIEW view_2_tab1_199 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)

statement ok
CREATE VIEW view_3_tab1_199 AS SELECT pk FROM view_1_tab1_199

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_199
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_199 UNION ALL SELECT pk, col0 FROM view_2_tab1_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_199 UNION SELECT pk, col0 FROM view_2_tab1_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 ) AS tab1_199
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_199
----

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

statement ok
DROP VIEW view_1_tab1_199

statement ok
DROP VIEW view_2_tab1_199

statement ok
DROP VIEW view_3_tab1_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_199') DROP VIEW view_1_tab2_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_199') DROP VIEW view_2_tab2_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_199') DROP VIEW view_3_tab2_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_199

statement ok
CREATE VIEW view_1_tab2_199 AS SELECT pk, col0 FROM tab2 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42

statement ok
CREATE VIEW view_2_tab2_199 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)

statement ok
CREATE VIEW view_3_tab2_199 AS SELECT pk FROM view_1_tab2_199

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_199
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_199 UNION ALL SELECT pk, col0 FROM view_2_tab2_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_199 UNION SELECT pk, col0 FROM view_2_tab2_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 ) AS tab2_199
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_199
----

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

statement ok
DROP VIEW view_1_tab2_199

statement ok
DROP VIEW view_2_tab2_199

statement ok
DROP VIEW view_3_tab2_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_199') DROP VIEW view_1_tab3_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_199') DROP VIEW view_2_tab3_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_199') DROP VIEW view_3_tab3_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_199

statement ok
CREATE VIEW view_1_tab3_199 AS SELECT pk, col0 FROM tab3 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42

statement ok
CREATE VIEW view_2_tab3_199 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)

statement ok
CREATE VIEW view_3_tab3_199 AS SELECT pk FROM view_1_tab3_199

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_199
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_199 UNION ALL SELECT pk, col0 FROM view_2_tab3_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_199 UNION SELECT pk, col0 FROM view_2_tab3_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 ) AS tab3_199
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_199
----

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

statement ok
DROP VIEW view_1_tab3_199

statement ok
DROP VIEW view_2_tab3_199

statement ok
DROP VIEW view_3_tab3_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_199') DROP VIEW view_1_tab4_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_199') DROP VIEW view_2_tab4_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_199') DROP VIEW view_3_tab4_199

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_199

statement ok
CREATE VIEW view_1_tab4_199 AS SELECT pk, col0 FROM tab4 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42

statement ok
CREATE VIEW view_2_tab4_199 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)

statement ok
CREATE VIEW view_3_tab4_199 AS SELECT pk FROM view_1_tab4_199

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_199
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_199 UNION ALL SELECT pk, col0 FROM view_2_tab4_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_199 UNION SELECT pk, col0 FROM view_2_tab4_199
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42 ) AS tab4_199
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_199
----

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col3 IN (99,74,47,0,63) AND col3 < 45 AND (col4 <= 51.87) AND col1 < 4.42
----

statement ok
DROP VIEW view_1_tab4_199

statement ok
DROP VIEW view_2_tab4_199

statement ok
DROP VIEW view_3_tab4_199

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_200') DROP VIEW view_1_tab0_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_200') DROP VIEW view_2_tab0_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_200') DROP VIEW view_3_tab0_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_200

statement ok
CREATE VIEW view_1_tab0_200 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 21.49)

statement ok
CREATE VIEW view_2_tab0_200 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 21.49))

statement ok
CREATE VIEW view_3_tab0_200 AS SELECT pk FROM view_1_tab0_200

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 21.49)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 21.49))
----
8
47

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_200
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_200
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 21.49) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_200 UNION ALL SELECT pk, col0 FROM view_2_tab0_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 21.49) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_200 UNION SELECT pk, col0 FROM view_2_tab0_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 21.49) ) AS tab0_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE (col1 > 21.49)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_200

statement ok
DROP VIEW view_2_tab0_200

statement ok
DROP VIEW view_3_tab0_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_200') DROP VIEW view_1_tab1_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_200') DROP VIEW view_2_tab1_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_200') DROP VIEW view_3_tab1_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_200

statement ok
CREATE VIEW view_1_tab1_200 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 21.49)

statement ok
CREATE VIEW view_2_tab1_200 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 21.49))

statement ok
CREATE VIEW view_3_tab1_200 AS SELECT pk FROM view_1_tab1_200

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 21.49)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 21.49))
----
8
47

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_200
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_200
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 21.49) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_200 UNION ALL SELECT pk, col0 FROM view_2_tab1_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 21.49) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_200 UNION SELECT pk, col0 FROM view_2_tab1_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 21.49) ) AS tab1_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE (col1 > 21.49)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_200

statement ok
DROP VIEW view_2_tab1_200

statement ok
DROP VIEW view_3_tab1_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_200') DROP VIEW view_1_tab2_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_200') DROP VIEW view_2_tab2_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_200') DROP VIEW view_3_tab2_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_200

statement ok
CREATE VIEW view_1_tab2_200 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 21.49)

statement ok
CREATE VIEW view_2_tab2_200 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 21.49))

statement ok
CREATE VIEW view_3_tab2_200 AS SELECT pk FROM view_1_tab2_200

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 21.49)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 21.49))
----
8
47

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_200
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_200
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 21.49) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_200 UNION ALL SELECT pk, col0 FROM view_2_tab2_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 21.49) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_200 UNION SELECT pk, col0 FROM view_2_tab2_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 21.49) ) AS tab2_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE (col1 > 21.49)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_200

statement ok
DROP VIEW view_2_tab2_200

statement ok
DROP VIEW view_3_tab2_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_200') DROP VIEW view_1_tab3_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_200') DROP VIEW view_2_tab3_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_200') DROP VIEW view_3_tab3_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_200

statement ok
CREATE VIEW view_1_tab3_200 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 21.49)

statement ok
CREATE VIEW view_2_tab3_200 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 21.49))

statement ok
CREATE VIEW view_3_tab3_200 AS SELECT pk FROM view_1_tab3_200

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 21.49)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 21.49))
----
8
47

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_200
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_200
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 21.49) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_200 UNION ALL SELECT pk, col0 FROM view_2_tab3_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 21.49) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_200 UNION SELECT pk, col0 FROM view_2_tab3_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 21.49) ) AS tab3_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE (col1 > 21.49)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_200

statement ok
DROP VIEW view_2_tab3_200

statement ok
DROP VIEW view_3_tab3_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_200') DROP VIEW view_1_tab4_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_200') DROP VIEW view_2_tab4_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_200') DROP VIEW view_3_tab4_200

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_200

statement ok
CREATE VIEW view_1_tab4_200 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 21.49)

statement ok
CREATE VIEW view_2_tab4_200 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 21.49))

statement ok
CREATE VIEW view_3_tab4_200 AS SELECT pk FROM view_1_tab4_200

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 21.49)
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 21.49))
----
8
47

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_200
----
18 values hashing to 1309b2ee1b6caca8b786b7402ce0992a

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_200
----
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 21.49) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_200 UNION ALL SELECT pk, col0 FROM view_2_tab4_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 21.49) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 21.49))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_200 UNION SELECT pk, col0 FROM view_2_tab4_200
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 21.49) ) AS tab4_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_200
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE (col1 > 21.49)
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_200

statement ok
DROP VIEW view_2_tab4_200

statement ok
DROP VIEW view_3_tab4_200

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_201') DROP VIEW view_1_tab0_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_201') DROP VIEW view_2_tab0_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_201') DROP VIEW view_3_tab0_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_201

statement ok
CREATE VIEW view_1_tab0_201 AS SELECT pk, col0 FROM tab0 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))

statement ok
CREATE VIEW view_2_tab0_201 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))

statement ok
CREATE VIEW view_3_tab0_201 AS SELECT pk FROM view_1_tab0_201

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_201
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_201 UNION ALL SELECT pk, col0 FROM view_2_tab0_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_201 UNION SELECT pk, col0 FROM view_2_tab0_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) ) AS tab0_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_201

statement ok
DROP VIEW view_2_tab0_201

statement ok
DROP VIEW view_3_tab0_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_201') DROP VIEW view_1_tab1_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_201') DROP VIEW view_2_tab1_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_201') DROP VIEW view_3_tab1_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_201

statement ok
CREATE VIEW view_1_tab1_201 AS SELECT pk, col0 FROM tab1 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))

statement ok
CREATE VIEW view_2_tab1_201 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))

statement ok
CREATE VIEW view_3_tab1_201 AS SELECT pk FROM view_1_tab1_201

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_201
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_201 UNION ALL SELECT pk, col0 FROM view_2_tab1_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_201 UNION SELECT pk, col0 FROM view_2_tab1_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) ) AS tab1_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_201

statement ok
DROP VIEW view_2_tab1_201

statement ok
DROP VIEW view_3_tab1_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_201') DROP VIEW view_1_tab2_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_201') DROP VIEW view_2_tab2_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_201') DROP VIEW view_3_tab2_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_201

statement ok
CREATE VIEW view_1_tab2_201 AS SELECT pk, col0 FROM tab2 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))

statement ok
CREATE VIEW view_2_tab2_201 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))

statement ok
CREATE VIEW view_3_tab2_201 AS SELECT pk FROM view_1_tab2_201

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_201
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_201 UNION ALL SELECT pk, col0 FROM view_2_tab2_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_201 UNION SELECT pk, col0 FROM view_2_tab2_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) ) AS tab2_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_201

statement ok
DROP VIEW view_2_tab2_201

statement ok
DROP VIEW view_3_tab2_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_201') DROP VIEW view_1_tab3_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_201') DROP VIEW view_2_tab3_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_201') DROP VIEW view_3_tab3_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_201

statement ok
CREATE VIEW view_1_tab3_201 AS SELECT pk, col0 FROM tab3 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))

statement ok
CREATE VIEW view_2_tab3_201 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))

statement ok
CREATE VIEW view_3_tab3_201 AS SELECT pk FROM view_1_tab3_201

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_201
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_201 UNION ALL SELECT pk, col0 FROM view_2_tab3_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_201 UNION SELECT pk, col0 FROM view_2_tab3_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) ) AS tab3_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_201

statement ok
DROP VIEW view_2_tab3_201

statement ok
DROP VIEW view_3_tab3_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_201') DROP VIEW view_1_tab4_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_201') DROP VIEW view_2_tab4_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_201') DROP VIEW view_3_tab4_201

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_201

statement ok
CREATE VIEW view_1_tab4_201 AS SELECT pk, col0 FROM tab4 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))

statement ok
CREATE VIEW view_2_tab4_201 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))

statement ok
CREATE VIEW view_3_tab4_201 AS SELECT pk FROM view_1_tab4_201

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_201
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_201 UNION ALL SELECT pk, col0 FROM view_2_tab4_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_201 UNION SELECT pk, col0 FROM view_2_tab4_201
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24)) ) AS tab4_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_201
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE col3 > 3 OR (((col3 BETWEEN 22 AND 86) AND (col1 > 30.32) OR (col4 >= 99.10) AND col4 > 11.24))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_201

statement ok
DROP VIEW view_2_tab4_201

statement ok
DROP VIEW view_3_tab4_201

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_202') DROP VIEW view_1_tab0_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_202') DROP VIEW view_2_tab0_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_202') DROP VIEW view_3_tab0_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_202

statement ok
CREATE VIEW view_1_tab0_202 AS SELECT pk, col0 FROM tab0 WHERE (col4 > 18.90 OR col0 <= 25)

statement ok
CREATE VIEW view_2_tab0_202 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 18.90 OR col0 <= 25))

statement ok
CREATE VIEW view_3_tab0_202 AS SELECT pk FROM view_1_tab0_202

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE (col4 > 18.90 OR col0 <= 25)
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
5
58

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_202
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_202
----
5
58

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 18.90 OR col0 <= 25) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_202 UNION ALL SELECT pk, col0 FROM view_2_tab0_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 18.90 OR col0 <= 25) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_202 UNION SELECT pk, col0 FROM view_2_tab0_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 > 18.90 OR col0 <= 25) ) AS tab0_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE (col4 > 18.90 OR col0 <= 25)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab0_202

statement ok
DROP VIEW view_2_tab0_202

statement ok
DROP VIEW view_3_tab0_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_202') DROP VIEW view_1_tab1_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_202') DROP VIEW view_2_tab1_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_202') DROP VIEW view_3_tab1_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_202

statement ok
CREATE VIEW view_1_tab1_202 AS SELECT pk, col0 FROM tab1 WHERE (col4 > 18.90 OR col0 <= 25)

statement ok
CREATE VIEW view_2_tab1_202 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 18.90 OR col0 <= 25))

statement ok
CREATE VIEW view_3_tab1_202 AS SELECT pk FROM view_1_tab1_202

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE (col4 > 18.90 OR col0 <= 25)
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
5
58

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_202
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_202
----
5
58

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 18.90 OR col0 <= 25) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_202 UNION ALL SELECT pk, col0 FROM view_2_tab1_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 18.90 OR col0 <= 25) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_202 UNION SELECT pk, col0 FROM view_2_tab1_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 > 18.90 OR col0 <= 25) ) AS tab1_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE (col4 > 18.90 OR col0 <= 25)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab1_202

statement ok
DROP VIEW view_2_tab1_202

statement ok
DROP VIEW view_3_tab1_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_202') DROP VIEW view_1_tab2_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_202') DROP VIEW view_2_tab2_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_202') DROP VIEW view_3_tab2_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_202

statement ok
CREATE VIEW view_1_tab2_202 AS SELECT pk, col0 FROM tab2 WHERE (col4 > 18.90 OR col0 <= 25)

statement ok
CREATE VIEW view_2_tab2_202 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 18.90 OR col0 <= 25))

statement ok
CREATE VIEW view_3_tab2_202 AS SELECT pk FROM view_1_tab2_202

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE (col4 > 18.90 OR col0 <= 25)
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
5
58

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_202
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_202
----
5
58

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 18.90 OR col0 <= 25) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_202 UNION ALL SELECT pk, col0 FROM view_2_tab2_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 18.90 OR col0 <= 25) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_202 UNION SELECT pk, col0 FROM view_2_tab2_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 > 18.90 OR col0 <= 25) ) AS tab2_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE (col4 > 18.90 OR col0 <= 25)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab2_202

statement ok
DROP VIEW view_2_tab2_202

statement ok
DROP VIEW view_3_tab2_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_202') DROP VIEW view_1_tab3_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_202') DROP VIEW view_2_tab3_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_202') DROP VIEW view_3_tab3_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_202

statement ok
CREATE VIEW view_1_tab3_202 AS SELECT pk, col0 FROM tab3 WHERE (col4 > 18.90 OR col0 <= 25)

statement ok
CREATE VIEW view_2_tab3_202 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 18.90 OR col0 <= 25))

statement ok
CREATE VIEW view_3_tab3_202 AS SELECT pk FROM view_1_tab3_202

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE (col4 > 18.90 OR col0 <= 25)
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
5
58

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_202
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_202
----
5
58

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 18.90 OR col0 <= 25) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_202 UNION ALL SELECT pk, col0 FROM view_2_tab3_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 18.90 OR col0 <= 25) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_202 UNION SELECT pk, col0 FROM view_2_tab3_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 > 18.90 OR col0 <= 25) ) AS tab3_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE (col4 > 18.90 OR col0 <= 25)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab3_202

statement ok
DROP VIEW view_2_tab3_202

statement ok
DROP VIEW view_3_tab3_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_202') DROP VIEW view_1_tab4_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_202') DROP VIEW view_2_tab4_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_202') DROP VIEW view_3_tab4_202

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_202

statement ok
CREATE VIEW view_1_tab4_202 AS SELECT pk, col0 FROM tab4 WHERE (col4 > 18.90 OR col0 <= 25)

statement ok
CREATE VIEW view_2_tab4_202 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 18.90 OR col0 <= 25))

statement ok
CREATE VIEW view_3_tab4_202 AS SELECT pk FROM view_1_tab4_202

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE (col4 > 18.90 OR col0 <= 25)
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
5
58

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_202
----
18 values hashing to d99e13aa54e9af87f56f24203db0f437

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_202
----
5
58

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 18.90 OR col0 <= 25) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_202 UNION ALL SELECT pk, col0 FROM view_2_tab4_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 18.90 OR col0 <= 25) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 18.90 OR col0 <= 25))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_202 UNION SELECT pk, col0 FROM view_2_tab4_202
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 > 18.90 OR col0 <= 25) ) AS tab4_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_202
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE (col4 > 18.90 OR col0 <= 25)
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab4_202

statement ok
DROP VIEW view_2_tab4_202

statement ok
DROP VIEW view_3_tab4_202

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_203') DROP VIEW view_1_tab0_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_203') DROP VIEW view_2_tab0_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_203') DROP VIEW view_3_tab0_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_203

statement ok
CREATE VIEW view_1_tab0_203 AS SELECT pk, col0 FROM tab0 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab0_203 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab0_203 AS SELECT pk FROM view_1_tab0_203

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
1
95
9
88

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_203
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_203
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_203 UNION ALL SELECT pk, col0 FROM view_2_tab0_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_203 UNION SELECT pk, col0 FROM view_2_tab0_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) ) AS tab0_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_203

statement ok
DROP VIEW view_2_tab0_203

statement ok
DROP VIEW view_3_tab0_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_203') DROP VIEW view_1_tab1_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_203') DROP VIEW view_2_tab1_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_203') DROP VIEW view_3_tab1_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_203

statement ok
CREATE VIEW view_1_tab1_203 AS SELECT pk, col0 FROM tab1 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab1_203 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab1_203 AS SELECT pk FROM view_1_tab1_203

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
1
95
9
88

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_203
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_203
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_203 UNION ALL SELECT pk, col0 FROM view_2_tab1_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_203 UNION SELECT pk, col0 FROM view_2_tab1_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) ) AS tab1_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_203

statement ok
DROP VIEW view_2_tab1_203

statement ok
DROP VIEW view_3_tab1_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_203') DROP VIEW view_1_tab2_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_203') DROP VIEW view_2_tab2_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_203') DROP VIEW view_3_tab2_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_203

statement ok
CREATE VIEW view_1_tab2_203 AS SELECT pk, col0 FROM tab2 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab2_203 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab2_203 AS SELECT pk FROM view_1_tab2_203

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
1
95
9
88

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_203
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_203
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_203 UNION ALL SELECT pk, col0 FROM view_2_tab2_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_203 UNION SELECT pk, col0 FROM view_2_tab2_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) ) AS tab2_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_203

statement ok
DROP VIEW view_2_tab2_203

statement ok
DROP VIEW view_3_tab2_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_203') DROP VIEW view_1_tab3_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_203') DROP VIEW view_2_tab3_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_203') DROP VIEW view_3_tab3_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_203

statement ok
CREATE VIEW view_1_tab3_203 AS SELECT pk, col0 FROM tab3 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab3_203 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab3_203 AS SELECT pk FROM view_1_tab3_203

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
1
95
9
88

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_203
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_203
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_203 UNION ALL SELECT pk, col0 FROM view_2_tab3_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_203 UNION SELECT pk, col0 FROM view_2_tab3_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) ) AS tab3_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_203

statement ok
DROP VIEW view_2_tab3_203

statement ok
DROP VIEW view_3_tab3_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_203') DROP VIEW view_1_tab4_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_203') DROP VIEW view_2_tab4_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_203') DROP VIEW view_3_tab4_203

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_203

statement ok
CREATE VIEW view_1_tab4_203 AS SELECT pk, col0 FROM tab4 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab4_203 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab4_203 AS SELECT pk FROM view_1_tab4_203

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
1
95
9
88

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_203
----
16 values hashing to 0c5a0e797453fe90c15e18e44296d6ba

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_203
----
1
95
9
88

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_203 UNION ALL SELECT pk, col0 FROM view_2_tab4_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_203 UNION SELECT pk, col0 FROM view_2_tab4_203
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL))) ) AS tab4_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_203
----
0
2
3
4
5
6
7
8

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE ((col3 IN (68,13,21,16,87) OR (col1 = 12.25) AND col1 < 59.31 OR ((col0 <= 69) OR col4 >= 51.39 AND col0 < 87)) OR (col0 > 84 AND (col1 < 17.99)) OR (col4 > 60.65 AND col3 > 18 OR col1 BETWEEN 7.6 AND 32.59 AND (col0 IS NULL) OR (col3 IS NULL)))
----
0
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_203

statement ok
DROP VIEW view_2_tab4_203

statement ok
DROP VIEW view_3_tab4_203

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_205') DROP VIEW view_1_tab0_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_205') DROP VIEW view_2_tab0_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_205') DROP VIEW view_3_tab0_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_205

statement ok
CREATE VIEW view_1_tab0_205 AS SELECT pk, col0 FROM tab0 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))

statement ok
CREATE VIEW view_2_tab0_205 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))

statement ok
CREATE VIEW view_3_tab0_205 AS SELECT pk FROM view_1_tab0_205

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_205
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_205 UNION ALL SELECT pk, col0 FROM view_2_tab0_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_205 UNION SELECT pk, col0 FROM view_2_tab0_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) ) AS tab0_205
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_205
----

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

statement ok
DROP VIEW view_1_tab0_205

statement ok
DROP VIEW view_2_tab0_205

statement ok
DROP VIEW view_3_tab0_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_205') DROP VIEW view_1_tab1_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_205') DROP VIEW view_2_tab1_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_205') DROP VIEW view_3_tab1_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_205

statement ok
CREATE VIEW view_1_tab1_205 AS SELECT pk, col0 FROM tab1 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))

statement ok
CREATE VIEW view_2_tab1_205 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))

statement ok
CREATE VIEW view_3_tab1_205 AS SELECT pk FROM view_1_tab1_205

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_205
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_205 UNION ALL SELECT pk, col0 FROM view_2_tab1_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_205 UNION SELECT pk, col0 FROM view_2_tab1_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) ) AS tab1_205
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_205
----

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

statement ok
DROP VIEW view_1_tab1_205

statement ok
DROP VIEW view_2_tab1_205

statement ok
DROP VIEW view_3_tab1_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_205') DROP VIEW view_1_tab2_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_205') DROP VIEW view_2_tab2_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_205') DROP VIEW view_3_tab2_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_205

statement ok
CREATE VIEW view_1_tab2_205 AS SELECT pk, col0 FROM tab2 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))

statement ok
CREATE VIEW view_2_tab2_205 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))

statement ok
CREATE VIEW view_3_tab2_205 AS SELECT pk FROM view_1_tab2_205

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_205
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_205 UNION ALL SELECT pk, col0 FROM view_2_tab2_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_205 UNION SELECT pk, col0 FROM view_2_tab2_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) ) AS tab2_205
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_205
----

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

statement ok
DROP VIEW view_1_tab2_205

statement ok
DROP VIEW view_2_tab2_205

statement ok
DROP VIEW view_3_tab2_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_205') DROP VIEW view_1_tab3_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_205') DROP VIEW view_2_tab3_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_205') DROP VIEW view_3_tab3_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_205

statement ok
CREATE VIEW view_1_tab3_205 AS SELECT pk, col0 FROM tab3 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))

statement ok
CREATE VIEW view_2_tab3_205 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))

statement ok
CREATE VIEW view_3_tab3_205 AS SELECT pk FROM view_1_tab3_205

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_205
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_205 UNION ALL SELECT pk, col0 FROM view_2_tab3_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_205 UNION SELECT pk, col0 FROM view_2_tab3_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) ) AS tab3_205
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_205
----

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

statement ok
DROP VIEW view_1_tab3_205

statement ok
DROP VIEW view_2_tab3_205

statement ok
DROP VIEW view_3_tab3_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_205') DROP VIEW view_1_tab4_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_205') DROP VIEW view_2_tab4_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_205') DROP VIEW view_3_tab4_205

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_205

statement ok
CREATE VIEW view_1_tab4_205 AS SELECT pk, col0 FROM tab4 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))

statement ok
CREATE VIEW view_2_tab4_205 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))

statement ok
CREATE VIEW view_3_tab4_205 AS SELECT pk FROM view_1_tab4_205

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_205
----

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_205 UNION ALL SELECT pk, col0 FROM view_2_tab4_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_205 UNION SELECT pk, col0 FROM view_2_tab4_205
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41)) ) AS tab4_205
----

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_205
----

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE (((col3 < 34 AND (col3 > 22))) AND ((col0 > 52 AND col3 > 69 AND col3 IS NULL AND ((col3 > 60) AND col0 < 11) AND (col3 = 8))) OR col1 = 45.79 AND col0 IS NULL AND (col0 = 41))
----

statement ok
DROP VIEW view_1_tab4_205

statement ok
DROP VIEW view_2_tab4_205

statement ok
DROP VIEW view_3_tab4_205

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_206') DROP VIEW view_1_tab0_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_206') DROP VIEW view_2_tab0_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_206') DROP VIEW view_3_tab0_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_206

statement ok
CREATE VIEW view_1_tab0_206 AS SELECT pk, col0 FROM tab0 WHERE col1 > 54.2

statement ok
CREATE VIEW view_2_tab0_206 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 54.2)

statement ok
CREATE VIEW view_3_tab0_206 AS SELECT pk FROM view_1_tab0_206

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col1 > 54.2
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 54.2)
----
4
84
6
0
7
65
8
47

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_206
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_206
----
4
84
6
0
7
65
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 54.2 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_206 UNION ALL SELECT pk, col0 FROM view_2_tab0_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 54.2 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_206 UNION SELECT pk, col0 FROM view_2_tab0_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 54.2 ) AS tab0_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col1 > 54.2
----
0
1
2
3
5
9

statement ok
DROP VIEW view_1_tab0_206

statement ok
DROP VIEW view_2_tab0_206

statement ok
DROP VIEW view_3_tab0_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_206') DROP VIEW view_1_tab1_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_206') DROP VIEW view_2_tab1_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_206') DROP VIEW view_3_tab1_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_206

statement ok
CREATE VIEW view_1_tab1_206 AS SELECT pk, col0 FROM tab1 WHERE col1 > 54.2

statement ok
CREATE VIEW view_2_tab1_206 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 54.2)

statement ok
CREATE VIEW view_3_tab1_206 AS SELECT pk FROM view_1_tab1_206

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col1 > 54.2
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 54.2)
----
4
84
6
0
7
65
8
47

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_206
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_206
----
4
84
6
0
7
65
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 54.2 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_206 UNION ALL SELECT pk, col0 FROM view_2_tab1_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 54.2 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_206 UNION SELECT pk, col0 FROM view_2_tab1_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 54.2 ) AS tab1_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col1 > 54.2
----
0
1
2
3
5
9

statement ok
DROP VIEW view_1_tab1_206

statement ok
DROP VIEW view_2_tab1_206

statement ok
DROP VIEW view_3_tab1_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_206') DROP VIEW view_1_tab2_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_206') DROP VIEW view_2_tab2_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_206') DROP VIEW view_3_tab2_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_206

statement ok
CREATE VIEW view_1_tab2_206 AS SELECT pk, col0 FROM tab2 WHERE col1 > 54.2

statement ok
CREATE VIEW view_2_tab2_206 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 54.2)

statement ok
CREATE VIEW view_3_tab2_206 AS SELECT pk FROM view_1_tab2_206

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col1 > 54.2
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 54.2)
----
4
84
6
0
7
65
8
47

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_206
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_206
----
4
84
6
0
7
65
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 54.2 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_206 UNION ALL SELECT pk, col0 FROM view_2_tab2_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 54.2 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_206 UNION SELECT pk, col0 FROM view_2_tab2_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 54.2 ) AS tab2_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col1 > 54.2
----
0
1
2
3
5
9

statement ok
DROP VIEW view_1_tab2_206

statement ok
DROP VIEW view_2_tab2_206

statement ok
DROP VIEW view_3_tab2_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_206') DROP VIEW view_1_tab3_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_206') DROP VIEW view_2_tab3_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_206') DROP VIEW view_3_tab3_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_206

statement ok
CREATE VIEW view_1_tab3_206 AS SELECT pk, col0 FROM tab3 WHERE col1 > 54.2

statement ok
CREATE VIEW view_2_tab3_206 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 54.2)

statement ok
CREATE VIEW view_3_tab3_206 AS SELECT pk FROM view_1_tab3_206

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col1 > 54.2
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 54.2)
----
4
84
6
0
7
65
8
47

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_206
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_206
----
4
84
6
0
7
65
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 54.2 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_206 UNION ALL SELECT pk, col0 FROM view_2_tab3_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 54.2 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_206 UNION SELECT pk, col0 FROM view_2_tab3_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 54.2 ) AS tab3_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col1 > 54.2
----
0
1
2
3
5
9

statement ok
DROP VIEW view_1_tab3_206

statement ok
DROP VIEW view_2_tab3_206

statement ok
DROP VIEW view_3_tab3_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_206') DROP VIEW view_1_tab4_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_206') DROP VIEW view_2_tab4_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_206') DROP VIEW view_3_tab4_206

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_206

statement ok
CREATE VIEW view_1_tab4_206 AS SELECT pk, col0 FROM tab4 WHERE col1 > 54.2

statement ok
CREATE VIEW view_2_tab4_206 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 54.2)

statement ok
CREATE VIEW view_3_tab4_206 AS SELECT pk FROM view_1_tab4_206

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col1 > 54.2
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 54.2)
----
4
84
6
0
7
65
8
47

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_206
----
12 values hashing to 2758af7007ee32fcfaddedbedda1b887

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_206
----
4
84
6
0
7
65
8
47

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 54.2 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_206 UNION ALL SELECT pk, col0 FROM view_2_tab4_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 54.2 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 54.2)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_206 UNION SELECT pk, col0 FROM view_2_tab4_206
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 54.2 ) AS tab4_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_206
----
0
1
2
3
5
9

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col1 > 54.2
----
0
1
2
3
5
9

statement ok
DROP VIEW view_1_tab4_206

statement ok
DROP VIEW view_2_tab4_206

statement ok
DROP VIEW view_3_tab4_206

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_207') DROP VIEW view_1_tab0_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_207') DROP VIEW view_2_tab0_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_207') DROP VIEW view_3_tab0_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_207

statement ok
CREATE VIEW view_1_tab0_207 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)

statement ok
CREATE VIEW view_2_tab0_207 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))

statement ok
CREATE VIEW view_3_tab0_207 AS SELECT pk FROM view_1_tab0_207

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_207
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_207 UNION ALL SELECT pk, col0 FROM view_2_tab0_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_207 UNION SELECT pk, col0 FROM view_2_tab0_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) ) AS tab0_207
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_207
----

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

statement ok
DROP VIEW view_1_tab0_207

statement ok
DROP VIEW view_2_tab0_207

statement ok
DROP VIEW view_3_tab0_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_207') DROP VIEW view_1_tab1_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_207') DROP VIEW view_2_tab1_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_207') DROP VIEW view_3_tab1_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_207

statement ok
CREATE VIEW view_1_tab1_207 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)

statement ok
CREATE VIEW view_2_tab1_207 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))

statement ok
CREATE VIEW view_3_tab1_207 AS SELECT pk FROM view_1_tab1_207

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_207
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_207 UNION ALL SELECT pk, col0 FROM view_2_tab1_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_207 UNION SELECT pk, col0 FROM view_2_tab1_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) ) AS tab1_207
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_207
----

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

statement ok
DROP VIEW view_1_tab1_207

statement ok
DROP VIEW view_2_tab1_207

statement ok
DROP VIEW view_3_tab1_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_207') DROP VIEW view_1_tab2_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_207') DROP VIEW view_2_tab2_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_207') DROP VIEW view_3_tab2_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_207

statement ok
CREATE VIEW view_1_tab2_207 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)

statement ok
CREATE VIEW view_2_tab2_207 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))

statement ok
CREATE VIEW view_3_tab2_207 AS SELECT pk FROM view_1_tab2_207

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_207
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_207 UNION ALL SELECT pk, col0 FROM view_2_tab2_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_207 UNION SELECT pk, col0 FROM view_2_tab2_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) ) AS tab2_207
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_207
----

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

statement ok
DROP VIEW view_1_tab2_207

statement ok
DROP VIEW view_2_tab2_207

statement ok
DROP VIEW view_3_tab2_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_207') DROP VIEW view_1_tab3_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_207') DROP VIEW view_2_tab3_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_207') DROP VIEW view_3_tab3_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_207

statement ok
CREATE VIEW view_1_tab3_207 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)

statement ok
CREATE VIEW view_2_tab3_207 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))

statement ok
CREATE VIEW view_3_tab3_207 AS SELECT pk FROM view_1_tab3_207

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_207
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_207 UNION ALL SELECT pk, col0 FROM view_2_tab3_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_207 UNION SELECT pk, col0 FROM view_2_tab3_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) ) AS tab3_207
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_207
----

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

statement ok
DROP VIEW view_1_tab3_207

statement ok
DROP VIEW view_2_tab3_207

statement ok
DROP VIEW view_3_tab3_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_207') DROP VIEW view_1_tab4_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_207') DROP VIEW view_2_tab4_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_207') DROP VIEW view_3_tab4_207

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_207

statement ok
CREATE VIEW view_1_tab4_207 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)

statement ok
CREATE VIEW view_2_tab4_207 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))

statement ok
CREATE VIEW view_3_tab4_207 AS SELECT pk FROM view_1_tab4_207

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_207
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_207 UNION ALL SELECT pk, col0 FROM view_2_tab4_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_207 UNION SELECT pk, col0 FROM view_2_tab4_207
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26) ) AS tab4_207
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_207
----

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE col0 <= 29 AND ((col3 < 44)) AND (col0 >= 26)
----

statement ok
DROP VIEW view_1_tab4_207

statement ok
DROP VIEW view_2_tab4_207

statement ok
DROP VIEW view_3_tab4_207

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_208') DROP VIEW view_1_tab0_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_208') DROP VIEW view_2_tab0_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_208') DROP VIEW view_3_tab0_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_208

statement ok
CREATE VIEW view_1_tab0_208 AS SELECT pk, col0 FROM tab0 WHERE col0 = 59

statement ok
CREATE VIEW view_2_tab0_208 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 59)

statement ok
CREATE VIEW view_3_tab0_208 AS SELECT pk FROM view_1_tab0_208

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE col0 = 59
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_208
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 59 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_208 UNION ALL SELECT pk, col0 FROM view_2_tab0_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 59 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_208 UNION SELECT pk, col0 FROM view_2_tab0_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 59 ) AS tab0_208
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_208
----

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE col0 = 59
----

statement ok
DROP VIEW view_1_tab0_208

statement ok
DROP VIEW view_2_tab0_208

statement ok
DROP VIEW view_3_tab0_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_208') DROP VIEW view_1_tab1_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_208') DROP VIEW view_2_tab1_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_208') DROP VIEW view_3_tab1_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_208

statement ok
CREATE VIEW view_1_tab1_208 AS SELECT pk, col0 FROM tab1 WHERE col0 = 59

statement ok
CREATE VIEW view_2_tab1_208 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 59)

statement ok
CREATE VIEW view_3_tab1_208 AS SELECT pk FROM view_1_tab1_208

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE col0 = 59
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_208
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 59 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_208 UNION ALL SELECT pk, col0 FROM view_2_tab1_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 59 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_208 UNION SELECT pk, col0 FROM view_2_tab1_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 59 ) AS tab1_208
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_208
----

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE col0 = 59
----

statement ok
DROP VIEW view_1_tab1_208

statement ok
DROP VIEW view_2_tab1_208

statement ok
DROP VIEW view_3_tab1_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_208') DROP VIEW view_1_tab2_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_208') DROP VIEW view_2_tab2_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_208') DROP VIEW view_3_tab2_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_208

statement ok
CREATE VIEW view_1_tab2_208 AS SELECT pk, col0 FROM tab2 WHERE col0 = 59

statement ok
CREATE VIEW view_2_tab2_208 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 59)

statement ok
CREATE VIEW view_3_tab2_208 AS SELECT pk FROM view_1_tab2_208

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE col0 = 59
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_208
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 59 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_208 UNION ALL SELECT pk, col0 FROM view_2_tab2_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 59 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_208 UNION SELECT pk, col0 FROM view_2_tab2_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 59 ) AS tab2_208
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_208
----

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE col0 = 59
----

statement ok
DROP VIEW view_1_tab2_208

statement ok
DROP VIEW view_2_tab2_208

statement ok
DROP VIEW view_3_tab2_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_208') DROP VIEW view_1_tab3_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_208') DROP VIEW view_2_tab3_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_208') DROP VIEW view_3_tab3_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_208

statement ok
CREATE VIEW view_1_tab3_208 AS SELECT pk, col0 FROM tab3 WHERE col0 = 59

statement ok
CREATE VIEW view_2_tab3_208 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 59)

statement ok
CREATE VIEW view_3_tab3_208 AS SELECT pk FROM view_1_tab3_208

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE col0 = 59
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_208
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 59 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_208 UNION ALL SELECT pk, col0 FROM view_2_tab3_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 59 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_208 UNION SELECT pk, col0 FROM view_2_tab3_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 59 ) AS tab3_208
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_208
----

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE col0 = 59
----

statement ok
DROP VIEW view_1_tab3_208

statement ok
DROP VIEW view_2_tab3_208

statement ok
DROP VIEW view_3_tab3_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_208') DROP VIEW view_1_tab4_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_208') DROP VIEW view_2_tab4_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_208') DROP VIEW view_3_tab4_208

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_208

statement ok
CREATE VIEW view_1_tab4_208 AS SELECT pk, col0 FROM tab4 WHERE col0 = 59

statement ok
CREATE VIEW view_2_tab4_208 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 59)

statement ok
CREATE VIEW view_3_tab4_208 AS SELECT pk FROM view_1_tab4_208

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE col0 = 59
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_208
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 59 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_208 UNION ALL SELECT pk, col0 FROM view_2_tab4_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 59 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 59)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_208 UNION SELECT pk, col0 FROM view_2_tab4_208
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 59 ) AS tab4_208
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_208
----

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE col0 = 59
----

statement ok
DROP VIEW view_1_tab4_208

statement ok
DROP VIEW view_2_tab4_208

statement ok
DROP VIEW view_3_tab4_208

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_209') DROP VIEW view_1_tab0_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_209') DROP VIEW view_2_tab0_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_209') DROP VIEW view_3_tab0_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_209

statement ok
CREATE VIEW view_1_tab0_209 AS SELECT pk, col0 FROM tab0 WHERE col4 > 11.79

statement ok
CREATE VIEW view_2_tab0_209 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 11.79)

statement ok
CREATE VIEW view_3_tab0_209 AS SELECT pk FROM view_1_tab0_209

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE col4 > 11.79
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 11.79)
----
5
58
6
0

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_209
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_209
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 11.79 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_209 UNION ALL SELECT pk, col0 FROM view_2_tab0_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 11.79 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_209 UNION SELECT pk, col0 FROM view_2_tab0_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 11.79 ) AS tab0_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE col4 > 11.79
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab0_209

statement ok
DROP VIEW view_2_tab0_209

statement ok
DROP VIEW view_3_tab0_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_209') DROP VIEW view_1_tab1_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_209') DROP VIEW view_2_tab1_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_209') DROP VIEW view_3_tab1_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_209

statement ok
CREATE VIEW view_1_tab1_209 AS SELECT pk, col0 FROM tab1 WHERE col4 > 11.79

statement ok
CREATE VIEW view_2_tab1_209 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 11.79)

statement ok
CREATE VIEW view_3_tab1_209 AS SELECT pk FROM view_1_tab1_209

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE col4 > 11.79
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 11.79)
----
5
58
6
0

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_209
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_209
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 11.79 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_209 UNION ALL SELECT pk, col0 FROM view_2_tab1_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 11.79 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_209 UNION SELECT pk, col0 FROM view_2_tab1_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 11.79 ) AS tab1_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE col4 > 11.79
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab1_209

statement ok
DROP VIEW view_2_tab1_209

statement ok
DROP VIEW view_3_tab1_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_209') DROP VIEW view_1_tab2_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_209') DROP VIEW view_2_tab2_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_209') DROP VIEW view_3_tab2_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_209

statement ok
CREATE VIEW view_1_tab2_209 AS SELECT pk, col0 FROM tab2 WHERE col4 > 11.79

statement ok
CREATE VIEW view_2_tab2_209 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 11.79)

statement ok
CREATE VIEW view_3_tab2_209 AS SELECT pk FROM view_1_tab2_209

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE col4 > 11.79
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 11.79)
----
5
58
6
0

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_209
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_209
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 11.79 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_209 UNION ALL SELECT pk, col0 FROM view_2_tab2_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 11.79 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_209 UNION SELECT pk, col0 FROM view_2_tab2_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 11.79 ) AS tab2_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE col4 > 11.79
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab2_209

statement ok
DROP VIEW view_2_tab2_209

statement ok
DROP VIEW view_3_tab2_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_209') DROP VIEW view_1_tab3_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_209') DROP VIEW view_2_tab3_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_209') DROP VIEW view_3_tab3_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_209

statement ok
CREATE VIEW view_1_tab3_209 AS SELECT pk, col0 FROM tab3 WHERE col4 > 11.79

statement ok
CREATE VIEW view_2_tab3_209 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 11.79)

statement ok
CREATE VIEW view_3_tab3_209 AS SELECT pk FROM view_1_tab3_209

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE col4 > 11.79
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 11.79)
----
5
58
6
0

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_209
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_209
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 11.79 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_209 UNION ALL SELECT pk, col0 FROM view_2_tab3_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 11.79 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_209 UNION SELECT pk, col0 FROM view_2_tab3_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 11.79 ) AS tab3_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE col4 > 11.79
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab3_209

statement ok
DROP VIEW view_2_tab3_209

statement ok
DROP VIEW view_3_tab3_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_209') DROP VIEW view_1_tab4_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_209') DROP VIEW view_2_tab4_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_209') DROP VIEW view_3_tab4_209

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_209

statement ok
CREATE VIEW view_1_tab4_209 AS SELECT pk, col0 FROM tab4 WHERE col4 > 11.79

statement ok
CREATE VIEW view_2_tab4_209 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 11.79)

statement ok
CREATE VIEW view_3_tab4_209 AS SELECT pk FROM view_1_tab4_209

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE col4 > 11.79
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 11.79)
----
5
58
6
0

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_209
----
16 values hashing to 23beb95eeb41c96c19d6652ee7314433

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_209
----
5
58
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 11.79 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_209 UNION ALL SELECT pk, col0 FROM view_2_tab4_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 11.79 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 11.79)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_209 UNION SELECT pk, col0 FROM view_2_tab4_209
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 11.79 ) AS tab4_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_209
----
0
1
2
3
4
7
8
9

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE col4 > 11.79
----
0
1
2
3
4
7
8
9

statement ok
DROP VIEW view_1_tab4_209

statement ok
DROP VIEW view_2_tab4_209

statement ok
DROP VIEW view_3_tab4_209

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_210') DROP VIEW view_1_tab0_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_210') DROP VIEW view_2_tab0_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_210') DROP VIEW view_3_tab0_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_210

statement ok
CREATE VIEW view_1_tab0_210 AS SELECT pk, col0 FROM tab0 WHERE col0 > 3

statement ok
CREATE VIEW view_2_tab0_210 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 3)

statement ok
CREATE VIEW view_3_tab0_210 AS SELECT pk FROM view_1_tab0_210

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE col0 > 3
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 3)
----
6
0

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_210
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_210
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 3 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_210 UNION ALL SELECT pk, col0 FROM view_2_tab0_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 3 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_210 UNION SELECT pk, col0 FROM view_2_tab0_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 3 ) AS tab0_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE col0 > 3
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_210

statement ok
DROP VIEW view_2_tab0_210

statement ok
DROP VIEW view_3_tab0_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_210') DROP VIEW view_1_tab1_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_210') DROP VIEW view_2_tab1_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_210') DROP VIEW view_3_tab1_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_210

statement ok
CREATE VIEW view_1_tab1_210 AS SELECT pk, col0 FROM tab1 WHERE col0 > 3

statement ok
CREATE VIEW view_2_tab1_210 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 3)

statement ok
CREATE VIEW view_3_tab1_210 AS SELECT pk FROM view_1_tab1_210

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE col0 > 3
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 3)
----
6
0

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_210
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_210
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 3 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_210 UNION ALL SELECT pk, col0 FROM view_2_tab1_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 3 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_210 UNION SELECT pk, col0 FROM view_2_tab1_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 3 ) AS tab1_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE col0 > 3
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_210

statement ok
DROP VIEW view_2_tab1_210

statement ok
DROP VIEW view_3_tab1_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_210') DROP VIEW view_1_tab2_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_210') DROP VIEW view_2_tab2_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_210') DROP VIEW view_3_tab2_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_210

statement ok
CREATE VIEW view_1_tab2_210 AS SELECT pk, col0 FROM tab2 WHERE col0 > 3

statement ok
CREATE VIEW view_2_tab2_210 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 3)

statement ok
CREATE VIEW view_3_tab2_210 AS SELECT pk FROM view_1_tab2_210

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE col0 > 3
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 3)
----
6
0

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_210
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_210
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 3 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_210 UNION ALL SELECT pk, col0 FROM view_2_tab2_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 3 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_210 UNION SELECT pk, col0 FROM view_2_tab2_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 3 ) AS tab2_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE col0 > 3
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_210

statement ok
DROP VIEW view_2_tab2_210

statement ok
DROP VIEW view_3_tab2_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_210') DROP VIEW view_1_tab3_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_210') DROP VIEW view_2_tab3_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_210') DROP VIEW view_3_tab3_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_210

statement ok
CREATE VIEW view_1_tab3_210 AS SELECT pk, col0 FROM tab3 WHERE col0 > 3

statement ok
CREATE VIEW view_2_tab3_210 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 3)

statement ok
CREATE VIEW view_3_tab3_210 AS SELECT pk FROM view_1_tab3_210

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE col0 > 3
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 3)
----
6
0

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_210
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_210
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 3 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_210 UNION ALL SELECT pk, col0 FROM view_2_tab3_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 3 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_210 UNION SELECT pk, col0 FROM view_2_tab3_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 3 ) AS tab3_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE col0 > 3
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_210

statement ok
DROP VIEW view_2_tab3_210

statement ok
DROP VIEW view_3_tab3_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_210') DROP VIEW view_1_tab4_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_210') DROP VIEW view_2_tab4_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_210') DROP VIEW view_3_tab4_210

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_210

statement ok
CREATE VIEW view_1_tab4_210 AS SELECT pk, col0 FROM tab4 WHERE col0 > 3

statement ok
CREATE VIEW view_2_tab4_210 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 3)

statement ok
CREATE VIEW view_3_tab4_210 AS SELECT pk FROM view_1_tab4_210

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE col0 > 3
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 3)
----
6
0

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_210
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_210
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 3 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_210 UNION ALL SELECT pk, col0 FROM view_2_tab4_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 3 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 3)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_210 UNION SELECT pk, col0 FROM view_2_tab4_210
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 3 ) AS tab4_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_210
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE col0 > 3
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_210

statement ok
DROP VIEW view_2_tab4_210

statement ok
DROP VIEW view_3_tab4_210

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_211') DROP VIEW view_1_tab0_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_211') DROP VIEW view_2_tab0_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_211') DROP VIEW view_3_tab0_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_211

statement ok
CREATE VIEW view_1_tab0_211 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 44

statement ok
CREATE VIEW view_2_tab0_211 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 44)

statement ok
CREATE VIEW view_3_tab0_211 AS SELECT pk FROM view_1_tab0_211

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 44
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 44)
----
6
0

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_211
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_211
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 44 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_211 UNION ALL SELECT pk, col0 FROM view_2_tab0_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 44 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_211 UNION SELECT pk, col0 FROM view_2_tab0_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 44 ) AS tab0_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col3 >= 44
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_211

statement ok
DROP VIEW view_2_tab0_211

statement ok
DROP VIEW view_3_tab0_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_211') DROP VIEW view_1_tab1_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_211') DROP VIEW view_2_tab1_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_211') DROP VIEW view_3_tab1_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_211

statement ok
CREATE VIEW view_1_tab1_211 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 44

statement ok
CREATE VIEW view_2_tab1_211 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 44)

statement ok
CREATE VIEW view_3_tab1_211 AS SELECT pk FROM view_1_tab1_211

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 44
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 44)
----
6
0

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_211
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_211
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 44 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_211 UNION ALL SELECT pk, col0 FROM view_2_tab1_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 44 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_211 UNION SELECT pk, col0 FROM view_2_tab1_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 44 ) AS tab1_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col3 >= 44
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_211

statement ok
DROP VIEW view_2_tab1_211

statement ok
DROP VIEW view_3_tab1_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_211') DROP VIEW view_1_tab2_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_211') DROP VIEW view_2_tab2_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_211') DROP VIEW view_3_tab2_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_211

statement ok
CREATE VIEW view_1_tab2_211 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 44

statement ok
CREATE VIEW view_2_tab2_211 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 44)

statement ok
CREATE VIEW view_3_tab2_211 AS SELECT pk FROM view_1_tab2_211

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 44
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 44)
----
6
0

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_211
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_211
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 44 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_211 UNION ALL SELECT pk, col0 FROM view_2_tab2_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 44 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_211 UNION SELECT pk, col0 FROM view_2_tab2_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 44 ) AS tab2_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col3 >= 44
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_211

statement ok
DROP VIEW view_2_tab2_211

statement ok
DROP VIEW view_3_tab2_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_211') DROP VIEW view_1_tab3_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_211') DROP VIEW view_2_tab3_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_211') DROP VIEW view_3_tab3_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_211

statement ok
CREATE VIEW view_1_tab3_211 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 44

statement ok
CREATE VIEW view_2_tab3_211 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 44)

statement ok
CREATE VIEW view_3_tab3_211 AS SELECT pk FROM view_1_tab3_211

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 44
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 44)
----
6
0

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_211
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_211
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 44 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_211 UNION ALL SELECT pk, col0 FROM view_2_tab3_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 44 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_211 UNION SELECT pk, col0 FROM view_2_tab3_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 44 ) AS tab3_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col3 >= 44
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_211

statement ok
DROP VIEW view_2_tab3_211

statement ok
DROP VIEW view_3_tab3_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_211') DROP VIEW view_1_tab4_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_211') DROP VIEW view_2_tab4_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_211') DROP VIEW view_3_tab4_211

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_211

statement ok
CREATE VIEW view_1_tab4_211 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 44

statement ok
CREATE VIEW view_2_tab4_211 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 44)

statement ok
CREATE VIEW view_3_tab4_211 AS SELECT pk FROM view_1_tab4_211

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 44
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 44)
----
6
0

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_211
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_211
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 44 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_211 UNION ALL SELECT pk, col0 FROM view_2_tab4_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 44 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 44)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_211 UNION SELECT pk, col0 FROM view_2_tab4_211
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 44 ) AS tab4_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_211
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE col3 >= 44
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab4_211

statement ok
DROP VIEW view_2_tab4_211

statement ok
DROP VIEW view_3_tab4_211

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_212') DROP VIEW view_1_tab0_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_212') DROP VIEW view_2_tab0_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_212') DROP VIEW view_3_tab0_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_212

statement ok
CREATE VIEW view_1_tab0_212 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 9)

statement ok
CREATE VIEW view_2_tab0_212 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 9))

statement ok
CREATE VIEW view_3_tab0_212 AS SELECT pk FROM view_1_tab0_212

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 9)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 9))
----

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_212
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 9) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_212 UNION ALL SELECT pk, col0 FROM view_2_tab0_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 9) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_212 UNION SELECT pk, col0 FROM view_2_tab0_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 9) ) AS tab0_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE (col3 > 9)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_212

statement ok
DROP VIEW view_2_tab0_212

statement ok
DROP VIEW view_3_tab0_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_212') DROP VIEW view_1_tab1_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_212') DROP VIEW view_2_tab1_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_212') DROP VIEW view_3_tab1_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_212

statement ok
CREATE VIEW view_1_tab1_212 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 9)

statement ok
CREATE VIEW view_2_tab1_212 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 9))

statement ok
CREATE VIEW view_3_tab1_212 AS SELECT pk FROM view_1_tab1_212

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 9)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 9))
----

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_212
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 9) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_212 UNION ALL SELECT pk, col0 FROM view_2_tab1_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 9) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_212 UNION SELECT pk, col0 FROM view_2_tab1_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 9) ) AS tab1_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE (col3 > 9)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_212

statement ok
DROP VIEW view_2_tab1_212

statement ok
DROP VIEW view_3_tab1_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_212') DROP VIEW view_1_tab2_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_212') DROP VIEW view_2_tab2_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_212') DROP VIEW view_3_tab2_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_212

statement ok
CREATE VIEW view_1_tab2_212 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 9)

statement ok
CREATE VIEW view_2_tab2_212 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 9))

statement ok
CREATE VIEW view_3_tab2_212 AS SELECT pk FROM view_1_tab2_212

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 9)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 9))
----

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_212
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 9) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_212 UNION ALL SELECT pk, col0 FROM view_2_tab2_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 9) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_212 UNION SELECT pk, col0 FROM view_2_tab2_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 9) ) AS tab2_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE (col3 > 9)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_212

statement ok
DROP VIEW view_2_tab2_212

statement ok
DROP VIEW view_3_tab2_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_212') DROP VIEW view_1_tab3_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_212') DROP VIEW view_2_tab3_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_212') DROP VIEW view_3_tab3_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_212

statement ok
CREATE VIEW view_1_tab3_212 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 9)

statement ok
CREATE VIEW view_2_tab3_212 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 9))

statement ok
CREATE VIEW view_3_tab3_212 AS SELECT pk FROM view_1_tab3_212

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 9)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 9))
----

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_212
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 9) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_212 UNION ALL SELECT pk, col0 FROM view_2_tab3_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 9) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_212 UNION SELECT pk, col0 FROM view_2_tab3_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 9) ) AS tab3_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE (col3 > 9)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_212

statement ok
DROP VIEW view_2_tab3_212

statement ok
DROP VIEW view_3_tab3_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_212') DROP VIEW view_1_tab4_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_212') DROP VIEW view_2_tab4_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_212') DROP VIEW view_3_tab4_212

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_212

statement ok
CREATE VIEW view_1_tab4_212 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 9)

statement ok
CREATE VIEW view_2_tab4_212 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 9))

statement ok
CREATE VIEW view_3_tab4_212 AS SELECT pk FROM view_1_tab4_212

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 9)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 9))
----

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_212
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 9) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_212 UNION ALL SELECT pk, col0 FROM view_2_tab4_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 9) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 9))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_212 UNION SELECT pk, col0 FROM view_2_tab4_212
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 9) ) AS tab4_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_212
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE (col3 > 9)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_212

statement ok
DROP VIEW view_2_tab4_212

statement ok
DROP VIEW view_3_tab4_212

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_213') DROP VIEW view_1_tab0_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_213') DROP VIEW view_2_tab0_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_213') DROP VIEW view_3_tab0_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_213

statement ok
CREATE VIEW view_1_tab0_213 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 7)

statement ok
CREATE VIEW view_2_tab0_213 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 7))

statement ok
CREATE VIEW view_3_tab0_213 AS SELECT pk FROM view_1_tab0_213

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 7)
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 7))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_213
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_213
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 7) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_213 UNION ALL SELECT pk, col0 FROM view_2_tab0_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 7) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_213 UNION SELECT pk, col0 FROM view_2_tab0_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 7) ) AS tab0_213
----
6

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_213
----
6

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE (col0 < 7)
----
6

statement ok
DROP VIEW view_1_tab0_213

statement ok
DROP VIEW view_2_tab0_213

statement ok
DROP VIEW view_3_tab0_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_213') DROP VIEW view_1_tab1_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_213') DROP VIEW view_2_tab1_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_213') DROP VIEW view_3_tab1_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_213

statement ok
CREATE VIEW view_1_tab1_213 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 7)

statement ok
CREATE VIEW view_2_tab1_213 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 7))

statement ok
CREATE VIEW view_3_tab1_213 AS SELECT pk FROM view_1_tab1_213

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 7)
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 7))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_213
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_213
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 7) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_213 UNION ALL SELECT pk, col0 FROM view_2_tab1_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 7) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_213 UNION SELECT pk, col0 FROM view_2_tab1_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 7) ) AS tab1_213
----
6

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_213
----
6

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE (col0 < 7)
----
6

statement ok
DROP VIEW view_1_tab1_213

statement ok
DROP VIEW view_2_tab1_213

statement ok
DROP VIEW view_3_tab1_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_213') DROP VIEW view_1_tab2_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_213') DROP VIEW view_2_tab2_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_213') DROP VIEW view_3_tab2_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_213

statement ok
CREATE VIEW view_1_tab2_213 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 7)

statement ok
CREATE VIEW view_2_tab2_213 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 7))

statement ok
CREATE VIEW view_3_tab2_213 AS SELECT pk FROM view_1_tab2_213

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 7)
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 7))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_213
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_213
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 7) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_213 UNION ALL SELECT pk, col0 FROM view_2_tab2_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 7) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_213 UNION SELECT pk, col0 FROM view_2_tab2_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 7) ) AS tab2_213
----
6

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_213
----
6

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE (col0 < 7)
----
6

statement ok
DROP VIEW view_1_tab2_213

statement ok
DROP VIEW view_2_tab2_213

statement ok
DROP VIEW view_3_tab2_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_213') DROP VIEW view_1_tab3_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_213') DROP VIEW view_2_tab3_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_213') DROP VIEW view_3_tab3_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_213

statement ok
CREATE VIEW view_1_tab3_213 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 7)

statement ok
CREATE VIEW view_2_tab3_213 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 7))

statement ok
CREATE VIEW view_3_tab3_213 AS SELECT pk FROM view_1_tab3_213

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 7)
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 7))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_213
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_213
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 7) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_213 UNION ALL SELECT pk, col0 FROM view_2_tab3_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 7) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_213 UNION SELECT pk, col0 FROM view_2_tab3_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 7) ) AS tab3_213
----
6

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_213
----
6

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE (col0 < 7)
----
6

statement ok
DROP VIEW view_1_tab3_213

statement ok
DROP VIEW view_2_tab3_213

statement ok
DROP VIEW view_3_tab3_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_213') DROP VIEW view_1_tab4_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_213') DROP VIEW view_2_tab4_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_213') DROP VIEW view_3_tab4_213

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_213

statement ok
CREATE VIEW view_1_tab4_213 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 7)

statement ok
CREATE VIEW view_2_tab4_213 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 7))

statement ok
CREATE VIEW view_3_tab4_213 AS SELECT pk FROM view_1_tab4_213

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 7)
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 7))
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_213
----
6
0

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_213
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 7) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_213 UNION ALL SELECT pk, col0 FROM view_2_tab4_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 7) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 7))
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_213 UNION SELECT pk, col0 FROM view_2_tab4_213
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 7) ) AS tab4_213
----
6

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_213
----
6

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE (col0 < 7)
----
6

statement ok
DROP VIEW view_1_tab4_213

statement ok
DROP VIEW view_2_tab4_213

statement ok
DROP VIEW view_3_tab4_213

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_214') DROP VIEW view_1_tab0_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_214') DROP VIEW view_2_tab0_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_214') DROP VIEW view_3_tab0_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_214

statement ok
CREATE VIEW view_1_tab0_214 AS SELECT pk, col0 FROM tab0 WHERE col0 > 18

statement ok
CREATE VIEW view_2_tab0_214 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18)

statement ok
CREATE VIEW view_3_tab0_214 AS SELECT pk FROM view_1_tab0_214

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE col0 > 18
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18)
----
6
0

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_214
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_214
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 18 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_214 UNION ALL SELECT pk, col0 FROM view_2_tab0_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 18 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_214 UNION SELECT pk, col0 FROM view_2_tab0_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 18 ) AS tab0_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE col0 > 18
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab0_214

statement ok
DROP VIEW view_2_tab0_214

statement ok
DROP VIEW view_3_tab0_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_214') DROP VIEW view_1_tab1_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_214') DROP VIEW view_2_tab1_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_214') DROP VIEW view_3_tab1_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_214

statement ok
CREATE VIEW view_1_tab1_214 AS SELECT pk, col0 FROM tab1 WHERE col0 > 18

statement ok
CREATE VIEW view_2_tab1_214 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18)

statement ok
CREATE VIEW view_3_tab1_214 AS SELECT pk FROM view_1_tab1_214

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE col0 > 18
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18)
----
6
0

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_214
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_214
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 18 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_214 UNION ALL SELECT pk, col0 FROM view_2_tab1_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 18 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_214 UNION SELECT pk, col0 FROM view_2_tab1_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 18 ) AS tab1_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE col0 > 18
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab1_214

statement ok
DROP VIEW view_2_tab1_214

statement ok
DROP VIEW view_3_tab1_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_214') DROP VIEW view_1_tab2_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_214') DROP VIEW view_2_tab2_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_214') DROP VIEW view_3_tab2_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_214

statement ok
CREATE VIEW view_1_tab2_214 AS SELECT pk, col0 FROM tab2 WHERE col0 > 18

statement ok
CREATE VIEW view_2_tab2_214 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18)

statement ok
CREATE VIEW view_3_tab2_214 AS SELECT pk FROM view_1_tab2_214

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE col0 > 18
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18)
----
6
0

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_214
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_214
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 18 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_214 UNION ALL SELECT pk, col0 FROM view_2_tab2_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 18 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_214 UNION SELECT pk, col0 FROM view_2_tab2_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 18 ) AS tab2_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE col0 > 18
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab2_214

statement ok
DROP VIEW view_2_tab2_214

statement ok
DROP VIEW view_3_tab2_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_214') DROP VIEW view_1_tab3_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_214') DROP VIEW view_2_tab3_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_214') DROP VIEW view_3_tab3_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_214

statement ok
CREATE VIEW view_1_tab3_214 AS SELECT pk, col0 FROM tab3 WHERE col0 > 18

statement ok
CREATE VIEW view_2_tab3_214 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18)

statement ok
CREATE VIEW view_3_tab3_214 AS SELECT pk FROM view_1_tab3_214

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE col0 > 18
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18)
----
6
0

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_214
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_214
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 18 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_214 UNION ALL SELECT pk, col0 FROM view_2_tab3_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 18 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_214 UNION SELECT pk, col0 FROM view_2_tab3_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 18 ) AS tab3_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_214
----
9 values hashing to b62312116f93d37c7a952ee38494f224

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE col0 > 18
----
9 values hashing to b62312116f93d37c7a952ee38494f224

statement ok
DROP VIEW view_1_tab3_214

statement ok
DROP VIEW view_2_tab3_214

statement ok
DROP VIEW view_3_tab3_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_214') DROP VIEW view_1_tab4_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_214') DROP VIEW view_2_tab4_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_214

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_214') DROP VIEW view_3_tab4_214

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_214

statement ok
CREATE VIEW view_1_tab4_214 AS SELECT pk, col0 FROM tab4 WHERE col0 > 18

statement ok
CREATE VIEW view_2_tab4_214 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18)

statement ok
CREATE VIEW view_3_tab4_214 AS SELECT pk FROM view_1_tab4_214

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE col0 > 18
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18)
----
6
0

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_214
----
18 values hashing to 1cf5e33842cb88de423f90bc8276641d

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_214
----
6
0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 18 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18)
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_214 UNION ALL SELECT pk, col0 FROM view_2_tab4_214
----
20 values hashing to 7aa228701de8d21263c44e160305731d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 &g