sqllogictest
Artifact Content
Not logged in

Artifact 76a890706adf97fa4e99ab9fecfbe53f6604e2f5:


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,37,39.66,'qojdn',22,35.57,'nzxce')

statement ok
INSERT INTO tab0 VALUES(1,65,75.70,'ujwzj',88,3.57,'hucvw')

statement ok
INSERT INTO tab0 VALUES(2,66,6.7,'ysquj',36,6.58,'iizhx')

statement ok
INSERT INTO tab0 VALUES(3,6,22.32,'ppzju',84,83.73,'kvifx')

statement ok
INSERT INTO tab0 VALUES(4,18,13.6,'brotf',47,75.3,'rjbjh')

statement ok
INSERT INTO tab0 VALUES(5,67,78.62,'pthtv',3,42.99,'tqtbp')

statement ok
INSERT INTO tab0 VALUES(6,7,38.59,'lkrtf',53,73.25,'wliaj')

statement ok
INSERT INTO tab0 VALUES(7,52,51.55,'dvvdu',83,95.19,'ahpvq')

statement ok
INSERT INTO tab0 VALUES(8,29,23.61,'kcqbu',30,96.59,'cecpq')

statement ok
INSERT INTO tab0 VALUES(9,46,19.9,'newzk',39,22.19,'yaiog')

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

statement ok
CREATE INDEX idx_tab1_0 on tab1 (col0)

statement ok
CREATE INDEX idx_tab1_1 on tab1 (col1)

statement ok
CREATE INDEX idx_tab1_3 on tab1 (col3)

statement ok
CREATE INDEX idx_tab1_4 on tab1 (col4)

statement ok
INSERT INTO tab1 SELECT * FROM tab0

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

statement ok
CREATE INDEX idx_tab2_0 ON tab2 (col4,col1)

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

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

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

statement ok
INSERT INTO tab2 SELECT * FROM tab0

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

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

statement ok
CREATE INDEX idx_tab3_1 ON tab3 (col4 DESC)

statement ok
CREATE INDEX idx_tab3_3 ON tab3 (col1 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab3_5 ON tab3 (col3 DESC)

statement ok
INSERT INTO tab3 SELECT * FROM tab0

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

statement ok
CREATE INDEX idx_tab4_0 ON tab4 (col3)

statement ok
CREATE INDEX idx_tab4_1 ON tab4 (col4 DESC,col0 DESC)

statement ok
CREATE INDEX idx_tab4_2 ON tab4 (col0)

statement ok
INSERT INTO tab4 SELECT * FROM tab0

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_444 AS SELECT pk, col0 FROM tab0 WHERE (col1 < 55.67)

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

statement ok
CREATE VIEW view_3_tab0_444 AS SELECT pk FROM view_1_tab0_444

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE (col1 < 55.67)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 55.67))
----
1
65
5
67

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_444
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_444
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_444 UNION ALL SELECT pk, col0 FROM view_2_tab0_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_444 UNION SELECT pk, col0 FROM view_2_tab0_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 < 55.67) ) AS tab0_444
----
0
2
3
4
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE (col1 < 55.67)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab0_444

statement ok
DROP VIEW view_2_tab0_444

statement ok
DROP VIEW view_3_tab0_444

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_444 AS SELECT pk, col0 FROM tab1 WHERE (col1 < 55.67)

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

statement ok
CREATE VIEW view_3_tab1_444 AS SELECT pk FROM view_1_tab1_444

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE (col1 < 55.67)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 55.67))
----
1
65
5
67

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_444
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_444
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_444 UNION ALL SELECT pk, col0 FROM view_2_tab1_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_444 UNION SELECT pk, col0 FROM view_2_tab1_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 < 55.67) ) AS tab1_444
----
0
2
3
4
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE (col1 < 55.67)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab1_444

statement ok
DROP VIEW view_2_tab1_444

statement ok
DROP VIEW view_3_tab1_444

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_444 AS SELECT pk, col0 FROM tab2 WHERE (col1 < 55.67)

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

statement ok
CREATE VIEW view_3_tab2_444 AS SELECT pk FROM view_1_tab2_444

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE (col1 < 55.67)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 55.67))
----
1
65
5
67

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_444
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_444
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_444 UNION ALL SELECT pk, col0 FROM view_2_tab2_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_444 UNION SELECT pk, col0 FROM view_2_tab2_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 < 55.67) ) AS tab2_444
----
0
2
3
4
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE (col1 < 55.67)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab2_444

statement ok
DROP VIEW view_2_tab2_444

statement ok
DROP VIEW view_3_tab2_444

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_444 AS SELECT pk, col0 FROM tab3 WHERE (col1 < 55.67)

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

statement ok
CREATE VIEW view_3_tab3_444 AS SELECT pk FROM view_1_tab3_444

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE (col1 < 55.67)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 55.67))
----
1
65
5
67

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_444
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_444
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_444 UNION ALL SELECT pk, col0 FROM view_2_tab3_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_444 UNION SELECT pk, col0 FROM view_2_tab3_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 < 55.67) ) AS tab3_444
----
0
2
3
4
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE (col1 < 55.67)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab3_444

statement ok
DROP VIEW view_2_tab3_444

statement ok
DROP VIEW view_3_tab3_444

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_444 AS SELECT pk, col0 FROM tab4 WHERE (col1 < 55.67)

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

statement ok
CREATE VIEW view_3_tab4_444 AS SELECT pk FROM view_1_tab4_444

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE (col1 < 55.67)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 55.67))
----
1
65
5
67

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_444
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_444
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_444 UNION ALL SELECT pk, col0 FROM view_2_tab4_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_444 UNION SELECT pk, col0 FROM view_2_tab4_444
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 < 55.67) ) AS tab4_444
----
0
2
3
4
6
7
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE (col1 < 55.67)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab4_444

statement ok
DROP VIEW view_2_tab4_444

statement ok
DROP VIEW view_3_tab4_444

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_445 AS SELECT pk, col0 FROM tab0 WHERE col0 = 94

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

statement ok
CREATE VIEW view_3_tab0_445 AS SELECT pk FROM view_1_tab0_445

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE col0 = 94
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 94)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_445 UNION ALL SELECT pk, col0 FROM view_2_tab0_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_445 UNION SELECT pk, col0 FROM view_2_tab0_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 94 ) AS tab0_445
----

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

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col0 = 94
----

statement ok
DROP VIEW view_1_tab0_445

statement ok
DROP VIEW view_2_tab0_445

statement ok
DROP VIEW view_3_tab0_445

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_445 AS SELECT pk, col0 FROM tab1 WHERE col0 = 94

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

statement ok
CREATE VIEW view_3_tab1_445 AS SELECT pk FROM view_1_tab1_445

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE col0 = 94
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 94)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_445 UNION ALL SELECT pk, col0 FROM view_2_tab1_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_445 UNION SELECT pk, col0 FROM view_2_tab1_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 94 ) AS tab1_445
----

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

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col0 = 94
----

statement ok
DROP VIEW view_1_tab1_445

statement ok
DROP VIEW view_2_tab1_445

statement ok
DROP VIEW view_3_tab1_445

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_445 AS SELECT pk, col0 FROM tab2 WHERE col0 = 94

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

statement ok
CREATE VIEW view_3_tab2_445 AS SELECT pk FROM view_1_tab2_445

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE col0 = 94
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 94)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_445 UNION ALL SELECT pk, col0 FROM view_2_tab2_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_445 UNION SELECT pk, col0 FROM view_2_tab2_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 94 ) AS tab2_445
----

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

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col0 = 94
----

statement ok
DROP VIEW view_1_tab2_445

statement ok
DROP VIEW view_2_tab2_445

statement ok
DROP VIEW view_3_tab2_445

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_445 AS SELECT pk, col0 FROM tab3 WHERE col0 = 94

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

statement ok
CREATE VIEW view_3_tab3_445 AS SELECT pk FROM view_1_tab3_445

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE col0 = 94
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 94)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_445 UNION ALL SELECT pk, col0 FROM view_2_tab3_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_445 UNION SELECT pk, col0 FROM view_2_tab3_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 94 ) AS tab3_445
----

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

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col0 = 94
----

statement ok
DROP VIEW view_1_tab3_445

statement ok
DROP VIEW view_2_tab3_445

statement ok
DROP VIEW view_3_tab3_445

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_445 AS SELECT pk, col0 FROM tab4 WHERE col0 = 94

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

statement ok
CREATE VIEW view_3_tab4_445 AS SELECT pk FROM view_1_tab4_445

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE col0 = 94
----

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 94)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_445 UNION ALL SELECT pk, col0 FROM view_2_tab4_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_445 UNION SELECT pk, col0 FROM view_2_tab4_445
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 94 ) AS tab4_445
----

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

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col0 = 94
----

statement ok
DROP VIEW view_1_tab4_445

statement ok
DROP VIEW view_2_tab4_445

statement ok
DROP VIEW view_3_tab4_445

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_446 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17

statement ok
CREATE VIEW view_2_tab0_446 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)

statement ok
CREATE VIEW view_3_tab0_446 AS SELECT pk FROM view_1_tab0_446

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
1
65

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_446
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_446
----
1
65

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_446 UNION ALL SELECT pk, col0 FROM view_2_tab0_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_446 UNION SELECT pk, col0 FROM view_2_tab0_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 ) AS tab0_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT * FROM view_3_tab0_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

statement ok
DROP VIEW view_1_tab0_446

statement ok
DROP VIEW view_2_tab0_446

statement ok
DROP VIEW view_3_tab0_446

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_446 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17

statement ok
CREATE VIEW view_2_tab1_446 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)

statement ok
CREATE VIEW view_3_tab1_446 AS SELECT pk FROM view_1_tab1_446

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
1
65

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_446
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_446
----
1
65

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_446 UNION ALL SELECT pk, col0 FROM view_2_tab1_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_446 UNION SELECT pk, col0 FROM view_2_tab1_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 ) AS tab1_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT * FROM view_3_tab1_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

statement ok
DROP VIEW view_1_tab1_446

statement ok
DROP VIEW view_2_tab1_446

statement ok
DROP VIEW view_3_tab1_446

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_446 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17

statement ok
CREATE VIEW view_2_tab2_446 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)

statement ok
CREATE VIEW view_3_tab2_446 AS SELECT pk FROM view_1_tab2_446

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
1
65

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_446
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_446
----
1
65

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_446 UNION ALL SELECT pk, col0 FROM view_2_tab2_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_446 UNION SELECT pk, col0 FROM view_2_tab2_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 ) AS tab2_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT * FROM view_3_tab2_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

statement ok
DROP VIEW view_1_tab2_446

statement ok
DROP VIEW view_2_tab2_446

statement ok
DROP VIEW view_3_tab2_446

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_446 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17

statement ok
CREATE VIEW view_2_tab3_446 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)

statement ok
CREATE VIEW view_3_tab3_446 AS SELECT pk FROM view_1_tab3_446

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
1
65

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_446
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_446
----
1
65

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_446 UNION ALL SELECT pk, col0 FROM view_2_tab3_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_446 UNION SELECT pk, col0 FROM view_2_tab3_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 ) AS tab3_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT * FROM view_3_tab3_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

statement ok
DROP VIEW view_1_tab3_446

statement ok
DROP VIEW view_2_tab3_446

statement ok
DROP VIEW view_3_tab3_446

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_446 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17

statement ok
CREATE VIEW view_2_tab4_446 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)

statement ok
CREATE VIEW view_3_tab4_446 AS SELECT pk FROM view_1_tab4_446

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
1
65

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_446
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_446
----
1
65

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_446 UNION ALL SELECT pk, col0 FROM view_2_tab4_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_446 UNION SELECT pk, col0 FROM view_2_tab4_446
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17 ) AS tab4_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT * FROM view_3_tab4_446
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE (col3 >= 85) AND (col1 < 55.36) OR (col1 IN (91.93,48.61,57.4,26.33,57.8,94.13)) AND col1 >= 80.99 AND col0 < 41 OR ((col0 IN (56,73,62,63,40) OR col1 <= 61.7)) OR (col3 <= 57) AND col4 IS NULL AND col4 > 98.78 OR col3 <= 17
----
9 values hashing to a09f741e1007d9cc99c658732e945c31

statement ok
DROP VIEW view_1_tab4_446

statement ok
DROP VIEW view_2_tab4_446

statement ok
DROP VIEW view_3_tab4_446

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_447 AS SELECT pk, col0 FROM tab0 WHERE ((col1 <= 24.59 AND col3 > 61))

statement ok
CREATE VIEW view_2_tab0_447 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))

statement ok
CREATE VIEW view_3_tab0_447 AS SELECT pk FROM view_1_tab0_447

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_447
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_447
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_447 UNION ALL SELECT pk, col0 FROM view_2_tab0_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_447 UNION SELECT pk, col0 FROM view_2_tab0_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 <= 24.59 AND col3 > 61)) ) AS tab0_447
----
3

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

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3

statement ok
DROP VIEW view_1_tab0_447

statement ok
DROP VIEW view_2_tab0_447

statement ok
DROP VIEW view_3_tab0_447

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_447 AS SELECT pk, col0 FROM tab1 WHERE ((col1 <= 24.59 AND col3 > 61))

statement ok
CREATE VIEW view_2_tab1_447 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))

statement ok
CREATE VIEW view_3_tab1_447 AS SELECT pk FROM view_1_tab1_447

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_447
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_447
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_447 UNION ALL SELECT pk, col0 FROM view_2_tab1_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_447 UNION SELECT pk, col0 FROM view_2_tab1_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 <= 24.59 AND col3 > 61)) ) AS tab1_447
----
3

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

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3

statement ok
DROP VIEW view_1_tab1_447

statement ok
DROP VIEW view_2_tab1_447

statement ok
DROP VIEW view_3_tab1_447

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_447 AS SELECT pk, col0 FROM tab2 WHERE ((col1 <= 24.59 AND col3 > 61))

statement ok
CREATE VIEW view_2_tab2_447 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))

statement ok
CREATE VIEW view_3_tab2_447 AS SELECT pk FROM view_1_tab2_447

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_447
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_447
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_447 UNION ALL SELECT pk, col0 FROM view_2_tab2_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_447 UNION SELECT pk, col0 FROM view_2_tab2_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 <= 24.59 AND col3 > 61)) ) AS tab2_447
----
3

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

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3

statement ok
DROP VIEW view_1_tab2_447

statement ok
DROP VIEW view_2_tab2_447

statement ok
DROP VIEW view_3_tab2_447

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_447 AS SELECT pk, col0 FROM tab3 WHERE ((col1 <= 24.59 AND col3 > 61))

statement ok
CREATE VIEW view_2_tab3_447 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))

statement ok
CREATE VIEW view_3_tab3_447 AS SELECT pk FROM view_1_tab3_447

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_447
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_447
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_447 UNION ALL SELECT pk, col0 FROM view_2_tab3_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_447 UNION SELECT pk, col0 FROM view_2_tab3_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 <= 24.59 AND col3 > 61)) ) AS tab3_447
----
3

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

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3

statement ok
DROP VIEW view_1_tab3_447

statement ok
DROP VIEW view_2_tab3_447

statement ok
DROP VIEW view_3_tab3_447

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_447 AS SELECT pk, col0 FROM tab4 WHERE ((col1 <= 24.59 AND col3 > 61))

statement ok
CREATE VIEW view_2_tab4_447 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))

statement ok
CREATE VIEW view_3_tab4_447 AS SELECT pk FROM view_1_tab4_447

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_447
----
3
6

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_447
----
18 values hashing to 74f96999fa45e143f2b62695669e20ba

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_447 UNION ALL SELECT pk, col0 FROM view_2_tab4_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 24.59 AND col3 > 61)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 24.59 AND col3 > 61)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_447 UNION SELECT pk, col0 FROM view_2_tab4_447
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 <= 24.59 AND col3 > 61)) ) AS tab4_447
----
3

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

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE ((col1 <= 24.59 AND col3 > 61))
----
3

statement ok
DROP VIEW view_1_tab4_447

statement ok
DROP VIEW view_2_tab4_447

statement ok
DROP VIEW view_3_tab4_447

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_448 AS SELECT pk, col0 FROM tab0 WHERE ((col1 <= 25.93))

statement ok
CREATE VIEW view_2_tab0_448 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 25.93)))

statement ok
CREATE VIEW view_3_tab0_448 AS SELECT pk FROM view_1_tab0_448

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE ((col1 <= 25.93))
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 <= 25.93)))
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_448
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_448
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_448 UNION ALL SELECT pk, col0 FROM view_2_tab0_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_448 UNION SELECT pk, col0 FROM view_2_tab0_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 <= 25.93)) ) AS tab0_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab0_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE ((col1 <= 25.93))
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab0_448

statement ok
DROP VIEW view_2_tab0_448

statement ok
DROP VIEW view_3_tab0_448

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_448 AS SELECT pk, col0 FROM tab1 WHERE ((col1 <= 25.93))

statement ok
CREATE VIEW view_2_tab1_448 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 25.93)))

statement ok
CREATE VIEW view_3_tab1_448 AS SELECT pk FROM view_1_tab1_448

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE ((col1 <= 25.93))
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 <= 25.93)))
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_448
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_448
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_448 UNION ALL SELECT pk, col0 FROM view_2_tab1_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_448 UNION SELECT pk, col0 FROM view_2_tab1_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 <= 25.93)) ) AS tab1_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab1_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE ((col1 <= 25.93))
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab1_448

statement ok
DROP VIEW view_2_tab1_448

statement ok
DROP VIEW view_3_tab1_448

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_448 AS SELECT pk, col0 FROM tab2 WHERE ((col1 <= 25.93))

statement ok
CREATE VIEW view_2_tab2_448 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 25.93)))

statement ok
CREATE VIEW view_3_tab2_448 AS SELECT pk FROM view_1_tab2_448

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE ((col1 <= 25.93))
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 <= 25.93)))
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_448
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_448
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_448 UNION ALL SELECT pk, col0 FROM view_2_tab2_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_448 UNION SELECT pk, col0 FROM view_2_tab2_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 <= 25.93)) ) AS tab2_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab2_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE ((col1 <= 25.93))
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab2_448

statement ok
DROP VIEW view_2_tab2_448

statement ok
DROP VIEW view_3_tab2_448

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_448 AS SELECT pk, col0 FROM tab3 WHERE ((col1 <= 25.93))

statement ok
CREATE VIEW view_2_tab3_448 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 25.93)))

statement ok
CREATE VIEW view_3_tab3_448 AS SELECT pk FROM view_1_tab3_448

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE ((col1 <= 25.93))
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 <= 25.93)))
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_448
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_448
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_448 UNION ALL SELECT pk, col0 FROM view_2_tab3_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_448 UNION SELECT pk, col0 FROM view_2_tab3_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 <= 25.93)) ) AS tab3_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab3_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE ((col1 <= 25.93))
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab3_448

statement ok
DROP VIEW view_2_tab3_448

statement ok
DROP VIEW view_3_tab3_448

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_448 AS SELECT pk, col0 FROM tab4 WHERE ((col1 <= 25.93))

statement ok
CREATE VIEW view_2_tab4_448 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 25.93)))

statement ok
CREATE VIEW view_3_tab4_448 AS SELECT pk FROM view_1_tab4_448

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE ((col1 <= 25.93))
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 <= 25.93)))
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_448
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_448
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_448 UNION ALL SELECT pk, col0 FROM view_2_tab4_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_448 UNION SELECT pk, col0 FROM view_2_tab4_448
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 <= 25.93)) ) AS tab4_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab4_448
----
2
3
4
8
9

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE ((col1 <= 25.93))
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab4_448

statement ok
DROP VIEW view_2_tab4_448

statement ok
DROP VIEW view_3_tab4_448

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_449 AS SELECT pk, col0 FROM tab0 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))

statement ok
CREATE VIEW view_2_tab0_449 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))

statement ok
CREATE VIEW view_3_tab0_449 AS SELECT pk FROM view_1_tab0_449

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
2
66
8
29

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_449
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_449
----
2
66
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_449 UNION ALL SELECT pk, col0 FROM view_2_tab0_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_449 UNION SELECT pk, col0 FROM view_2_tab0_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) ) AS tab0_449
----
0
1
3
4
5
6
7
9

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

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
0
1
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab0_449

statement ok
DROP VIEW view_2_tab0_449

statement ok
DROP VIEW view_3_tab0_449

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_449 AS SELECT pk, col0 FROM tab1 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))

statement ok
CREATE VIEW view_2_tab1_449 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))

statement ok
CREATE VIEW view_3_tab1_449 AS SELECT pk FROM view_1_tab1_449

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
2
66
8
29

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_449
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_449
----
2
66
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_449 UNION ALL SELECT pk, col0 FROM view_2_tab1_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_449 UNION SELECT pk, col0 FROM view_2_tab1_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) ) AS tab1_449
----
0
1
3
4
5
6
7
9

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

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
0
1
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab1_449

statement ok
DROP VIEW view_2_tab1_449

statement ok
DROP VIEW view_3_tab1_449

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_449 AS SELECT pk, col0 FROM tab2 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))

statement ok
CREATE VIEW view_2_tab2_449 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))

statement ok
CREATE VIEW view_3_tab2_449 AS SELECT pk FROM view_1_tab2_449

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
2
66
8
29

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_449
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_449
----
2
66
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_449 UNION ALL SELECT pk, col0 FROM view_2_tab2_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_449 UNION SELECT pk, col0 FROM view_2_tab2_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) ) AS tab2_449
----
0
1
3
4
5
6
7
9

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

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
0
1
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab2_449

statement ok
DROP VIEW view_2_tab2_449

statement ok
DROP VIEW view_3_tab2_449

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_449 AS SELECT pk, col0 FROM tab3 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))

statement ok
CREATE VIEW view_2_tab3_449 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))

statement ok
CREATE VIEW view_3_tab3_449 AS SELECT pk FROM view_1_tab3_449

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
2
66
8
29

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_449
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_449
----
2
66
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_449 UNION ALL SELECT pk, col0 FROM view_2_tab3_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_449 UNION SELECT pk, col0 FROM view_2_tab3_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) ) AS tab3_449
----
0
1
3
4
5
6
7
9

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

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
0
1
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab3_449

statement ok
DROP VIEW view_2_tab3_449

statement ok
DROP VIEW view_3_tab3_449

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_449 AS SELECT pk, col0 FROM tab4 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))

statement ok
CREATE VIEW view_2_tab4_449 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))

statement ok
CREATE VIEW view_3_tab4_449 AS SELECT pk FROM view_1_tab4_449

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
2
66
8
29

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_449
----
16 values hashing to 8d34815ed83f00ee67716c4c1700f9e8

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_449
----
2
66
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_449 UNION ALL SELECT pk, col0 FROM view_2_tab4_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_449 UNION SELECT pk, col0 FROM view_2_tab4_449
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16)) ) AS tab4_449
----
0
1
3
4
5
6
7
9

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

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col1 >= 27.83 OR col0 IS NULL OR ((col3 >= 37)) AND ((col0 < 67 OR col3 > 16))
----
0
1
3
4
5
6
7
9

statement ok
DROP VIEW view_1_tab4_449

statement ok
DROP VIEW view_2_tab4_449

statement ok
DROP VIEW view_3_tab4_449

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_450 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)

statement ok
CREATE VIEW view_2_tab0_450 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))

statement ok
CREATE VIEW view_3_tab0_450 AS SELECT pk FROM view_1_tab0_450

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_450 UNION ALL SELECT pk, col0 FROM view_2_tab0_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_450 UNION SELECT pk, col0 FROM view_2_tab0_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) ) AS tab0_450
----

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

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab0_450

statement ok
DROP VIEW view_2_tab0_450

statement ok
DROP VIEW view_3_tab0_450

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_450 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)

statement ok
CREATE VIEW view_2_tab1_450 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))

statement ok
CREATE VIEW view_3_tab1_450 AS SELECT pk FROM view_1_tab1_450

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_450 UNION ALL SELECT pk, col0 FROM view_2_tab1_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_450 UNION SELECT pk, col0 FROM view_2_tab1_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) ) AS tab1_450
----

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

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab1_450

statement ok
DROP VIEW view_2_tab1_450

statement ok
DROP VIEW view_3_tab1_450

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_450 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)

statement ok
CREATE VIEW view_2_tab2_450 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))

statement ok
CREATE VIEW view_3_tab2_450 AS SELECT pk FROM view_1_tab2_450

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_450 UNION ALL SELECT pk, col0 FROM view_2_tab2_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_450 UNION SELECT pk, col0 FROM view_2_tab2_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) ) AS tab2_450
----

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

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab2_450

statement ok
DROP VIEW view_2_tab2_450

statement ok
DROP VIEW view_3_tab2_450

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_450 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)

statement ok
CREATE VIEW view_2_tab3_450 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))

statement ok
CREATE VIEW view_3_tab3_450 AS SELECT pk FROM view_1_tab3_450

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_450 UNION ALL SELECT pk, col0 FROM view_2_tab3_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_450 UNION SELECT pk, col0 FROM view_2_tab3_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) ) AS tab3_450
----

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

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab3_450

statement ok
DROP VIEW view_2_tab3_450

statement ok
DROP VIEW view_3_tab3_450

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_450 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)

statement ok
CREATE VIEW view_2_tab4_450 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))

statement ok
CREATE VIEW view_3_tab4_450 AS SELECT pk FROM view_1_tab4_450

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_450 UNION ALL SELECT pk, col0 FROM view_2_tab4_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_450 UNION SELECT pk, col0 FROM view_2_tab4_450
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL) ) AS tab4_450
----

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

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE (col0 >= 25 AND col0 > 73 AND col3 = 70 AND col0 = 84 AND col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab4_450

statement ok
DROP VIEW view_2_tab4_450

statement ok
DROP VIEW view_3_tab4_450

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_451 AS SELECT pk, col0 FROM tab0 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)

statement ok
CREATE VIEW view_2_tab0_451 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))

statement ok
CREATE VIEW view_3_tab0_451 AS SELECT pk FROM view_1_tab0_451

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_451 UNION ALL SELECT pk, col0 FROM view_2_tab0_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_451 UNION SELECT pk, col0 FROM view_2_tab0_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) ) AS tab0_451
----

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

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

statement ok
DROP VIEW view_1_tab0_451

statement ok
DROP VIEW view_2_tab0_451

statement ok
DROP VIEW view_3_tab0_451

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_451 AS SELECT pk, col0 FROM tab1 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)

statement ok
CREATE VIEW view_2_tab1_451 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))

statement ok
CREATE VIEW view_3_tab1_451 AS SELECT pk FROM view_1_tab1_451

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_451 UNION ALL SELECT pk, col0 FROM view_2_tab1_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_451 UNION SELECT pk, col0 FROM view_2_tab1_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) ) AS tab1_451
----

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

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

statement ok
DROP VIEW view_1_tab1_451

statement ok
DROP VIEW view_2_tab1_451

statement ok
DROP VIEW view_3_tab1_451

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_451 AS SELECT pk, col0 FROM tab2 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)

statement ok
CREATE VIEW view_2_tab2_451 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))

statement ok
CREATE VIEW view_3_tab2_451 AS SELECT pk FROM view_1_tab2_451

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_451 UNION ALL SELECT pk, col0 FROM view_2_tab2_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_451 UNION SELECT pk, col0 FROM view_2_tab2_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) ) AS tab2_451
----

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

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

statement ok
DROP VIEW view_1_tab2_451

statement ok
DROP VIEW view_2_tab2_451

statement ok
DROP VIEW view_3_tab2_451

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_451 AS SELECT pk, col0 FROM tab3 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)

statement ok
CREATE VIEW view_2_tab3_451 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))

statement ok
CREATE VIEW view_3_tab3_451 AS SELECT pk FROM view_1_tab3_451

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_451 UNION ALL SELECT pk, col0 FROM view_2_tab3_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_451 UNION SELECT pk, col0 FROM view_2_tab3_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) ) AS tab3_451
----

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

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

statement ok
DROP VIEW view_1_tab3_451

statement ok
DROP VIEW view_2_tab3_451

statement ok
DROP VIEW view_3_tab3_451

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_451 AS SELECT pk, col0 FROM tab4 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)

statement ok
CREATE VIEW view_2_tab4_451 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))

statement ok
CREATE VIEW view_3_tab4_451 AS SELECT pk FROM view_1_tab4_451

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_451 UNION ALL SELECT pk, col0 FROM view_2_tab4_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_451 UNION SELECT pk, col0 FROM view_2_tab4_451
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48) ) AS tab4_451
----

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

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE ((col1 < 89.94 AND col0 > 82 AND ((col0 BETWEEN 42 AND 8 OR col3 > 39 OR col4 < 80.49 AND col0 <= 21 AND (col0 > 48) AND col0 < 44 OR col4 < 72.77))) AND col0 = 22 AND col0 IN (38,33,75) AND col0 <= 48)
----

statement ok
DROP VIEW view_1_tab4_451

statement ok
DROP VIEW view_2_tab4_451

statement ok
DROP VIEW view_3_tab4_451

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_452 AS SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab0_452 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL))

statement ok
CREATE VIEW view_3_tab0_452 AS SELECT pk FROM view_1_tab0_452

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_452 UNION ALL SELECT pk, col0 FROM view_2_tab0_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_452 UNION SELECT pk, col0 FROM view_2_tab0_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL) ) AS tab0_452
----

query I rowsort label-800-3
SELECT * FROM view_3_tab0_452
----

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab0_452

statement ok
DROP VIEW view_2_tab0_452

statement ok
DROP VIEW view_3_tab0_452

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_452 AS SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab1_452 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL))

statement ok
CREATE VIEW view_3_tab1_452 AS SELECT pk FROM view_1_tab1_452

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_452 UNION ALL SELECT pk, col0 FROM view_2_tab1_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_452 UNION SELECT pk, col0 FROM view_2_tab1_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL) ) AS tab1_452
----

query I rowsort label-800-3
SELECT * FROM view_3_tab1_452
----

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab1_452

statement ok
DROP VIEW view_2_tab1_452

statement ok
DROP VIEW view_3_tab1_452

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_452 AS SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab2_452 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL))

statement ok
CREATE VIEW view_3_tab2_452 AS SELECT pk FROM view_1_tab2_452

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_452 UNION ALL SELECT pk, col0 FROM view_2_tab2_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_452 UNION SELECT pk, col0 FROM view_2_tab2_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL) ) AS tab2_452
----

query I rowsort label-800-3
SELECT * FROM view_3_tab2_452
----

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab2_452

statement ok
DROP VIEW view_2_tab2_452

statement ok
DROP VIEW view_3_tab2_452

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_452 AS SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab3_452 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL))

statement ok
CREATE VIEW view_3_tab3_452 AS SELECT pk FROM view_1_tab3_452

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_452 UNION ALL SELECT pk, col0 FROM view_2_tab3_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_452 UNION SELECT pk, col0 FROM view_2_tab3_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL) ) AS tab3_452
----

query I rowsort label-800-3
SELECT * FROM view_3_tab3_452
----

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab3_452

statement ok
DROP VIEW view_2_tab3_452

statement ok
DROP VIEW view_3_tab3_452

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_452 AS SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL)

statement ok
CREATE VIEW view_2_tab4_452 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL))

statement ok
CREATE VIEW view_3_tab4_452 AS SELECT pk FROM view_1_tab4_452

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL)
----

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

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

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_452 UNION ALL SELECT pk, col0 FROM view_2_tab4_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_452 UNION SELECT pk, col0 FROM view_2_tab4_452
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL) ) AS tab4_452
----

query I rowsort label-800-3
SELECT * FROM view_3_tab4_452
----

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE (col0 IS NULL)
----

statement ok
DROP VIEW view_1_tab4_452

statement ok
DROP VIEW view_2_tab4_452

statement ok
DROP VIEW view_3_tab4_452

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_453 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)

statement ok
CREATE VIEW view_2_tab0_453 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))

statement ok
CREATE VIEW view_3_tab0_453 AS SELECT pk FROM view_1_tab0_453

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
7
52

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_453
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_453
----
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_453 UNION ALL SELECT pk, col0 FROM view_2_tab0_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_453 UNION SELECT pk, col0 FROM view_2_tab0_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) ) AS tab0_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT * FROM view_3_tab0_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab0_453

statement ok
DROP VIEW view_2_tab0_453

statement ok
DROP VIEW view_3_tab0_453

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_453 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)

statement ok
CREATE VIEW view_2_tab1_453 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))

statement ok
CREATE VIEW view_3_tab1_453 AS SELECT pk FROM view_1_tab1_453

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
7
52

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_453
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_453
----
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_453 UNION ALL SELECT pk, col0 FROM view_2_tab1_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_453 UNION SELECT pk, col0 FROM view_2_tab1_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) ) AS tab1_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT * FROM view_3_tab1_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab1_453

statement ok
DROP VIEW view_2_tab1_453

statement ok
DROP VIEW view_3_tab1_453

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_453 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)

statement ok
CREATE VIEW view_2_tab2_453 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))

statement ok
CREATE VIEW view_3_tab2_453 AS SELECT pk FROM view_1_tab2_453

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
7
52

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_453
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_453
----
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_453 UNION ALL SELECT pk, col0 FROM view_2_tab2_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_453 UNION SELECT pk, col0 FROM view_2_tab2_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) ) AS tab2_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT * FROM view_3_tab2_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab2_453

statement ok
DROP VIEW view_2_tab2_453

statement ok
DROP VIEW view_3_tab2_453

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_453 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)

statement ok
CREATE VIEW view_2_tab3_453 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))

statement ok
CREATE VIEW view_3_tab3_453 AS SELECT pk FROM view_1_tab3_453

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
7
52

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_453
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_453
----
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_453 UNION ALL SELECT pk, col0 FROM view_2_tab3_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_453 UNION SELECT pk, col0 FROM view_2_tab3_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) ) AS tab3_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT * FROM view_3_tab3_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab3_453

statement ok
DROP VIEW view_2_tab3_453

statement ok
DROP VIEW view_3_tab3_453

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_453 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)

statement ok
CREATE VIEW view_2_tab4_453 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))

statement ok
CREATE VIEW view_3_tab4_453 AS SELECT pk FROM view_1_tab4_453

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
7
52

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_453
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_453
----
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_453 UNION ALL SELECT pk, col0 FROM view_2_tab4_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_453 UNION SELECT pk, col0 FROM view_2_tab4_453
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78) ) AS tab4_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT * FROM view_3_tab4_453
----
9 values hashing to 771a06029c003358acd302c0ec942a73

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE (col0 < 84 OR col0 > 55) AND col0 > 53 AND col0 < 76 OR (col4 >= 57.71 AND col0 < 51 OR col3 < 78)
----
9 values hashing to 771a06029c003358acd302c0ec942a73

statement ok
DROP VIEW view_1_tab4_453

statement ok
DROP VIEW view_2_tab4_453

statement ok
DROP VIEW view_3_tab4_453

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_454 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 43 AND (col0 <= 19))

statement ok
CREATE VIEW view_2_tab0_454 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))

statement ok
CREATE VIEW view_3_tab0_454 AS SELECT pk FROM view_1_tab0_454

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 43 AND (col0 <= 19))
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_454
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 43 AND (col0 <= 19)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_454 UNION ALL SELECT pk, col0 FROM view_2_tab0_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 43 AND (col0 <= 19)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_454 UNION SELECT pk, col0 FROM view_2_tab0_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 43 AND (col0 <= 19)) ) AS tab0_454
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_454
----

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE (col0 >= 43 AND (col0 <= 19))
----

statement ok
DROP VIEW view_1_tab0_454

statement ok
DROP VIEW view_2_tab0_454

statement ok
DROP VIEW view_3_tab0_454

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_454 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 43 AND (col0 <= 19))

statement ok
CREATE VIEW view_2_tab1_454 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))

statement ok
CREATE VIEW view_3_tab1_454 AS SELECT pk FROM view_1_tab1_454

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 43 AND (col0 <= 19))
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_454
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 43 AND (col0 <= 19)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_454 UNION ALL SELECT pk, col0 FROM view_2_tab1_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 43 AND (col0 <= 19)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_454 UNION SELECT pk, col0 FROM view_2_tab1_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 43 AND (col0 <= 19)) ) AS tab1_454
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_454
----

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE (col0 >= 43 AND (col0 <= 19))
----

statement ok
DROP VIEW view_1_tab1_454

statement ok
DROP VIEW view_2_tab1_454

statement ok
DROP VIEW view_3_tab1_454

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_454 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 43 AND (col0 <= 19))

statement ok
CREATE VIEW view_2_tab2_454 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))

statement ok
CREATE VIEW view_3_tab2_454 AS SELECT pk FROM view_1_tab2_454

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 43 AND (col0 <= 19))
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_454
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 43 AND (col0 <= 19)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_454 UNION ALL SELECT pk, col0 FROM view_2_tab2_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 43 AND (col0 <= 19)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_454 UNION SELECT pk, col0 FROM view_2_tab2_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 43 AND (col0 <= 19)) ) AS tab2_454
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_454
----

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE (col0 >= 43 AND (col0 <= 19))
----

statement ok
DROP VIEW view_1_tab2_454

statement ok
DROP VIEW view_2_tab2_454

statement ok
DROP VIEW view_3_tab2_454

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_454 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 43 AND (col0 <= 19))

statement ok
CREATE VIEW view_2_tab3_454 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))

statement ok
CREATE VIEW view_3_tab3_454 AS SELECT pk FROM view_1_tab3_454

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 43 AND (col0 <= 19))
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_454
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 43 AND (col0 <= 19)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_454 UNION ALL SELECT pk, col0 FROM view_2_tab3_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 43 AND (col0 <= 19)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_454 UNION SELECT pk, col0 FROM view_2_tab3_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 43 AND (col0 <= 19)) ) AS tab3_454
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_454
----

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE (col0 >= 43 AND (col0 <= 19))
----

statement ok
DROP VIEW view_1_tab3_454

statement ok
DROP VIEW view_2_tab3_454

statement ok
DROP VIEW view_3_tab3_454

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_454 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 43 AND (col0 <= 19))

statement ok
CREATE VIEW view_2_tab4_454 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))

statement ok
CREATE VIEW view_3_tab4_454 AS SELECT pk FROM view_1_tab4_454

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 43 AND (col0 <= 19))
----

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_454
----

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 43 AND (col0 <= 19)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_454 UNION ALL SELECT pk, col0 FROM view_2_tab4_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 43 AND (col0 <= 19)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 43 AND (col0 <= 19)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_454 UNION SELECT pk, col0 FROM view_2_tab4_454
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 43 AND (col0 <= 19)) ) AS tab4_454
----

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_454
----

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE (col0 >= 43 AND (col0 <= 19))
----

statement ok
DROP VIEW view_1_tab4_454

statement ok
DROP VIEW view_2_tab4_454

statement ok
DROP VIEW view_3_tab4_454

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_455 AS SELECT pk, col0 FROM tab0 WHERE (col4 = 28.57)

statement ok
CREATE VIEW view_2_tab0_455 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 28.57))

statement ok
CREATE VIEW view_3_tab0_455 AS SELECT pk FROM view_1_tab0_455

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE (col4 = 28.57)
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_455
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 28.57) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_455 UNION ALL SELECT pk, col0 FROM view_2_tab0_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 28.57) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_455 UNION SELECT pk, col0 FROM view_2_tab0_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 = 28.57) ) AS tab0_455
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_455
----

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE (col4 = 28.57)
----

statement ok
DROP VIEW view_1_tab0_455

statement ok
DROP VIEW view_2_tab0_455

statement ok
DROP VIEW view_3_tab0_455

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_455 AS SELECT pk, col0 FROM tab1 WHERE (col4 = 28.57)

statement ok
CREATE VIEW view_2_tab1_455 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 28.57))

statement ok
CREATE VIEW view_3_tab1_455 AS SELECT pk FROM view_1_tab1_455

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE (col4 = 28.57)
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_455
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 28.57) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_455 UNION ALL SELECT pk, col0 FROM view_2_tab1_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 28.57) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_455 UNION SELECT pk, col0 FROM view_2_tab1_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 = 28.57) ) AS tab1_455
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_455
----

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE (col4 = 28.57)
----

statement ok
DROP VIEW view_1_tab1_455

statement ok
DROP VIEW view_2_tab1_455

statement ok
DROP VIEW view_3_tab1_455

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_455 AS SELECT pk, col0 FROM tab2 WHERE (col4 = 28.57)

statement ok
CREATE VIEW view_2_tab2_455 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 28.57))

statement ok
CREATE VIEW view_3_tab2_455 AS SELECT pk FROM view_1_tab2_455

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE (col4 = 28.57)
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_455
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 28.57) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_455 UNION ALL SELECT pk, col0 FROM view_2_tab2_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 28.57) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_455 UNION SELECT pk, col0 FROM view_2_tab2_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 = 28.57) ) AS tab2_455
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_455
----

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE (col4 = 28.57)
----

statement ok
DROP VIEW view_1_tab2_455

statement ok
DROP VIEW view_2_tab2_455

statement ok
DROP VIEW view_3_tab2_455

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_455 AS SELECT pk, col0 FROM tab3 WHERE (col4 = 28.57)

statement ok
CREATE VIEW view_2_tab3_455 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 28.57))

statement ok
CREATE VIEW view_3_tab3_455 AS SELECT pk FROM view_1_tab3_455

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE (col4 = 28.57)
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_455
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 28.57) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_455 UNION ALL SELECT pk, col0 FROM view_2_tab3_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 28.57) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_455 UNION SELECT pk, col0 FROM view_2_tab3_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 = 28.57) ) AS tab3_455
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_455
----

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE (col4 = 28.57)
----

statement ok
DROP VIEW view_1_tab3_455

statement ok
DROP VIEW view_2_tab3_455

statement ok
DROP VIEW view_3_tab3_455

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_455 AS SELECT pk, col0 FROM tab4 WHERE (col4 = 28.57)

statement ok
CREATE VIEW view_2_tab4_455 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 28.57))

statement ok
CREATE VIEW view_3_tab4_455 AS SELECT pk FROM view_1_tab4_455

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE (col4 = 28.57)
----

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_455
----

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 28.57) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_455 UNION ALL SELECT pk, col0 FROM view_2_tab4_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 28.57) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 28.57))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_455 UNION SELECT pk, col0 FROM view_2_tab4_455
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 = 28.57) ) AS tab4_455
----

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_455
----

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE (col4 = 28.57)
----

statement ok
DROP VIEW view_1_tab4_455

statement ok
DROP VIEW view_2_tab4_455

statement ok
DROP VIEW view_3_tab4_455

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_456 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)

statement ok
CREATE VIEW view_2_tab0_456 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))

statement ok
CREATE VIEW view_3_tab0_456 AS SELECT pk FROM view_1_tab0_456

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_456
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_456 UNION ALL SELECT pk, col0 FROM view_2_tab0_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_456 UNION SELECT pk, col0 FROM view_2_tab0_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) ) AS tab0_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_456

statement ok
DROP VIEW view_2_tab0_456

statement ok
DROP VIEW view_3_tab0_456

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_456 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)

statement ok
CREATE VIEW view_2_tab1_456 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))

statement ok
CREATE VIEW view_3_tab1_456 AS SELECT pk FROM view_1_tab1_456

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_456
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_456 UNION ALL SELECT pk, col0 FROM view_2_tab1_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_456 UNION SELECT pk, col0 FROM view_2_tab1_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) ) AS tab1_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_456

statement ok
DROP VIEW view_2_tab1_456

statement ok
DROP VIEW view_3_tab1_456

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_456 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)

statement ok
CREATE VIEW view_2_tab2_456 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))

statement ok
CREATE VIEW view_3_tab2_456 AS SELECT pk FROM view_1_tab2_456

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_456
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_456 UNION ALL SELECT pk, col0 FROM view_2_tab2_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_456 UNION SELECT pk, col0 FROM view_2_tab2_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) ) AS tab2_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_456

statement ok
DROP VIEW view_2_tab2_456

statement ok
DROP VIEW view_3_tab2_456

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_456 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)

statement ok
CREATE VIEW view_2_tab3_456 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))

statement ok
CREATE VIEW view_3_tab3_456 AS SELECT pk FROM view_1_tab3_456

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_456
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_456 UNION ALL SELECT pk, col0 FROM view_2_tab3_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_456 UNION SELECT pk, col0 FROM view_2_tab3_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) ) AS tab3_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_456

statement ok
DROP VIEW view_2_tab3_456

statement ok
DROP VIEW view_3_tab3_456

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_456 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)

statement ok
CREATE VIEW view_2_tab4_456 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))

statement ok
CREATE VIEW view_3_tab4_456 AS SELECT pk FROM view_1_tab4_456

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_456
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_456 UNION ALL SELECT pk, col0 FROM view_2_tab4_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 64) AND col0 = 64 OR (col0 > 1))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_456 UNION SELECT pk, col0 FROM view_2_tab4_456
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1) ) AS tab4_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_456
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE (col3 > 64) AND col0 = 64 OR (col0 > 1)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_456

statement ok
DROP VIEW view_2_tab4_456

statement ok
DROP VIEW view_3_tab4_456

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_457 AS SELECT pk, col0 FROM tab0 WHERE (col1 < 62.40)

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

statement ok
CREATE VIEW view_3_tab0_457 AS SELECT pk FROM view_1_tab0_457

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE (col1 < 62.40)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 62.40))
----
1
65
5
67

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_457
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_457
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_457 UNION ALL SELECT pk, col0 FROM view_2_tab0_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_457 UNION SELECT pk, col0 FROM view_2_tab0_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 < 62.40) ) AS tab0_457
----
0
2
3
4
6
7
8
9

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

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE (col1 < 62.40)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab0_457

statement ok
DROP VIEW view_2_tab0_457

statement ok
DROP VIEW view_3_tab0_457

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_457 AS SELECT pk, col0 FROM tab1 WHERE (col1 < 62.40)

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

statement ok
CREATE VIEW view_3_tab1_457 AS SELECT pk FROM view_1_tab1_457

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE (col1 < 62.40)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 62.40))
----
1
65
5
67

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_457
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_457
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_457 UNION ALL SELECT pk, col0 FROM view_2_tab1_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_457 UNION SELECT pk, col0 FROM view_2_tab1_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 < 62.40) ) AS tab1_457
----
0
2
3
4
6
7
8
9

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

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE (col1 < 62.40)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab1_457

statement ok
DROP VIEW view_2_tab1_457

statement ok
DROP VIEW view_3_tab1_457

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_457 AS SELECT pk, col0 FROM tab2 WHERE (col1 < 62.40)

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

statement ok
CREATE VIEW view_3_tab2_457 AS SELECT pk FROM view_1_tab2_457

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE (col1 < 62.40)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 62.40))
----
1
65
5
67

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_457
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_457
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_457 UNION ALL SELECT pk, col0 FROM view_2_tab2_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_457 UNION SELECT pk, col0 FROM view_2_tab2_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 < 62.40) ) AS tab2_457
----
0
2
3
4
6
7
8
9

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

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE (col1 < 62.40)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab2_457

statement ok
DROP VIEW view_2_tab2_457

statement ok
DROP VIEW view_3_tab2_457

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_457 AS SELECT pk, col0 FROM tab3 WHERE (col1 < 62.40)

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

statement ok
CREATE VIEW view_3_tab3_457 AS SELECT pk FROM view_1_tab3_457

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE (col1 < 62.40)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 62.40))
----
1
65
5
67

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_457
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_457
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_457 UNION ALL SELECT pk, col0 FROM view_2_tab3_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_457 UNION SELECT pk, col0 FROM view_2_tab3_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 < 62.40) ) AS tab3_457
----
0
2
3
4
6
7
8
9

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

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE (col1 < 62.40)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab3_457

statement ok
DROP VIEW view_2_tab3_457

statement ok
DROP VIEW view_3_tab3_457

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_457 AS SELECT pk, col0 FROM tab4 WHERE (col1 < 62.40)

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

statement ok
CREATE VIEW view_3_tab4_457 AS SELECT pk FROM view_1_tab4_457

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE (col1 < 62.40)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 62.40))
----
1
65
5
67

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_457
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_457
----
1
65
5
67

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_457 UNION ALL SELECT pk, col0 FROM view_2_tab4_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_457 UNION SELECT pk, col0 FROM view_2_tab4_457
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 < 62.40) ) AS tab4_457
----
0
2
3
4
6
7
8
9

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

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE (col1 < 62.40)
----
0
2
3
4
6
7
8
9

statement ok
DROP VIEW view_1_tab4_457

statement ok
DROP VIEW view_2_tab4_457

statement ok
DROP VIEW view_3_tab4_457

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_458 AS SELECT pk, col0 FROM tab0 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))

statement ok
CREATE VIEW view_2_tab0_458 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))

statement ok
CREATE VIEW view_3_tab0_458 AS SELECT pk FROM view_1_tab0_458

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_458
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_458 UNION ALL SELECT pk, col0 FROM view_2_tab0_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_458 UNION SELECT pk, col0 FROM view_2_tab0_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) ) AS tab0_458
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_458
----

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

statement ok
DROP VIEW view_1_tab0_458

statement ok
DROP VIEW view_2_tab0_458

statement ok
DROP VIEW view_3_tab0_458

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_458 AS SELECT pk, col0 FROM tab1 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))

statement ok
CREATE VIEW view_2_tab1_458 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))

statement ok
CREATE VIEW view_3_tab1_458 AS SELECT pk FROM view_1_tab1_458

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_458
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_458 UNION ALL SELECT pk, col0 FROM view_2_tab1_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_458 UNION SELECT pk, col0 FROM view_2_tab1_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) ) AS tab1_458
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_458
----

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

statement ok
DROP VIEW view_1_tab1_458

statement ok
DROP VIEW view_2_tab1_458

statement ok
DROP VIEW view_3_tab1_458

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_458 AS SELECT pk, col0 FROM tab2 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))

statement ok
CREATE VIEW view_2_tab2_458 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))

statement ok
CREATE VIEW view_3_tab2_458 AS SELECT pk FROM view_1_tab2_458

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_458
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_458 UNION ALL SELECT pk, col0 FROM view_2_tab2_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_458 UNION SELECT pk, col0 FROM view_2_tab2_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) ) AS tab2_458
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_458
----

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

statement ok
DROP VIEW view_1_tab2_458

statement ok
DROP VIEW view_2_tab2_458

statement ok
DROP VIEW view_3_tab2_458

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_458 AS SELECT pk, col0 FROM tab3 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))

statement ok
CREATE VIEW view_2_tab3_458 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))

statement ok
CREATE VIEW view_3_tab3_458 AS SELECT pk FROM view_1_tab3_458

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_458
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_458 UNION ALL SELECT pk, col0 FROM view_2_tab3_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_458 UNION SELECT pk, col0 FROM view_2_tab3_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) ) AS tab3_458
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_458
----

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

statement ok
DROP VIEW view_1_tab3_458

statement ok
DROP VIEW view_2_tab3_458

statement ok
DROP VIEW view_3_tab3_458

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_458 AS SELECT pk, col0 FROM tab4 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))

statement ok
CREATE VIEW view_2_tab4_458 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))

statement ok
CREATE VIEW view_3_tab4_458 AS SELECT pk FROM view_1_tab4_458

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_458
----

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_458 UNION ALL SELECT pk, col0 FROM view_2_tab4_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_458 UNION SELECT pk, col0 FROM view_2_tab4_458
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93)) ) AS tab4_458
----

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_458
----

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE (col4 > 55.18 AND (col0 >= 64) OR col0 > 23 AND (((col3 <= 7))) AND (col0 = 93))
----

statement ok
DROP VIEW view_1_tab4_458

statement ok
DROP VIEW view_2_tab4_458

statement ok
DROP VIEW view_3_tab4_458

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_459 AS SELECT pk, col0 FROM tab0 WHERE col0 IN (16,25,69,26,34,77)

statement ok
CREATE VIEW view_2_tab0_459 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (16,25,69,26,34,77))

statement ok
CREATE VIEW view_3_tab0_459 AS SELECT pk FROM view_1_tab0_459

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE col0 IN (16,25,69,26,34,77)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_459
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (16,25,69,26,34,77) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_459 UNION ALL SELECT pk, col0 FROM view_2_tab0_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (16,25,69,26,34,77) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_459 UNION SELECT pk, col0 FROM view_2_tab0_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IN (16,25,69,26,34,77) ) AS tab0_459
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_459
----

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE col0 IN (16,25,69,26,34,77)
----

statement ok
DROP VIEW view_1_tab0_459

statement ok
DROP VIEW view_2_tab0_459

statement ok
DROP VIEW view_3_tab0_459

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_459 AS SELECT pk, col0 FROM tab1 WHERE col0 IN (16,25,69,26,34,77)

statement ok
CREATE VIEW view_2_tab1_459 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (16,25,69,26,34,77))

statement ok
CREATE VIEW view_3_tab1_459 AS SELECT pk FROM view_1_tab1_459

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE col0 IN (16,25,69,26,34,77)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_459
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (16,25,69,26,34,77) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_459 UNION ALL SELECT pk, col0 FROM view_2_tab1_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (16,25,69,26,34,77) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_459 UNION SELECT pk, col0 FROM view_2_tab1_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IN (16,25,69,26,34,77) ) AS tab1_459
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_459
----

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE col0 IN (16,25,69,26,34,77)
----

statement ok
DROP VIEW view_1_tab1_459

statement ok
DROP VIEW view_2_tab1_459

statement ok
DROP VIEW view_3_tab1_459

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_459 AS SELECT pk, col0 FROM tab2 WHERE col0 IN (16,25,69,26,34,77)

statement ok
CREATE VIEW view_2_tab2_459 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (16,25,69,26,34,77))

statement ok
CREATE VIEW view_3_tab2_459 AS SELECT pk FROM view_1_tab2_459

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE col0 IN (16,25,69,26,34,77)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_459
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (16,25,69,26,34,77) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_459 UNION ALL SELECT pk, col0 FROM view_2_tab2_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (16,25,69,26,34,77) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_459 UNION SELECT pk, col0 FROM view_2_tab2_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IN (16,25,69,26,34,77) ) AS tab2_459
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_459
----

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE col0 IN (16,25,69,26,34,77)
----

statement ok
DROP VIEW view_1_tab2_459

statement ok
DROP VIEW view_2_tab2_459

statement ok
DROP VIEW view_3_tab2_459

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_459 AS SELECT pk, col0 FROM tab3 WHERE col0 IN (16,25,69,26,34,77)

statement ok
CREATE VIEW view_2_tab3_459 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (16,25,69,26,34,77))

statement ok
CREATE VIEW view_3_tab3_459 AS SELECT pk FROM view_1_tab3_459

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE col0 IN (16,25,69,26,34,77)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_459
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (16,25,69,26,34,77) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_459 UNION ALL SELECT pk, col0 FROM view_2_tab3_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (16,25,69,26,34,77) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_459 UNION SELECT pk, col0 FROM view_2_tab3_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IN (16,25,69,26,34,77) ) AS tab3_459
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_459
----

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE col0 IN (16,25,69,26,34,77)
----

statement ok
DROP VIEW view_1_tab3_459

statement ok
DROP VIEW view_2_tab3_459

statement ok
DROP VIEW view_3_tab3_459

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_459 AS SELECT pk, col0 FROM tab4 WHERE col0 IN (16,25,69,26,34,77)

statement ok
CREATE VIEW view_2_tab4_459 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (16,25,69,26,34,77))

statement ok
CREATE VIEW view_3_tab4_459 AS SELECT pk FROM view_1_tab4_459

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE col0 IN (16,25,69,26,34,77)
----

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_459
----

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (16,25,69,26,34,77) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_459 UNION ALL SELECT pk, col0 FROM view_2_tab4_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (16,25,69,26,34,77) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (16,25,69,26,34,77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_459 UNION SELECT pk, col0 FROM view_2_tab4_459
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IN (16,25,69,26,34,77) ) AS tab4_459
----

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_459
----

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE col0 IN (16,25,69,26,34,77)
----

statement ok
DROP VIEW view_1_tab4_459

statement ok
DROP VIEW view_2_tab4_459

statement ok
DROP VIEW view_3_tab4_459

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_460 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 93.25

statement ok
CREATE VIEW view_2_tab0_460 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 93.25)

statement ok
CREATE VIEW view_3_tab0_460 AS SELECT pk FROM view_1_tab0_460

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 93.25
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 93.25)
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_460
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_460
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_460 UNION ALL SELECT pk, col0 FROM view_2_tab0_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_460 UNION SELECT pk, col0 FROM view_2_tab0_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 93.25 ) AS tab0_460
----
7
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_460
----
7
8

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE col4 >= 93.25
----
7
8

statement ok
DROP VIEW view_1_tab0_460

statement ok
DROP VIEW view_2_tab0_460

statement ok
DROP VIEW view_3_tab0_460

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_460 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 93.25

statement ok
CREATE VIEW view_2_tab1_460 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 93.25)

statement ok
CREATE VIEW view_3_tab1_460 AS SELECT pk FROM view_1_tab1_460

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 93.25
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 93.25)
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_460
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_460
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_460 UNION ALL SELECT pk, col0 FROM view_2_tab1_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_460 UNION SELECT pk, col0 FROM view_2_tab1_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 93.25 ) AS tab1_460
----
7
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_460
----
7
8

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE col4 >= 93.25
----
7
8

statement ok
DROP VIEW view_1_tab1_460

statement ok
DROP VIEW view_2_tab1_460

statement ok
DROP VIEW view_3_tab1_460

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_460 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 93.25

statement ok
CREATE VIEW view_2_tab2_460 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 93.25)

statement ok
CREATE VIEW view_3_tab2_460 AS SELECT pk FROM view_1_tab2_460

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 93.25
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 93.25)
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_460
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_460
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_460 UNION ALL SELECT pk, col0 FROM view_2_tab2_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_460 UNION SELECT pk, col0 FROM view_2_tab2_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 93.25 ) AS tab2_460
----
7
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_460
----
7
8

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE col4 >= 93.25
----
7
8

statement ok
DROP VIEW view_1_tab2_460

statement ok
DROP VIEW view_2_tab2_460

statement ok
DROP VIEW view_3_tab2_460

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_460 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 93.25

statement ok
CREATE VIEW view_2_tab3_460 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 93.25)

statement ok
CREATE VIEW view_3_tab3_460 AS SELECT pk FROM view_1_tab3_460

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 93.25
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 93.25)
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_460
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_460
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_460 UNION ALL SELECT pk, col0 FROM view_2_tab3_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_460 UNION SELECT pk, col0 FROM view_2_tab3_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 93.25 ) AS tab3_460
----
7
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_460
----
7
8

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE col4 >= 93.25
----
7
8

statement ok
DROP VIEW view_1_tab3_460

statement ok
DROP VIEW view_2_tab3_460

statement ok
DROP VIEW view_3_tab3_460

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_460 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 93.25

statement ok
CREATE VIEW view_2_tab4_460 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 93.25)

statement ok
CREATE VIEW view_3_tab4_460 AS SELECT pk FROM view_1_tab4_460

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 93.25
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 93.25)
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_460
----
7
52
8
29

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_460
----
16 values hashing to 10875b677deec8ae8a9330cd1209e2f1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_460 UNION ALL SELECT pk, col0 FROM view_2_tab4_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_460 UNION SELECT pk, col0 FROM view_2_tab4_460
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 93.25 ) AS tab4_460
----
7
8

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_460
----
7
8

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE col4 >= 93.25
----
7
8

statement ok
DROP VIEW view_1_tab4_460

statement ok
DROP VIEW view_2_tab4_460

statement ok
DROP VIEW view_3_tab4_460

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_461 AS SELECT pk, col0 FROM tab0 WHERE ((col3 > 73) OR col3 < 77)

statement ok
CREATE VIEW view_2_tab0_461 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 73) OR col3 < 77))

statement ok
CREATE VIEW view_3_tab0_461 AS SELECT pk FROM view_1_tab0_461

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE ((col3 > 73) OR col3 < 77)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 > 73) OR col3 < 77))
----

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_461
----

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_461 UNION ALL SELECT pk, col0 FROM view_2_tab0_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_461 UNION SELECT pk, col0 FROM view_2_tab0_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 > 73) OR col3 < 77) ) AS tab0_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE ((col3 > 73) OR col3 < 77)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_461

statement ok
DROP VIEW view_2_tab0_461

statement ok
DROP VIEW view_3_tab0_461

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_461 AS SELECT pk, col0 FROM tab1 WHERE ((col3 > 73) OR col3 < 77)

statement ok
CREATE VIEW view_2_tab1_461 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 73) OR col3 < 77))

statement ok
CREATE VIEW view_3_tab1_461 AS SELECT pk FROM view_1_tab1_461

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE ((col3 > 73) OR col3 < 77)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 73) OR col3 < 77))
----

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_461
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 73) OR col3 < 77) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_461 UNION ALL SELECT pk, col0 FROM view_2_tab1_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 > 73) OR col3 < 77) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_461 UNION SELECT pk, col0 FROM view_2_tab1_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 > 73) OR col3 < 77) ) AS tab1_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE ((col3 > 73) OR col3 < 77)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_461

statement ok
DROP VIEW view_2_tab1_461

statement ok
DROP VIEW view_3_tab1_461

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_461 AS SELECT pk, col0 FROM tab2 WHERE ((col3 > 73) OR col3 < 77)

statement ok
CREATE VIEW view_2_tab2_461 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 73) OR col3 < 77))

statement ok
CREATE VIEW view_3_tab2_461 AS SELECT pk FROM view_1_tab2_461

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE ((col3 > 73) OR col3 < 77)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 73) OR col3 < 77))
----

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_461
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 73) OR col3 < 77) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_461 UNION ALL SELECT pk, col0 FROM view_2_tab2_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 > 73) OR col3 < 77) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_461 UNION SELECT pk, col0 FROM view_2_tab2_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 > 73) OR col3 < 77) ) AS tab2_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE ((col3 > 73) OR col3 < 77)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_461

statement ok
DROP VIEW view_2_tab2_461

statement ok
DROP VIEW view_3_tab2_461

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_461 AS SELECT pk, col0 FROM tab3 WHERE ((col3 > 73) OR col3 < 77)

statement ok
CREATE VIEW view_2_tab3_461 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 73) OR col3 < 77))

statement ok
CREATE VIEW view_3_tab3_461 AS SELECT pk FROM view_1_tab3_461

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE ((col3 > 73) OR col3 < 77)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 73) OR col3 < 77))
----

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_461
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 73) OR col3 < 77) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_461 UNION ALL SELECT pk, col0 FROM view_2_tab3_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 > 73) OR col3 < 77) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_461 UNION SELECT pk, col0 FROM view_2_tab3_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 > 73) OR col3 < 77) ) AS tab3_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE ((col3 > 73) OR col3 < 77)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_461

statement ok
DROP VIEW view_2_tab3_461

statement ok
DROP VIEW view_3_tab3_461

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_461 AS SELECT pk, col0 FROM tab4 WHERE ((col3 > 73) OR col3 < 77)

statement ok
CREATE VIEW view_2_tab4_461 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 73) OR col3 < 77))

statement ok
CREATE VIEW view_3_tab4_461 AS SELECT pk FROM view_1_tab4_461

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE ((col3 > 73) OR col3 < 77)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 73) OR col3 < 77))
----

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_461
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 73) OR col3 < 77) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_461 UNION ALL SELECT pk, col0 FROM view_2_tab4_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 > 73) OR col3 < 77) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 > 73) OR col3 < 77))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_461 UNION SELECT pk, col0 FROM view_2_tab4_461
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 > 73) OR col3 < 77) ) AS tab4_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_461
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE ((col3 > 73) OR col3 < 77)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_461

statement ok
DROP VIEW view_2_tab4_461

statement ok
DROP VIEW view_3_tab4_461

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_462 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 83.48

statement ok
CREATE VIEW view_2_tab0_462 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 83.48)

statement ok
CREATE VIEW view_3_tab0_462 AS SELECT pk FROM view_1_tab0_462

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 83.48
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 83.48)
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_462
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_462
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_462 UNION ALL SELECT pk, col0 FROM view_2_tab0_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_462 UNION SELECT pk, col0 FROM view_2_tab0_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 83.48 ) AS tab0_462
----
3
7
8

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_462
----
3
7
8

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE col4 >= 83.48
----
3
7
8

statement ok
DROP VIEW view_1_tab0_462

statement ok
DROP VIEW view_2_tab0_462

statement ok
DROP VIEW view_3_tab0_462

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_462 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 83.48

statement ok
CREATE VIEW view_2_tab1_462 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 83.48)

statement ok
CREATE VIEW view_3_tab1_462 AS SELECT pk FROM view_1_tab1_462

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 83.48
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 83.48)
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_462
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_462
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_462 UNION ALL SELECT pk, col0 FROM view_2_tab1_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_462 UNION SELECT pk, col0 FROM view_2_tab1_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 83.48 ) AS tab1_462
----
3
7
8

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_462
----
3
7
8

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE col4 >= 83.48
----
3
7
8

statement ok
DROP VIEW view_1_tab1_462

statement ok
DROP VIEW view_2_tab1_462

statement ok
DROP VIEW view_3_tab1_462

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_462 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 83.48

statement ok
CREATE VIEW view_2_tab2_462 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 83.48)

statement ok
CREATE VIEW view_3_tab2_462 AS SELECT pk FROM view_1_tab2_462

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 83.48
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 83.48)
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_462
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_462
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_462 UNION ALL SELECT pk, col0 FROM view_2_tab2_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_462 UNION SELECT pk, col0 FROM view_2_tab2_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 83.48 ) AS tab2_462
----
3
7
8

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_462
----
3
7
8

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE col4 >= 83.48
----
3
7
8

statement ok
DROP VIEW view_1_tab2_462

statement ok
DROP VIEW view_2_tab2_462

statement ok
DROP VIEW view_3_tab2_462

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_462 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 83.48

statement ok
CREATE VIEW view_2_tab3_462 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 83.48)

statement ok
CREATE VIEW view_3_tab3_462 AS SELECT pk FROM view_1_tab3_462

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 83.48
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 83.48)
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_462
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_462
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_462 UNION ALL SELECT pk, col0 FROM view_2_tab3_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_462 UNION SELECT pk, col0 FROM view_2_tab3_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 83.48 ) AS tab3_462
----
3
7
8

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_462
----
3
7
8

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE col4 >= 83.48
----
3
7
8

statement ok
DROP VIEW view_1_tab3_462

statement ok
DROP VIEW view_2_tab3_462

statement ok
DROP VIEW view_3_tab3_462

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_462 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 83.48

statement ok
CREATE VIEW view_2_tab4_462 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 83.48)

statement ok
CREATE VIEW view_3_tab4_462 AS SELECT pk FROM view_1_tab4_462

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 83.48
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 83.48)
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_462
----
3
6
7
52
8
29

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_462
----
14 values hashing to aee4ad17d4351772db50ecf8050f9240

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_462 UNION ALL SELECT pk, col0 FROM view_2_tab4_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_462 UNION SELECT pk, col0 FROM view_2_tab4_462
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 83.48 ) AS tab4_462
----
3
7
8

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_462
----
3
7
8

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE col4 >= 83.48
----
3
7
8

statement ok
DROP VIEW view_1_tab4_462

statement ok
DROP VIEW view_2_tab4_462

statement ok
DROP VIEW view_3_tab4_462

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_463 AS SELECT pk, col0 FROM tab0 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))

statement ok
CREATE VIEW view_2_tab0_463 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))

statement ok
CREATE VIEW view_3_tab0_463 AS SELECT pk FROM view_1_tab0_463

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
3
6
4
18
6
7

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_463
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_463
----
3
6
4
18
6
7

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_463 UNION ALL SELECT pk, col0 FROM view_2_tab0_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_463 UNION SELECT pk, col0 FROM view_2_tab0_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) ) AS tab0_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
0
1
2
5
7
8
9

statement ok
DROP VIEW view_1_tab0_463

statement ok
DROP VIEW view_2_tab0_463

statement ok
DROP VIEW view_3_tab0_463

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_463 AS SELECT pk, col0 FROM tab1 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))

statement ok
CREATE VIEW view_2_tab1_463 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))

statement ok
CREATE VIEW view_3_tab1_463 AS SELECT pk FROM view_1_tab1_463

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
3
6
4
18
6
7

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_463
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_463
----
3
6
4
18
6
7

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_463 UNION ALL SELECT pk, col0 FROM view_2_tab1_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_463 UNION SELECT pk, col0 FROM view_2_tab1_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) ) AS tab1_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
0
1
2
5
7
8
9

statement ok
DROP VIEW view_1_tab1_463

statement ok
DROP VIEW view_2_tab1_463

statement ok
DROP VIEW view_3_tab1_463

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_463 AS SELECT pk, col0 FROM tab2 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))

statement ok
CREATE VIEW view_2_tab2_463 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))

statement ok
CREATE VIEW view_3_tab2_463 AS SELECT pk FROM view_1_tab2_463

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
3
6
4
18
6
7

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_463
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_463
----
3
6
4
18
6
7

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_463 UNION ALL SELECT pk, col0 FROM view_2_tab2_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_463 UNION SELECT pk, col0 FROM view_2_tab2_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) ) AS tab2_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
0
1
2
5
7
8
9

statement ok
DROP VIEW view_1_tab2_463

statement ok
DROP VIEW view_2_tab2_463

statement ok
DROP VIEW view_3_tab2_463

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_463 AS SELECT pk, col0 FROM tab3 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))

statement ok
CREATE VIEW view_2_tab3_463 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))

statement ok
CREATE VIEW view_3_tab3_463 AS SELECT pk FROM view_1_tab3_463

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
3
6
4
18
6
7

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_463
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_463
----
3
6
4
18
6
7

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_463 UNION ALL SELECT pk, col0 FROM view_2_tab3_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_463 UNION SELECT pk, col0 FROM view_2_tab3_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) ) AS tab3_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
0
1
2
5
7
8
9

statement ok
DROP VIEW view_1_tab3_463

statement ok
DROP VIEW view_2_tab3_463

statement ok
DROP VIEW view_3_tab3_463

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_463 AS SELECT pk, col0 FROM tab4 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))

statement ok
CREATE VIEW view_2_tab4_463 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))

statement ok
CREATE VIEW view_3_tab4_463 AS SELECT pk FROM view_1_tab4_463

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
3
6
4
18
6
7

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_463
----
14 values hashing to 0441ee1820ae1f080a1c650a45e60d6a

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_463
----
3
6
4
18
6
7

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_463 UNION ALL SELECT pk, col0 FROM view_2_tab4_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_463 UNION SELECT pk, col0 FROM view_2_tab4_463
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49)) ) AS tab4_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_463
----
0
1
2
5
7
8
9

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col0 > 27 OR col3 > 67 AND col3 IS NULL OR (col0 IN (40,49))
----
0
1
2
5
7
8
9

statement ok
DROP VIEW view_1_tab4_463

statement ok
DROP VIEW view_2_tab4_463

statement ok
DROP VIEW view_3_tab4_463

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_464 AS SELECT pk, col0 FROM tab0 WHERE col0 = 79

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

statement ok
CREATE VIEW view_3_tab0_464 AS SELECT pk FROM view_1_tab0_464

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE col0 = 79
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_464
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_464 UNION ALL SELECT pk, col0 FROM view_2_tab0_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_464 UNION SELECT pk, col0 FROM view_2_tab0_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 79 ) AS tab0_464
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_464
----

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE col0 = 79
----

statement ok
DROP VIEW view_1_tab0_464

statement ok
DROP VIEW view_2_tab0_464

statement ok
DROP VIEW view_3_tab0_464

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_464 AS SELECT pk, col0 FROM tab1 WHERE col0 = 79

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

statement ok
CREATE VIEW view_3_tab1_464 AS SELECT pk FROM view_1_tab1_464

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE col0 = 79
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_464
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_464 UNION ALL SELECT pk, col0 FROM view_2_tab1_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_464 UNION SELECT pk, col0 FROM view_2_tab1_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 79 ) AS tab1_464
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_464
----

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE col0 = 79
----

statement ok
DROP VIEW view_1_tab1_464

statement ok
DROP VIEW view_2_tab1_464

statement ok
DROP VIEW view_3_tab1_464

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_464 AS SELECT pk, col0 FROM tab2 WHERE col0 = 79

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

statement ok
CREATE VIEW view_3_tab2_464 AS SELECT pk FROM view_1_tab2_464

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE col0 = 79
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_464
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_464 UNION ALL SELECT pk, col0 FROM view_2_tab2_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_464 UNION SELECT pk, col0 FROM view_2_tab2_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 79 ) AS tab2_464
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_464
----

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE col0 = 79
----

statement ok
DROP VIEW view_1_tab2_464

statement ok
DROP VIEW view_2_tab2_464

statement ok
DROP VIEW view_3_tab2_464

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_464 AS SELECT pk, col0 FROM tab3 WHERE col0 = 79

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

statement ok
CREATE VIEW view_3_tab3_464 AS SELECT pk FROM view_1_tab3_464

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE col0 = 79
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_464
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_464 UNION ALL SELECT pk, col0 FROM view_2_tab3_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_464 UNION SELECT pk, col0 FROM view_2_tab3_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 79 ) AS tab3_464
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_464
----

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE col0 = 79
----

statement ok
DROP VIEW view_1_tab3_464

statement ok
DROP VIEW view_2_tab3_464

statement ok
DROP VIEW view_3_tab3_464

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_464 AS SELECT pk, col0 FROM tab4 WHERE col0 = 79

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

statement ok
CREATE VIEW view_3_tab4_464 AS SELECT pk FROM view_1_tab4_464

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE col0 = 79
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_464
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 79 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_464 UNION ALL SELECT pk, col0 FROM view_2_tab4_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 79 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 79)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_464 UNION SELECT pk, col0 FROM view_2_tab4_464
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 79 ) AS tab4_464
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_464
----

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE col0 = 79
----

statement ok
DROP VIEW view_1_tab4_464

statement ok
DROP VIEW view_2_tab4_464

statement ok
DROP VIEW view_3_tab4_464

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_465') DROP VIEW view_1_tab0_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_465') DROP VIEW view_2_tab0_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_465') DROP VIEW view_3_tab0_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_465

statement ok
CREATE VIEW view_1_tab0_465 AS SELECT pk, col0 FROM tab0 WHERE ((col4 > 39.73))

statement ok
CREATE VIEW view_2_tab0_465 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 > 39.73)))

statement ok
CREATE VIEW view_3_tab0_465 AS SELECT pk FROM view_1_tab0_465

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE ((col4 > 39.73))
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 > 39.73)))
----
0
37
1
65
2
66
9
46

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_465
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_465
----
0
37
1
65
2
66
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 > 39.73)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_465 UNION ALL SELECT pk, col0 FROM view_2_tab0_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 > 39.73)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_465 UNION SELECT pk, col0 FROM view_2_tab0_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 > 39.73)) ) AS tab0_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE ((col4 > 39.73))
----
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_465

statement ok
DROP VIEW view_2_tab0_465

statement ok
DROP VIEW view_3_tab0_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_465') DROP VIEW view_1_tab1_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_465') DROP VIEW view_2_tab1_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_465') DROP VIEW view_3_tab1_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_465

statement ok
CREATE VIEW view_1_tab1_465 AS SELECT pk, col0 FROM tab1 WHERE ((col4 > 39.73))

statement ok
CREATE VIEW view_2_tab1_465 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 > 39.73)))

statement ok
CREATE VIEW view_3_tab1_465 AS SELECT pk FROM view_1_tab1_465

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE ((col4 > 39.73))
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 > 39.73)))
----
0
37
1
65
2
66
9
46

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_465
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_465
----
0
37
1
65
2
66
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 > 39.73)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_465 UNION ALL SELECT pk, col0 FROM view_2_tab1_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 > 39.73)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_465 UNION SELECT pk, col0 FROM view_2_tab1_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 > 39.73)) ) AS tab1_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE ((col4 > 39.73))
----
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_465

statement ok
DROP VIEW view_2_tab1_465

statement ok
DROP VIEW view_3_tab1_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_465') DROP VIEW view_1_tab2_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_465') DROP VIEW view_2_tab2_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_465') DROP VIEW view_3_tab2_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_465

statement ok
CREATE VIEW view_1_tab2_465 AS SELECT pk, col0 FROM tab2 WHERE ((col4 > 39.73))

statement ok
CREATE VIEW view_2_tab2_465 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 > 39.73)))

statement ok
CREATE VIEW view_3_tab2_465 AS SELECT pk FROM view_1_tab2_465

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE ((col4 > 39.73))
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 > 39.73)))
----
0
37
1
65
2
66
9
46

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_465
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_465
----
0
37
1
65
2
66
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 > 39.73)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_465 UNION ALL SELECT pk, col0 FROM view_2_tab2_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 > 39.73)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_465 UNION SELECT pk, col0 FROM view_2_tab2_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 > 39.73)) ) AS tab2_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE ((col4 > 39.73))
----
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_465

statement ok
DROP VIEW view_2_tab2_465

statement ok
DROP VIEW view_3_tab2_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_465') DROP VIEW view_1_tab3_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_465') DROP VIEW view_2_tab3_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_465') DROP VIEW view_3_tab3_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_465

statement ok
CREATE VIEW view_1_tab3_465 AS SELECT pk, col0 FROM tab3 WHERE ((col4 > 39.73))

statement ok
CREATE VIEW view_2_tab3_465 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 > 39.73)))

statement ok
CREATE VIEW view_3_tab3_465 AS SELECT pk FROM view_1_tab3_465

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE ((col4 > 39.73))
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 > 39.73)))
----
0
37
1
65
2
66
9
46

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_465
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_465
----
0
37
1
65
2
66
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 > 39.73)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_465 UNION ALL SELECT pk, col0 FROM view_2_tab3_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 > 39.73)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_465 UNION SELECT pk, col0 FROM view_2_tab3_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 > 39.73)) ) AS tab3_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE ((col4 > 39.73))
----
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_465

statement ok
DROP VIEW view_2_tab3_465

statement ok
DROP VIEW view_3_tab3_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_465') DROP VIEW view_1_tab4_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_465') DROP VIEW view_2_tab4_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_465') DROP VIEW view_3_tab4_465

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_465

statement ok
CREATE VIEW view_1_tab4_465 AS SELECT pk, col0 FROM tab4 WHERE ((col4 > 39.73))

statement ok
CREATE VIEW view_2_tab4_465 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 > 39.73)))

statement ok
CREATE VIEW view_3_tab4_465 AS SELECT pk FROM view_1_tab4_465

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE ((col4 > 39.73))
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 > 39.73)))
----
0
37
1
65
2
66
9
46

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_465
----
12 values hashing to fb0584e585af39cb2b2e7638e1ab0756

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_465
----
0
37
1
65
2
66
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 > 39.73)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_465 UNION ALL SELECT pk, col0 FROM view_2_tab4_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 > 39.73)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 > 39.73)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_465 UNION SELECT pk, col0 FROM view_2_tab4_465
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 > 39.73)) ) AS tab4_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_465
----
3
4
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE ((col4 > 39.73))
----
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_465

statement ok
DROP VIEW view_2_tab4_465

statement ok
DROP VIEW view_3_tab4_465

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_466') DROP VIEW view_1_tab0_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_466') DROP VIEW view_2_tab0_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_466') DROP VIEW view_3_tab0_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_466

statement ok
CREATE VIEW view_1_tab0_466 AS SELECT pk, col0 FROM tab0 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)

statement ok
CREATE VIEW view_2_tab0_466 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))

statement ok
CREATE VIEW view_3_tab0_466 AS SELECT pk FROM view_1_tab0_466

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_466
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_466 UNION ALL SELECT pk, col0 FROM view_2_tab0_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_466 UNION SELECT pk, col0 FROM view_2_tab0_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) ) AS tab0_466
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_466
----

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

statement ok
DROP VIEW view_1_tab0_466

statement ok
DROP VIEW view_2_tab0_466

statement ok
DROP VIEW view_3_tab0_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_466') DROP VIEW view_1_tab1_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_466') DROP VIEW view_2_tab1_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_466') DROP VIEW view_3_tab1_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_466

statement ok
CREATE VIEW view_1_tab1_466 AS SELECT pk, col0 FROM tab1 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)

statement ok
CREATE VIEW view_2_tab1_466 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))

statement ok
CREATE VIEW view_3_tab1_466 AS SELECT pk FROM view_1_tab1_466

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_466
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_466 UNION ALL SELECT pk, col0 FROM view_2_tab1_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_466 UNION SELECT pk, col0 FROM view_2_tab1_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) ) AS tab1_466
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_466
----

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

statement ok
DROP VIEW view_1_tab1_466

statement ok
DROP VIEW view_2_tab1_466

statement ok
DROP VIEW view_3_tab1_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_466') DROP VIEW view_1_tab2_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_466') DROP VIEW view_2_tab2_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_466') DROP VIEW view_3_tab2_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_466

statement ok
CREATE VIEW view_1_tab2_466 AS SELECT pk, col0 FROM tab2 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)

statement ok
CREATE VIEW view_2_tab2_466 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))

statement ok
CREATE VIEW view_3_tab2_466 AS SELECT pk FROM view_1_tab2_466

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_466
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_466 UNION ALL SELECT pk, col0 FROM view_2_tab2_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_466 UNION SELECT pk, col0 FROM view_2_tab2_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) ) AS tab2_466
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_466
----

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

statement ok
DROP VIEW view_1_tab2_466

statement ok
DROP VIEW view_2_tab2_466

statement ok
DROP VIEW view_3_tab2_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_466') DROP VIEW view_1_tab3_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_466') DROP VIEW view_2_tab3_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_466') DROP VIEW view_3_tab3_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_466

statement ok
CREATE VIEW view_1_tab3_466 AS SELECT pk, col0 FROM tab3 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)

statement ok
CREATE VIEW view_2_tab3_466 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))

statement ok
CREATE VIEW view_3_tab3_466 AS SELECT pk FROM view_1_tab3_466

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_466
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_466 UNION ALL SELECT pk, col0 FROM view_2_tab3_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_466 UNION SELECT pk, col0 FROM view_2_tab3_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) ) AS tab3_466
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_466
----

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

statement ok
DROP VIEW view_1_tab3_466

statement ok
DROP VIEW view_2_tab3_466

statement ok
DROP VIEW view_3_tab3_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_466') DROP VIEW view_1_tab4_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_466') DROP VIEW view_2_tab4_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_466') DROP VIEW view_3_tab4_466

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_466

statement ok
CREATE VIEW view_1_tab4_466 AS SELECT pk, col0 FROM tab4 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)

statement ok
CREATE VIEW view_2_tab4_466 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))

statement ok
CREATE VIEW view_3_tab4_466 AS SELECT pk FROM view_1_tab4_466

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_466
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_466 UNION ALL SELECT pk, col0 FROM view_2_tab4_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_466 UNION SELECT pk, col0 FROM view_2_tab4_466
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41) ) AS tab4_466
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_466
----

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE ((col0 = 27)) AND col0 > 35 AND col4 > 45.46 OR (col4 >= 72.5) AND (col0 BETWEEN 44 AND 43) AND (col1 > 41.36 AND col1 >= 86.41)
----

statement ok
DROP VIEW view_1_tab4_466

statement ok
DROP VIEW view_2_tab4_466

statement ok
DROP VIEW view_3_tab4_466

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_467') DROP VIEW view_1_tab0_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_467') DROP VIEW view_2_tab0_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_467') DROP VIEW view_3_tab0_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_467

statement ok
CREATE VIEW view_1_tab0_467 AS SELECT pk, col0 FROM tab0 WHERE col1 > 57.87

statement ok
CREATE VIEW view_2_tab0_467 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 57.87)

statement ok
CREATE VIEW view_3_tab0_467 AS SELECT pk FROM view_1_tab0_467

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE col1 > 57.87
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 57.87)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_467
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_467
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 57.87 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_467 UNION ALL SELECT pk, col0 FROM view_2_tab0_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 57.87 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_467 UNION SELECT pk, col0 FROM view_2_tab0_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 57.87 ) AS tab0_467
----
1
5

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_467
----
1
5

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE col1 > 57.87
----
1
5

statement ok
DROP VIEW view_1_tab0_467

statement ok
DROP VIEW view_2_tab0_467

statement ok
DROP VIEW view_3_tab0_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_467') DROP VIEW view_1_tab1_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_467') DROP VIEW view_2_tab1_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_467') DROP VIEW view_3_tab1_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_467

statement ok
CREATE VIEW view_1_tab1_467 AS SELECT pk, col0 FROM tab1 WHERE col1 > 57.87

statement ok
CREATE VIEW view_2_tab1_467 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 57.87)

statement ok
CREATE VIEW view_3_tab1_467 AS SELECT pk FROM view_1_tab1_467

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE col1 > 57.87
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 57.87)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_467
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_467
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 57.87 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_467 UNION ALL SELECT pk, col0 FROM view_2_tab1_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 57.87 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_467 UNION SELECT pk, col0 FROM view_2_tab1_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 57.87 ) AS tab1_467
----
1
5

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_467
----
1
5

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE col1 > 57.87
----
1
5

statement ok
DROP VIEW view_1_tab1_467

statement ok
DROP VIEW view_2_tab1_467

statement ok
DROP VIEW view_3_tab1_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_467') DROP VIEW view_1_tab2_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_467') DROP VIEW view_2_tab2_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_467') DROP VIEW view_3_tab2_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_467

statement ok
CREATE VIEW view_1_tab2_467 AS SELECT pk, col0 FROM tab2 WHERE col1 > 57.87

statement ok
CREATE VIEW view_2_tab2_467 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 57.87)

statement ok
CREATE VIEW view_3_tab2_467 AS SELECT pk FROM view_1_tab2_467

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE col1 > 57.87
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 57.87)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_467
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_467
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 57.87 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_467 UNION ALL SELECT pk, col0 FROM view_2_tab2_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 57.87 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_467 UNION SELECT pk, col0 FROM view_2_tab2_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 57.87 ) AS tab2_467
----
1
5

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_467
----
1
5

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE col1 > 57.87
----
1
5

statement ok
DROP VIEW view_1_tab2_467

statement ok
DROP VIEW view_2_tab2_467

statement ok
DROP VIEW view_3_tab2_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_467') DROP VIEW view_1_tab3_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_467') DROP VIEW view_2_tab3_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_467') DROP VIEW view_3_tab3_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_467

statement ok
CREATE VIEW view_1_tab3_467 AS SELECT pk, col0 FROM tab3 WHERE col1 > 57.87

statement ok
CREATE VIEW view_2_tab3_467 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 57.87)

statement ok
CREATE VIEW view_3_tab3_467 AS SELECT pk FROM view_1_tab3_467

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE col1 > 57.87
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 57.87)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_467
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_467
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 57.87 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_467 UNION ALL SELECT pk, col0 FROM view_2_tab3_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 57.87 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_467 UNION SELECT pk, col0 FROM view_2_tab3_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 57.87 ) AS tab3_467
----
1
5

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_467
----
1
5

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE col1 > 57.87
----
1
5

statement ok
DROP VIEW view_1_tab3_467

statement ok
DROP VIEW view_2_tab3_467

statement ok
DROP VIEW view_3_tab3_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_467') DROP VIEW view_1_tab4_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_467') DROP VIEW view_2_tab4_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_467') DROP VIEW view_3_tab4_467

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_467

statement ok
CREATE VIEW view_1_tab4_467 AS SELECT pk, col0 FROM tab4 WHERE col1 > 57.87

statement ok
CREATE VIEW view_2_tab4_467 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 57.87)

statement ok
CREATE VIEW view_3_tab4_467 AS SELECT pk FROM view_1_tab4_467

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE col1 > 57.87
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 57.87)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_467
----
1
65
5
67

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_467
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 57.87 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_467 UNION ALL SELECT pk, col0 FROM view_2_tab4_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 57.87 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 57.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_467 UNION SELECT pk, col0 FROM view_2_tab4_467
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 57.87 ) AS tab4_467
----
1
5

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_467
----
1
5

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE col1 > 57.87
----
1
5

statement ok
DROP VIEW view_1_tab4_467

statement ok
DROP VIEW view_2_tab4_467

statement ok
DROP VIEW view_3_tab4_467

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_468') DROP VIEW view_1_tab0_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_468') DROP VIEW view_2_tab0_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_468') DROP VIEW view_3_tab0_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_468

statement ok
CREATE VIEW view_1_tab0_468 AS SELECT pk, col0 FROM tab0 WHERE col0 > 69

statement ok
CREATE VIEW view_2_tab0_468 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 69)

statement ok
CREATE VIEW view_3_tab0_468 AS SELECT pk FROM view_1_tab0_468

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col0 > 69
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_468
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_468 UNION ALL SELECT pk, col0 FROM view_2_tab0_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_468 UNION SELECT pk, col0 FROM view_2_tab0_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 69 ) AS tab0_468
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_468
----

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col0 > 69
----

statement ok
DROP VIEW view_1_tab0_468

statement ok
DROP VIEW view_2_tab0_468

statement ok
DROP VIEW view_3_tab0_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_468') DROP VIEW view_1_tab1_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_468') DROP VIEW view_2_tab1_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_468') DROP VIEW view_3_tab1_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_468

statement ok
CREATE VIEW view_1_tab1_468 AS SELECT pk, col0 FROM tab1 WHERE col0 > 69

statement ok
CREATE VIEW view_2_tab1_468 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 69)

statement ok
CREATE VIEW view_3_tab1_468 AS SELECT pk FROM view_1_tab1_468

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col0 > 69
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_468
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_468 UNION ALL SELECT pk, col0 FROM view_2_tab1_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_468 UNION SELECT pk, col0 FROM view_2_tab1_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 69 ) AS tab1_468
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_468
----

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col0 > 69
----

statement ok
DROP VIEW view_1_tab1_468

statement ok
DROP VIEW view_2_tab1_468

statement ok
DROP VIEW view_3_tab1_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_468') DROP VIEW view_1_tab2_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_468') DROP VIEW view_2_tab2_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_468') DROP VIEW view_3_tab2_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_468

statement ok
CREATE VIEW view_1_tab2_468 AS SELECT pk, col0 FROM tab2 WHERE col0 > 69

statement ok
CREATE VIEW view_2_tab2_468 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 69)

statement ok
CREATE VIEW view_3_tab2_468 AS SELECT pk FROM view_1_tab2_468

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col0 > 69
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_468
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_468 UNION ALL SELECT pk, col0 FROM view_2_tab2_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_468 UNION SELECT pk, col0 FROM view_2_tab2_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 69 ) AS tab2_468
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_468
----

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col0 > 69
----

statement ok
DROP VIEW view_1_tab2_468

statement ok
DROP VIEW view_2_tab2_468

statement ok
DROP VIEW view_3_tab2_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_468') DROP VIEW view_1_tab3_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_468') DROP VIEW view_2_tab3_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_468') DROP VIEW view_3_tab3_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_468

statement ok
CREATE VIEW view_1_tab3_468 AS SELECT pk, col0 FROM tab3 WHERE col0 > 69

statement ok
CREATE VIEW view_2_tab3_468 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 69)

statement ok
CREATE VIEW view_3_tab3_468 AS SELECT pk FROM view_1_tab3_468

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col0 > 69
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_468
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_468 UNION ALL SELECT pk, col0 FROM view_2_tab3_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_468 UNION SELECT pk, col0 FROM view_2_tab3_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 69 ) AS tab3_468
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_468
----

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col0 > 69
----

statement ok
DROP VIEW view_1_tab3_468

statement ok
DROP VIEW view_2_tab3_468

statement ok
DROP VIEW view_3_tab3_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_468') DROP VIEW view_1_tab4_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_468') DROP VIEW view_2_tab4_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_468') DROP VIEW view_3_tab4_468

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_468

statement ok
CREATE VIEW view_1_tab4_468 AS SELECT pk, col0 FROM tab4 WHERE col0 > 69

statement ok
CREATE VIEW view_2_tab4_468 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 69)

statement ok
CREATE VIEW view_3_tab4_468 AS SELECT pk FROM view_1_tab4_468

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col0 > 69
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_468
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_468 UNION ALL SELECT pk, col0 FROM view_2_tab4_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_468 UNION SELECT pk, col0 FROM view_2_tab4_468
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 69 ) AS tab4_468
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_468
----

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col0 > 69
----

statement ok
DROP VIEW view_1_tab4_468

statement ok
DROP VIEW view_2_tab4_468

statement ok
DROP VIEW view_3_tab4_468

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_469') DROP VIEW view_1_tab0_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_469') DROP VIEW view_2_tab0_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_469') DROP VIEW view_3_tab0_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_469

statement ok
CREATE VIEW view_1_tab0_469 AS SELECT pk, col0 FROM tab0 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13

statement ok
CREATE VIEW view_2_tab0_469 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)

statement ok
CREATE VIEW view_3_tab0_469 AS SELECT pk FROM view_1_tab0_469

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_469
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_469
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_469 UNION ALL SELECT pk, col0 FROM view_2_tab0_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_469 UNION SELECT pk, col0 FROM view_2_tab0_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 ) AS tab0_469
----
1

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_469
----
1

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1

statement ok
DROP VIEW view_1_tab0_469

statement ok
DROP VIEW view_2_tab0_469

statement ok
DROP VIEW view_3_tab0_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_469') DROP VIEW view_1_tab1_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_469') DROP VIEW view_2_tab1_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_469') DROP VIEW view_3_tab1_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_469

statement ok
CREATE VIEW view_1_tab1_469 AS SELECT pk, col0 FROM tab1 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13

statement ok
CREATE VIEW view_2_tab1_469 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)

statement ok
CREATE VIEW view_3_tab1_469 AS SELECT pk FROM view_1_tab1_469

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_469
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_469
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_469 UNION ALL SELECT pk, col0 FROM view_2_tab1_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_469 UNION SELECT pk, col0 FROM view_2_tab1_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 ) AS tab1_469
----
1

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_469
----
1

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1

statement ok
DROP VIEW view_1_tab1_469

statement ok
DROP VIEW view_2_tab1_469

statement ok
DROP VIEW view_3_tab1_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_469') DROP VIEW view_1_tab2_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_469') DROP VIEW view_2_tab2_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_469') DROP VIEW view_3_tab2_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_469

statement ok
CREATE VIEW view_1_tab2_469 AS SELECT pk, col0 FROM tab2 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13

statement ok
CREATE VIEW view_2_tab2_469 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)

statement ok
CREATE VIEW view_3_tab2_469 AS SELECT pk FROM view_1_tab2_469

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_469
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_469
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_469 UNION ALL SELECT pk, col0 FROM view_2_tab2_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_469 UNION SELECT pk, col0 FROM view_2_tab2_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 ) AS tab2_469
----
1

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_469
----
1

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1

statement ok
DROP VIEW view_1_tab2_469

statement ok
DROP VIEW view_2_tab2_469

statement ok
DROP VIEW view_3_tab2_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_469') DROP VIEW view_1_tab3_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_469') DROP VIEW view_2_tab3_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_469') DROP VIEW view_3_tab3_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_469

statement ok
CREATE VIEW view_1_tab3_469 AS SELECT pk, col0 FROM tab3 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13

statement ok
CREATE VIEW view_2_tab3_469 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)

statement ok
CREATE VIEW view_3_tab3_469 AS SELECT pk FROM view_1_tab3_469

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_469
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_469
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_469 UNION ALL SELECT pk, col0 FROM view_2_tab3_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_469 UNION SELECT pk, col0 FROM view_2_tab3_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 ) AS tab3_469
----
1

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_469
----
1

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1

statement ok
DROP VIEW view_1_tab3_469

statement ok
DROP VIEW view_2_tab3_469

statement ok
DROP VIEW view_3_tab3_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_469') DROP VIEW view_1_tab4_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_469') DROP VIEW view_2_tab4_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_469') DROP VIEW view_3_tab4_469

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_469

statement ok
CREATE VIEW view_1_tab4_469 AS SELECT pk, col0 FROM tab4 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13

statement ok
CREATE VIEW view_2_tab4_469 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)

statement ok
CREATE VIEW view_3_tab4_469 AS SELECT pk FROM view_1_tab4_469

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_469
----
1
65

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_469
----
18 values hashing to 9968d89259b66f34ea2d427510a2f587

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_469 UNION ALL SELECT pk, col0 FROM view_2_tab4_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_469 UNION SELECT pk, col0 FROM view_2_tab4_469
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13 ) AS tab4_469
----
1

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_469
----
1

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE (((col0 > 98) AND ((col0 >= 78)) AND col3 >= 90)) OR ((((col1 = 92.64 OR col3 > 86)))) AND col0 > 13
----
1

statement ok
DROP VIEW view_1_tab4_469

statement ok
DROP VIEW view_2_tab4_469

statement ok
DROP VIEW view_3_tab4_469

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_470') DROP VIEW view_1_tab0_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_470') DROP VIEW view_2_tab0_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_470') DROP VIEW view_3_tab0_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_470

statement ok
CREATE VIEW view_1_tab0_470 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 81

statement ok
CREATE VIEW view_2_tab0_470 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 81)

statement ok
CREATE VIEW view_3_tab0_470 AS SELECT pk FROM view_1_tab0_470

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 81
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_470
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 81 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_470 UNION ALL SELECT pk, col0 FROM view_2_tab0_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 81 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_470 UNION SELECT pk, col0 FROM view_2_tab0_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 81 ) AS tab0_470
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_470
----

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE col0 >= 81
----

statement ok
DROP VIEW view_1_tab0_470

statement ok
DROP VIEW view_2_tab0_470

statement ok
DROP VIEW view_3_tab0_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_470') DROP VIEW view_1_tab1_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_470') DROP VIEW view_2_tab1_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_470') DROP VIEW view_3_tab1_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_470

statement ok
CREATE VIEW view_1_tab1_470 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 81

statement ok
CREATE VIEW view_2_tab1_470 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 81)

statement ok
CREATE VIEW view_3_tab1_470 AS SELECT pk FROM view_1_tab1_470

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 81
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_470
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 81 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_470 UNION ALL SELECT pk, col0 FROM view_2_tab1_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 81 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_470 UNION SELECT pk, col0 FROM view_2_tab1_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 81 ) AS tab1_470
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_470
----

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE col0 >= 81
----

statement ok
DROP VIEW view_1_tab1_470

statement ok
DROP VIEW view_2_tab1_470

statement ok
DROP VIEW view_3_tab1_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_470') DROP VIEW view_1_tab2_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_470') DROP VIEW view_2_tab2_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_470') DROP VIEW view_3_tab2_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_470

statement ok
CREATE VIEW view_1_tab2_470 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 81

statement ok
CREATE VIEW view_2_tab2_470 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 81)

statement ok
CREATE VIEW view_3_tab2_470 AS SELECT pk FROM view_1_tab2_470

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 81
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_470
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 81 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_470 UNION ALL SELECT pk, col0 FROM view_2_tab2_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 81 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_470 UNION SELECT pk, col0 FROM view_2_tab2_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 81 ) AS tab2_470
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_470
----

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE col0 >= 81
----

statement ok
DROP VIEW view_1_tab2_470

statement ok
DROP VIEW view_2_tab2_470

statement ok
DROP VIEW view_3_tab2_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_470') DROP VIEW view_1_tab3_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_470') DROP VIEW view_2_tab3_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_470') DROP VIEW view_3_tab3_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_470

statement ok
CREATE VIEW view_1_tab3_470 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 81

statement ok
CREATE VIEW view_2_tab3_470 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 81)

statement ok
CREATE VIEW view_3_tab3_470 AS SELECT pk FROM view_1_tab3_470

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 81
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_470
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 81 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_470 UNION ALL SELECT pk, col0 FROM view_2_tab3_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 81 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_470 UNION SELECT pk, col0 FROM view_2_tab3_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 81 ) AS tab3_470
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_470
----

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE col0 >= 81
----

statement ok
DROP VIEW view_1_tab3_470

statement ok
DROP VIEW view_2_tab3_470

statement ok
DROP VIEW view_3_tab3_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_470') DROP VIEW view_1_tab4_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_470') DROP VIEW view_2_tab4_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_470') DROP VIEW view_3_tab4_470

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_470

statement ok
CREATE VIEW view_1_tab4_470 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 81

statement ok
CREATE VIEW view_2_tab4_470 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 81)

statement ok
CREATE VIEW view_3_tab4_470 AS SELECT pk FROM view_1_tab4_470

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 81
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_470
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 81 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_470 UNION ALL SELECT pk, col0 FROM view_2_tab4_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 81 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_470 UNION SELECT pk, col0 FROM view_2_tab4_470
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 81 ) AS tab4_470
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_470
----

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE col0 >= 81
----

statement ok
DROP VIEW view_1_tab4_470

statement ok
DROP VIEW view_2_tab4_470

statement ok
DROP VIEW view_3_tab4_470

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_471') DROP VIEW view_1_tab0_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_471') DROP VIEW view_2_tab0_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_471') DROP VIEW view_3_tab0_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_471

statement ok
CREATE VIEW view_1_tab0_471 AS SELECT pk, col0 FROM tab0 WHERE col0 < 10

statement ok
CREATE VIEW view_2_tab0_471 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 10)

statement ok
CREATE VIEW view_3_tab0_471 AS SELECT pk FROM view_1_tab0_471

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE col0 < 10
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 10)
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_471
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_471
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 10 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_471 UNION ALL SELECT pk, col0 FROM view_2_tab0_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 10 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_471 UNION SELECT pk, col0 FROM view_2_tab0_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 10 ) AS tab0_471
----
3
6

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_471
----
3
6

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE col0 < 10
----
3
6

statement ok
DROP VIEW view_1_tab0_471

statement ok
DROP VIEW view_2_tab0_471

statement ok
DROP VIEW view_3_tab0_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_471') DROP VIEW view_1_tab1_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_471') DROP VIEW view_2_tab1_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_471') DROP VIEW view_3_tab1_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_471

statement ok
CREATE VIEW view_1_tab1_471 AS SELECT pk, col0 FROM tab1 WHERE col0 < 10

statement ok
CREATE VIEW view_2_tab1_471 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 10)

statement ok
CREATE VIEW view_3_tab1_471 AS SELECT pk FROM view_1_tab1_471

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE col0 < 10
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 10)
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_471
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_471
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 10 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_471 UNION ALL SELECT pk, col0 FROM view_2_tab1_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 10 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_471 UNION SELECT pk, col0 FROM view_2_tab1_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 10 ) AS tab1_471
----
3
6

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_471
----
3
6

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE col0 < 10
----
3
6

statement ok
DROP VIEW view_1_tab1_471

statement ok
DROP VIEW view_2_tab1_471

statement ok
DROP VIEW view_3_tab1_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_471') DROP VIEW view_1_tab2_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_471') DROP VIEW view_2_tab2_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_471') DROP VIEW view_3_tab2_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_471

statement ok
CREATE VIEW view_1_tab2_471 AS SELECT pk, col0 FROM tab2 WHERE col0 < 10

statement ok
CREATE VIEW view_2_tab2_471 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 10)

statement ok
CREATE VIEW view_3_tab2_471 AS SELECT pk FROM view_1_tab2_471

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE col0 < 10
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 10)
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_471
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_471
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 10 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_471 UNION ALL SELECT pk, col0 FROM view_2_tab2_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 10 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_471 UNION SELECT pk, col0 FROM view_2_tab2_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 10 ) AS tab2_471
----
3
6

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_471
----
3
6

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE col0 < 10
----
3
6

statement ok
DROP VIEW view_1_tab2_471

statement ok
DROP VIEW view_2_tab2_471

statement ok
DROP VIEW view_3_tab2_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_471') DROP VIEW view_1_tab3_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_471') DROP VIEW view_2_tab3_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_471') DROP VIEW view_3_tab3_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_471

statement ok
CREATE VIEW view_1_tab3_471 AS SELECT pk, col0 FROM tab3 WHERE col0 < 10

statement ok
CREATE VIEW view_2_tab3_471 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 10)

statement ok
CREATE VIEW view_3_tab3_471 AS SELECT pk FROM view_1_tab3_471

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE col0 < 10
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 10)
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_471
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_471
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 10 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_471 UNION ALL SELECT pk, col0 FROM view_2_tab3_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 10 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_471 UNION SELECT pk, col0 FROM view_2_tab3_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 10 ) AS tab3_471
----
3
6

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_471
----
3
6

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE col0 < 10
----
3
6

statement ok
DROP VIEW view_1_tab3_471

statement ok
DROP VIEW view_2_tab3_471

statement ok
DROP VIEW view_3_tab3_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_471') DROP VIEW view_1_tab4_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_471') DROP VIEW view_2_tab4_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_471') DROP VIEW view_3_tab4_471

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_471

statement ok
CREATE VIEW view_1_tab4_471 AS SELECT pk, col0 FROM tab4 WHERE col0 < 10

statement ok
CREATE VIEW view_2_tab4_471 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 10)

statement ok
CREATE VIEW view_3_tab4_471 AS SELECT pk FROM view_1_tab4_471

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE col0 < 10
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 10)
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_471
----
3
6
6
7

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_471
----
16 values hashing to 7a264e3f974f0596c7afd611995d3db8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 10 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_471 UNION ALL SELECT pk, col0 FROM view_2_tab4_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 10 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_471 UNION SELECT pk, col0 FROM view_2_tab4_471
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 10 ) AS tab4_471
----
3
6

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_471
----
3
6

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE col0 < 10
----
3
6

statement ok
DROP VIEW view_1_tab4_471

statement ok
DROP VIEW view_2_tab4_471

statement ok
DROP VIEW view_3_tab4_471

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_472') DROP VIEW view_1_tab0_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_472') DROP VIEW view_2_tab0_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_472') DROP VIEW view_3_tab0_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_472

statement ok
CREATE VIEW view_1_tab0_472 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab0_472 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_472 AS SELECT pk FROM view_1_tab0_472

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_472
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_472 UNION ALL SELECT pk, col0 FROM view_2_tab0_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_472 UNION SELECT pk, col0 FROM view_2_tab0_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) ) AS tab0_472
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_472
----

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab0_472

statement ok
DROP VIEW view_2_tab0_472

statement ok
DROP VIEW view_3_tab0_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_472') DROP VIEW view_1_tab1_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_472') DROP VIEW view_2_tab1_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_472') DROP VIEW view_3_tab1_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_472

statement ok
CREATE VIEW view_1_tab1_472 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab1_472 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_472 AS SELECT pk FROM view_1_tab1_472

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_472
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_472 UNION ALL SELECT pk, col0 FROM view_2_tab1_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_472 UNION SELECT pk, col0 FROM view_2_tab1_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) ) AS tab1_472
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_472
----

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab1_472

statement ok
DROP VIEW view_2_tab1_472

statement ok
DROP VIEW view_3_tab1_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_472') DROP VIEW view_1_tab2_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_472') DROP VIEW view_2_tab2_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_472') DROP VIEW view_3_tab2_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_472

statement ok
CREATE VIEW view_1_tab2_472 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab2_472 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_472 AS SELECT pk FROM view_1_tab2_472

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_472
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_472 UNION ALL SELECT pk, col0 FROM view_2_tab2_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_472 UNION SELECT pk, col0 FROM view_2_tab2_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) ) AS tab2_472
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_472
----

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab2_472

statement ok
DROP VIEW view_2_tab2_472

statement ok
DROP VIEW view_3_tab2_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_472') DROP VIEW view_1_tab3_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_472') DROP VIEW view_2_tab3_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_472') DROP VIEW view_3_tab3_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_472

statement ok
CREATE VIEW view_1_tab3_472 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab3_472 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_472 AS SELECT pk FROM view_1_tab3_472

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_472
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_472 UNION ALL SELECT pk, col0 FROM view_2_tab3_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_472 UNION SELECT pk, col0 FROM view_2_tab3_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) ) AS tab3_472
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_472
----

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab3_472

statement ok
DROP VIEW view_2_tab3_472

statement ok
DROP VIEW view_3_tab3_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_472') DROP VIEW view_1_tab4_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_472') DROP VIEW view_2_tab4_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_472') DROP VIEW view_3_tab4_472

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_472

statement ok
CREATE VIEW view_1_tab4_472 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))

statement ok
CREATE VIEW view_2_tab4_472 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_472 AS SELECT pk FROM view_1_tab4_472

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_472
----

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_472 UNION ALL SELECT pk, col0 FROM view_2_tab4_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_472 UNION SELECT pk, col0 FROM view_2_tab4_472
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL)) ) AS tab4_472
----

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_472
----

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE (col3 < 99 AND col1 = 64.91) AND ((col0 IS NULL))
----

statement ok
DROP VIEW view_1_tab4_472

statement ok
DROP VIEW view_2_tab4_472

statement ok
DROP VIEW view_3_tab4_472

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_473') DROP VIEW view_1_tab0_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_473') DROP VIEW view_2_tab0_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_473') DROP VIEW view_3_tab0_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_473

statement ok
CREATE VIEW view_1_tab0_473 AS SELECT pk, col0 FROM tab0 WHERE col4 < 55.35

statement ok
CREATE VIEW view_2_tab0_473 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 55.35)

statement ok
CREATE VIEW view_3_tab0_473 AS SELECT pk FROM view_1_tab0_473

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE col4 < 55.35
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 55.35)
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_473
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_473
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 55.35 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_473 UNION ALL SELECT pk, col0 FROM view_2_tab0_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 55.35 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_473 UNION SELECT pk, col0 FROM view_2_tab0_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 55.35 ) AS tab0_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE col4 < 55.35
----
0
1
2
5
9

statement ok
DROP VIEW view_1_tab0_473

statement ok
DROP VIEW view_2_tab0_473

statement ok
DROP VIEW view_3_tab0_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_473') DROP VIEW view_1_tab1_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_473') DROP VIEW view_2_tab1_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_473') DROP VIEW view_3_tab1_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_473

statement ok
CREATE VIEW view_1_tab1_473 AS SELECT pk, col0 FROM tab1 WHERE col4 < 55.35

statement ok
CREATE VIEW view_2_tab1_473 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 55.35)

statement ok
CREATE VIEW view_3_tab1_473 AS SELECT pk FROM view_1_tab1_473

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE col4 < 55.35
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 55.35)
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_473
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_473
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 55.35 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_473 UNION ALL SELECT pk, col0 FROM view_2_tab1_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 55.35 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_473 UNION SELECT pk, col0 FROM view_2_tab1_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 55.35 ) AS tab1_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE col4 < 55.35
----
0
1
2
5
9

statement ok
DROP VIEW view_1_tab1_473

statement ok
DROP VIEW view_2_tab1_473

statement ok
DROP VIEW view_3_tab1_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_473') DROP VIEW view_1_tab2_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_473') DROP VIEW view_2_tab2_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_473') DROP VIEW view_3_tab2_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_473

statement ok
CREATE VIEW view_1_tab2_473 AS SELECT pk, col0 FROM tab2 WHERE col4 < 55.35

statement ok
CREATE VIEW view_2_tab2_473 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 55.35)

statement ok
CREATE VIEW view_3_tab2_473 AS SELECT pk FROM view_1_tab2_473

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE col4 < 55.35
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 55.35)
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_473
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_473
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 55.35 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_473 UNION ALL SELECT pk, col0 FROM view_2_tab2_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 55.35 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_473 UNION SELECT pk, col0 FROM view_2_tab2_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 55.35 ) AS tab2_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE col4 < 55.35
----
0
1
2
5
9

statement ok
DROP VIEW view_1_tab2_473

statement ok
DROP VIEW view_2_tab2_473

statement ok
DROP VIEW view_3_tab2_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_473') DROP VIEW view_1_tab3_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_473') DROP VIEW view_2_tab3_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_473') DROP VIEW view_3_tab3_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_473

statement ok
CREATE VIEW view_1_tab3_473 AS SELECT pk, col0 FROM tab3 WHERE col4 < 55.35

statement ok
CREATE VIEW view_2_tab3_473 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 55.35)

statement ok
CREATE VIEW view_3_tab3_473 AS SELECT pk FROM view_1_tab3_473

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE col4 < 55.35
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 55.35)
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_473
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_473
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 55.35 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_473 UNION ALL SELECT pk, col0 FROM view_2_tab3_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 55.35 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_473 UNION SELECT pk, col0 FROM view_2_tab3_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 55.35 ) AS tab3_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE col4 < 55.35
----
0
1
2
5
9

statement ok
DROP VIEW view_1_tab3_473

statement ok
DROP VIEW view_2_tab3_473

statement ok
DROP VIEW view_3_tab3_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_473') DROP VIEW view_1_tab4_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_473') DROP VIEW view_2_tab4_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_473') DROP VIEW view_3_tab4_473

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_473

statement ok
CREATE VIEW view_1_tab4_473 AS SELECT pk, col0 FROM tab4 WHERE col4 < 55.35

statement ok
CREATE VIEW view_2_tab4_473 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 55.35)

statement ok
CREATE VIEW view_3_tab4_473 AS SELECT pk FROM view_1_tab4_473

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE col4 < 55.35
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 55.35)
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_473
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_473
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 55.35 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_473 UNION ALL SELECT pk, col0 FROM view_2_tab4_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 55.35 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 55.35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_473 UNION SELECT pk, col0 FROM view_2_tab4_473
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 55.35 ) AS tab4_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_473
----
0
1
2
5
9

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE col4 < 55.35
----
0
1
2
5
9

statement ok
DROP VIEW view_1_tab4_473

statement ok
DROP VIEW view_2_tab4_473

statement ok
DROP VIEW view_3_tab4_473

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_474') DROP VIEW view_1_tab0_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_474') DROP VIEW view_2_tab0_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_474') DROP VIEW view_3_tab0_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_474

statement ok
CREATE VIEW view_1_tab0_474 AS SELECT pk, col0 FROM tab0 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)

statement ok
CREATE VIEW view_2_tab0_474 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))

statement ok
CREATE VIEW view_3_tab0_474 AS SELECT pk FROM view_1_tab0_474

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_474
----

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_474 UNION ALL SELECT pk, col0 FROM view_2_tab0_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_474 UNION SELECT pk, col0 FROM view_2_tab0_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) ) AS tab0_474
----

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_474
----

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

statement ok
DROP VIEW view_1_tab0_474

statement ok
DROP VIEW view_2_tab0_474

statement ok
DROP VIEW view_3_tab0_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_474') DROP VIEW view_1_tab1_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_474') DROP VIEW view_2_tab1_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_474') DROP VIEW view_3_tab1_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_474

statement ok
CREATE VIEW view_1_tab1_474 AS SELECT pk, col0 FROM tab1 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)

statement ok
CREATE VIEW view_2_tab1_474 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))

statement ok
CREATE VIEW view_3_tab1_474 AS SELECT pk FROM view_1_tab1_474

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_474
----

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_474 UNION ALL SELECT pk, col0 FROM view_2_tab1_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_474 UNION SELECT pk, col0 FROM view_2_tab1_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) ) AS tab1_474
----

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_474
----

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

statement ok
DROP VIEW view_1_tab1_474

statement ok
DROP VIEW view_2_tab1_474

statement ok
DROP VIEW view_3_tab1_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_474') DROP VIEW view_1_tab2_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_474') DROP VIEW view_2_tab2_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_474') DROP VIEW view_3_tab2_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_474

statement ok
CREATE VIEW view_1_tab2_474 AS SELECT pk, col0 FROM tab2 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)

statement ok
CREATE VIEW view_2_tab2_474 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))

statement ok
CREATE VIEW view_3_tab2_474 AS SELECT pk FROM view_1_tab2_474

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_474
----

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_474 UNION ALL SELECT pk, col0 FROM view_2_tab2_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_474 UNION SELECT pk, col0 FROM view_2_tab2_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) ) AS tab2_474
----

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_474
----

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

statement ok
DROP VIEW view_1_tab2_474

statement ok
DROP VIEW view_2_tab2_474

statement ok
DROP VIEW view_3_tab2_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_474') DROP VIEW view_1_tab3_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_474') DROP VIEW view_2_tab3_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_474') DROP VIEW view_3_tab3_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_474

statement ok
CREATE VIEW view_1_tab3_474 AS SELECT pk, col0 FROM tab3 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)

statement ok
CREATE VIEW view_2_tab3_474 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))

statement ok
CREATE VIEW view_3_tab3_474 AS SELECT pk FROM view_1_tab3_474

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_474
----

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_474 UNION ALL SELECT pk, col0 FROM view_2_tab3_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_474 UNION SELECT pk, col0 FROM view_2_tab3_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) ) AS tab3_474
----

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_474
----

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

statement ok
DROP VIEW view_1_tab3_474

statement ok
DROP VIEW view_2_tab3_474

statement ok
DROP VIEW view_3_tab3_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_474') DROP VIEW view_1_tab4_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_474') DROP VIEW view_2_tab4_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_474') DROP VIEW view_3_tab4_474

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_474

statement ok
CREATE VIEW view_1_tab4_474 AS SELECT pk, col0 FROM tab4 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)

statement ok
CREATE VIEW view_2_tab4_474 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))

statement ok
CREATE VIEW view_3_tab4_474 AS SELECT pk FROM view_1_tab4_474

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_474
----

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_474 UNION ALL SELECT pk, col0 FROM view_2_tab4_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 42) AND (col4 IS NULL) AND (col0 < 25))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_474 UNION SELECT pk, col0 FROM view_2_tab4_474
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25) ) AS tab4_474
----

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_474
----

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE (col3 <= 42) AND (col4 IS NULL) AND (col0 < 25)
----

statement ok
DROP VIEW view_1_tab4_474

statement ok
DROP VIEW view_2_tab4_474

statement ok
DROP VIEW view_3_tab4_474

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_475') DROP VIEW view_1_tab0_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_475') DROP VIEW view_2_tab0_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_475') DROP VIEW view_3_tab0_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_475

statement ok
CREATE VIEW view_1_tab0_475 AS SELECT pk, col0 FROM tab0 WHERE col1 IS NULL

statement ok
CREATE VIEW view_2_tab0_475 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL)

statement ok
CREATE VIEW view_3_tab0_475 AS SELECT pk FROM view_1_tab0_475

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col1 IS NULL
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_475
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IS NULL UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_475 UNION ALL SELECT pk, col0 FROM view_2_tab0_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IS NULL UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_475 UNION SELECT pk, col0 FROM view_2_tab0_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 IS NULL ) AS tab0_475
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_475
----

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col1 IS NULL
----

statement ok
DROP VIEW view_1_tab0_475

statement ok
DROP VIEW view_2_tab0_475

statement ok
DROP VIEW view_3_tab0_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_475') DROP VIEW view_1_tab1_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_475') DROP VIEW view_2_tab1_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_475') DROP VIEW view_3_tab1_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_475

statement ok
CREATE VIEW view_1_tab1_475 AS SELECT pk, col0 FROM tab1 WHERE col1 IS NULL

statement ok
CREATE VIEW view_2_tab1_475 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL)

statement ok
CREATE VIEW view_3_tab1_475 AS SELECT pk FROM view_1_tab1_475

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col1 IS NULL
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_475
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IS NULL UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_475 UNION ALL SELECT pk, col0 FROM view_2_tab1_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IS NULL UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_475 UNION SELECT pk, col0 FROM view_2_tab1_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 IS NULL ) AS tab1_475
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_475
----

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col1 IS NULL
----

statement ok
DROP VIEW view_1_tab1_475

statement ok
DROP VIEW view_2_tab1_475

statement ok
DROP VIEW view_3_tab1_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_475') DROP VIEW view_1_tab2_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_475') DROP VIEW view_2_tab2_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_475') DROP VIEW view_3_tab2_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_475

statement ok
CREATE VIEW view_1_tab2_475 AS SELECT pk, col0 FROM tab2 WHERE col1 IS NULL

statement ok
CREATE VIEW view_2_tab2_475 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL)

statement ok
CREATE VIEW view_3_tab2_475 AS SELECT pk FROM view_1_tab2_475

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col1 IS NULL
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_475
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IS NULL UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_475 UNION ALL SELECT pk, col0 FROM view_2_tab2_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IS NULL UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_475 UNION SELECT pk, col0 FROM view_2_tab2_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 IS NULL ) AS tab2_475
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_475
----

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col1 IS NULL
----

statement ok
DROP VIEW view_1_tab2_475

statement ok
DROP VIEW view_2_tab2_475

statement ok
DROP VIEW view_3_tab2_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_475') DROP VIEW view_1_tab3_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_475') DROP VIEW view_2_tab3_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_475') DROP VIEW view_3_tab3_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_475

statement ok
CREATE VIEW view_1_tab3_475 AS SELECT pk, col0 FROM tab3 WHERE col1 IS NULL

statement ok
CREATE VIEW view_2_tab3_475 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL)

statement ok
CREATE VIEW view_3_tab3_475 AS SELECT pk FROM view_1_tab3_475

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col1 IS NULL
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_475
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IS NULL UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_475 UNION ALL SELECT pk, col0 FROM view_2_tab3_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IS NULL UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_475 UNION SELECT pk, col0 FROM view_2_tab3_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 IS NULL ) AS tab3_475
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_475
----

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col1 IS NULL
----

statement ok
DROP VIEW view_1_tab3_475

statement ok
DROP VIEW view_2_tab3_475

statement ok
DROP VIEW view_3_tab3_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_475') DROP VIEW view_1_tab4_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_475') DROP VIEW view_2_tab4_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_475') DROP VIEW view_3_tab4_475

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_475

statement ok
CREATE VIEW view_1_tab4_475 AS SELECT pk, col0 FROM tab4 WHERE col1 IS NULL

statement ok
CREATE VIEW view_2_tab4_475 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL)

statement ok
CREATE VIEW view_3_tab4_475 AS SELECT pk FROM view_1_tab4_475

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col1 IS NULL
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_475
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IS NULL UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_475 UNION ALL SELECT pk, col0 FROM view_2_tab4_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IS NULL UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_475 UNION SELECT pk, col0 FROM view_2_tab4_475
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 IS NULL ) AS tab4_475
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_475
----

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col1 IS NULL
----

statement ok
DROP VIEW view_1_tab4_475

statement ok
DROP VIEW view_2_tab4_475

statement ok
DROP VIEW view_3_tab4_475

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_476') DROP VIEW view_1_tab0_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_476') DROP VIEW view_2_tab0_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_476') DROP VIEW view_3_tab0_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_476

statement ok
CREATE VIEW view_1_tab0_476 AS SELECT pk, col0 FROM tab0 WHERE col4 > 65.10

statement ok
CREATE VIEW view_2_tab0_476 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 65.10)

statement ok
CREATE VIEW view_3_tab0_476 AS SELECT pk FROM view_1_tab0_476

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE col4 > 65.10
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 65.10)
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_476
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_476
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 65.10 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_476 UNION ALL SELECT pk, col0 FROM view_2_tab0_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 65.10 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_476 UNION SELECT pk, col0 FROM view_2_tab0_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 65.10 ) AS tab0_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE col4 > 65.10
----
3
4
6
7
8

statement ok
DROP VIEW view_1_tab0_476

statement ok
DROP VIEW view_2_tab0_476

statement ok
DROP VIEW view_3_tab0_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_476') DROP VIEW view_1_tab1_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_476') DROP VIEW view_2_tab1_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_476') DROP VIEW view_3_tab1_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_476

statement ok
CREATE VIEW view_1_tab1_476 AS SELECT pk, col0 FROM tab1 WHERE col4 > 65.10

statement ok
CREATE VIEW view_2_tab1_476 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 65.10)

statement ok
CREATE VIEW view_3_tab1_476 AS SELECT pk FROM view_1_tab1_476

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE col4 > 65.10
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 65.10)
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_476
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_476
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 65.10 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_476 UNION ALL SELECT pk, col0 FROM view_2_tab1_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 65.10 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_476 UNION SELECT pk, col0 FROM view_2_tab1_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 65.10 ) AS tab1_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE col4 > 65.10
----
3
4
6
7
8

statement ok
DROP VIEW view_1_tab1_476

statement ok
DROP VIEW view_2_tab1_476

statement ok
DROP VIEW view_3_tab1_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_476') DROP VIEW view_1_tab2_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_476') DROP VIEW view_2_tab2_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_476') DROP VIEW view_3_tab2_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_476

statement ok
CREATE VIEW view_1_tab2_476 AS SELECT pk, col0 FROM tab2 WHERE col4 > 65.10

statement ok
CREATE VIEW view_2_tab2_476 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 65.10)

statement ok
CREATE VIEW view_3_tab2_476 AS SELECT pk FROM view_1_tab2_476

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE col4 > 65.10
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 65.10)
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_476
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_476
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 65.10 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_476 UNION ALL SELECT pk, col0 FROM view_2_tab2_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 65.10 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_476 UNION SELECT pk, col0 FROM view_2_tab2_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 65.10 ) AS tab2_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE col4 > 65.10
----
3
4
6
7
8

statement ok
DROP VIEW view_1_tab2_476

statement ok
DROP VIEW view_2_tab2_476

statement ok
DROP VIEW view_3_tab2_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_476') DROP VIEW view_1_tab3_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_476') DROP VIEW view_2_tab3_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_476') DROP VIEW view_3_tab3_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_476

statement ok
CREATE VIEW view_1_tab3_476 AS SELECT pk, col0 FROM tab3 WHERE col4 > 65.10

statement ok
CREATE VIEW view_2_tab3_476 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 65.10)

statement ok
CREATE VIEW view_3_tab3_476 AS SELECT pk FROM view_1_tab3_476

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE col4 > 65.10
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 65.10)
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_476
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_476
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 65.10 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_476 UNION ALL SELECT pk, col0 FROM view_2_tab3_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 65.10 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_476 UNION SELECT pk, col0 FROM view_2_tab3_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 65.10 ) AS tab3_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE col4 > 65.10
----
3
4
6
7
8

statement ok
DROP VIEW view_1_tab3_476

statement ok
DROP VIEW view_2_tab3_476

statement ok
DROP VIEW view_3_tab3_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_476') DROP VIEW view_1_tab4_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_476') DROP VIEW view_2_tab4_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_476') DROP VIEW view_3_tab4_476

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_476

statement ok
CREATE VIEW view_1_tab4_476 AS SELECT pk, col0 FROM tab4 WHERE col4 > 65.10

statement ok
CREATE VIEW view_2_tab4_476 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 65.10)

statement ok
CREATE VIEW view_3_tab4_476 AS SELECT pk FROM view_1_tab4_476

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE col4 > 65.10
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 65.10)
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_476
----
10 values hashing to 020c92f336a151bffe9e84f77ffe5436

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_476
----
10 values hashing to ff5fbe27d6b99361881d242731d54892

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 65.10 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_476 UNION ALL SELECT pk, col0 FROM view_2_tab4_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 65.10 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 65.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_476 UNION SELECT pk, col0 FROM view_2_tab4_476
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 65.10 ) AS tab4_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_476
----
3
4
6
7
8

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE col4 > 65.10
----
3
4
6
7
8

statement ok
DROP VIEW view_1_tab4_476

statement ok
DROP VIEW view_2_tab4_476

statement ok
DROP VIEW view_3_tab4_476

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_477') DROP VIEW view_1_tab0_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_477') DROP VIEW view_2_tab0_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_477') DROP VIEW view_3_tab0_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_477

statement ok
CREATE VIEW view_1_tab0_477 AS SELECT pk, col0 FROM tab0 WHERE col1 < 29.2

statement ok
CREATE VIEW view_2_tab0_477 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 29.2)

statement ok
CREATE VIEW view_3_tab0_477 AS SELECT pk FROM view_1_tab0_477

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col1 < 29.2
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 29.2)
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_477
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_477
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 29.2 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_477 UNION ALL SELECT pk, col0 FROM view_2_tab0_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 29.2 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_477 UNION SELECT pk, col0 FROM view_2_tab0_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 29.2 ) AS tab0_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col1 < 29.2
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab0_477

statement ok
DROP VIEW view_2_tab0_477

statement ok
DROP VIEW view_3_tab0_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_477') DROP VIEW view_1_tab1_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_477') DROP VIEW view_2_tab1_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_477') DROP VIEW view_3_tab1_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_477

statement ok
CREATE VIEW view_1_tab1_477 AS SELECT pk, col0 FROM tab1 WHERE col1 < 29.2

statement ok
CREATE VIEW view_2_tab1_477 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 29.2)

statement ok
CREATE VIEW view_3_tab1_477 AS SELECT pk FROM view_1_tab1_477

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col1 < 29.2
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 29.2)
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_477
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_477
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 29.2 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_477 UNION ALL SELECT pk, col0 FROM view_2_tab1_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 29.2 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_477 UNION SELECT pk, col0 FROM view_2_tab1_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 29.2 ) AS tab1_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col1 < 29.2
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab1_477

statement ok
DROP VIEW view_2_tab1_477

statement ok
DROP VIEW view_3_tab1_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_477') DROP VIEW view_1_tab2_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_477') DROP VIEW view_2_tab2_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_477') DROP VIEW view_3_tab2_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_477

statement ok
CREATE VIEW view_1_tab2_477 AS SELECT pk, col0 FROM tab2 WHERE col1 < 29.2

statement ok
CREATE VIEW view_2_tab2_477 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 29.2)

statement ok
CREATE VIEW view_3_tab2_477 AS SELECT pk FROM view_1_tab2_477

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col1 < 29.2
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 29.2)
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_477
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_477
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 29.2 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_477 UNION ALL SELECT pk, col0 FROM view_2_tab2_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 29.2 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_477 UNION SELECT pk, col0 FROM view_2_tab2_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 29.2 ) AS tab2_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col1 < 29.2
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab2_477

statement ok
DROP VIEW view_2_tab2_477

statement ok
DROP VIEW view_3_tab2_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_477') DROP VIEW view_1_tab3_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_477') DROP VIEW view_2_tab3_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_477') DROP VIEW view_3_tab3_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_477

statement ok
CREATE VIEW view_1_tab3_477 AS SELECT pk, col0 FROM tab3 WHERE col1 < 29.2

statement ok
CREATE VIEW view_2_tab3_477 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 29.2)

statement ok
CREATE VIEW view_3_tab3_477 AS SELECT pk FROM view_1_tab3_477

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col1 < 29.2
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 29.2)
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_477
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_477
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 29.2 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_477 UNION ALL SELECT pk, col0 FROM view_2_tab3_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 29.2 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_477 UNION SELECT pk, col0 FROM view_2_tab3_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 29.2 ) AS tab3_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col1 < 29.2
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab3_477

statement ok
DROP VIEW view_2_tab3_477

statement ok
DROP VIEW view_3_tab3_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_477') DROP VIEW view_1_tab4_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_477') DROP VIEW view_2_tab4_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_477') DROP VIEW view_3_tab4_477

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_477

statement ok
CREATE VIEW view_1_tab4_477 AS SELECT pk, col0 FROM tab4 WHERE col1 < 29.2

statement ok
CREATE VIEW view_2_tab4_477 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 29.2)

statement ok
CREATE VIEW view_3_tab4_477 AS SELECT pk FROM view_1_tab4_477

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col1 < 29.2
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 29.2)
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_477
----
10 values hashing to 3a1b538f82904c206d6f8c57a8cc802a

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_477
----
10 values hashing to 156a0fed2b7f2322597b11eed598681a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 29.2 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_477 UNION ALL SELECT pk, col0 FROM view_2_tab4_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 29.2 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 29.2)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_477 UNION SELECT pk, col0 FROM view_2_tab4_477
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 29.2 ) AS tab4_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_477
----
2
3
4
8
9

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col1 < 29.2
----
2
3
4
8
9

statement ok
DROP VIEW view_1_tab4_477

statement ok
DROP VIEW view_2_tab4_477

statement ok
DROP VIEW view_3_tab4_477

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_478') DROP VIEW view_1_tab0_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_478') DROP VIEW view_2_tab0_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_478') DROP VIEW view_3_tab0_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_478

statement ok
CREATE VIEW view_1_tab0_478 AS SELECT pk, col0 FROM tab0 WHERE col1 = 6.62

statement ok
CREATE VIEW view_2_tab0_478 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 6.62)

statement ok
CREATE VIEW view_3_tab0_478 AS SELECT pk FROM view_1_tab0_478

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col1 = 6.62
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_478
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 6.62 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_478 UNION ALL SELECT pk, col0 FROM view_2_tab0_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 = 6.62 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_478 UNION SELECT pk, col0 FROM view_2_tab0_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 = 6.62 ) AS tab0_478
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_478
----

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col1 = 6.62
----

statement ok
DROP VIEW view_1_tab0_478

statement ok
DROP VIEW view_2_tab0_478

statement ok
DROP VIEW view_3_tab0_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_478') DROP VIEW view_1_tab1_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_478') DROP VIEW view_2_tab1_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_478') DROP VIEW view_3_tab1_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_478

statement ok
CREATE VIEW view_1_tab1_478 AS SELECT pk, col0 FROM tab1 WHERE col1 = 6.62

statement ok
CREATE VIEW view_2_tab1_478 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 6.62)

statement ok
CREATE VIEW view_3_tab1_478 AS SELECT pk FROM view_1_tab1_478

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col1 = 6.62
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_478
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 6.62 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_478 UNION ALL SELECT pk, col0 FROM view_2_tab1_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 = 6.62 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_478 UNION SELECT pk, col0 FROM view_2_tab1_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 = 6.62 ) AS tab1_478
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_478
----

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col1 = 6.62
----

statement ok
DROP VIEW view_1_tab1_478

statement ok
DROP VIEW view_2_tab1_478

statement ok
DROP VIEW view_3_tab1_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_478') DROP VIEW view_1_tab2_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_478') DROP VIEW view_2_tab2_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_478') DROP VIEW view_3_tab2_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_478

statement ok
CREATE VIEW view_1_tab2_478 AS SELECT pk, col0 FROM tab2 WHERE col1 = 6.62

statement ok
CREATE VIEW view_2_tab2_478 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 6.62)

statement ok
CREATE VIEW view_3_tab2_478 AS SELECT pk FROM view_1_tab2_478

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col1 = 6.62
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_478
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 6.62 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_478 UNION ALL SELECT pk, col0 FROM view_2_tab2_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 = 6.62 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_478 UNION SELECT pk, col0 FROM view_2_tab2_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 = 6.62 ) AS tab2_478
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_478
----

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col1 = 6.62
----

statement ok
DROP VIEW view_1_tab2_478

statement ok
DROP VIEW view_2_tab2_478

statement ok
DROP VIEW view_3_tab2_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_478') DROP VIEW view_1_tab3_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_478') DROP VIEW view_2_tab3_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_478') DROP VIEW view_3_tab3_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_478

statement ok
CREATE VIEW view_1_tab3_478 AS SELECT pk, col0 FROM tab3 WHERE col1 = 6.62

statement ok
CREATE VIEW view_2_tab3_478 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 6.62)

statement ok
CREATE VIEW view_3_tab3_478 AS SELECT pk FROM view_1_tab3_478

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col1 = 6.62
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_478
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 6.62 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_478 UNION ALL SELECT pk, col0 FROM view_2_tab3_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 = 6.62 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_478 UNION SELECT pk, col0 FROM view_2_tab3_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 = 6.62 ) AS tab3_478
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_478
----

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col1 = 6.62
----

statement ok
DROP VIEW view_1_tab3_478

statement ok
DROP VIEW view_2_tab3_478

statement ok
DROP VIEW view_3_tab3_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_478') DROP VIEW view_1_tab4_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_478') DROP VIEW view_2_tab4_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_478') DROP VIEW view_3_tab4_478

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_478

statement ok
CREATE VIEW view_1_tab4_478 AS SELECT pk, col0 FROM tab4 WHERE col1 = 6.62

statement ok
CREATE VIEW view_2_tab4_478 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 6.62)

statement ok
CREATE VIEW view_3_tab4_478 AS SELECT pk FROM view_1_tab4_478

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col1 = 6.62
----

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_478
----

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 6.62 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_478 UNION ALL SELECT pk, col0 FROM view_2_tab4_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 = 6.62 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 = 6.62)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_478 UNION SELECT pk, col0 FROM view_2_tab4_478
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 = 6.62 ) AS tab4_478
----

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_478
----

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col1 = 6.62
----

statement ok
DROP VIEW view_1_tab4_478

statement ok
DROP VIEW view_2_tab4_478

statement ok
DROP VIEW view_3_tab4_478

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_479') DROP VIEW view_1_tab0_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_479') DROP VIEW view_2_tab0_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_479') DROP VIEW view_3_tab0_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_479

statement ok
CREATE VIEW view_1_tab0_479 AS SELECT pk, col0 FROM tab0 WHERE col3 < 66

statement ok
CREATE VIEW view_2_tab0_479 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 66)

statement ok
CREATE VIEW view_3_tab0_479 AS SELECT pk FROM view_1_tab0_479

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE col3 < 66
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 66)
----
1
65
3
6
7
52

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_479
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_479
----
1
65
3
6
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 66 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_479 UNION ALL SELECT pk, col0 FROM view_2_tab0_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 66 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_479 UNION SELECT pk, col0 FROM view_2_tab0_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 66 ) AS tab0_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE col3 < 66
----
0
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab0_479

statement ok
DROP VIEW view_2_tab0_479

statement ok
DROP VIEW view_3_tab0_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_479') DROP VIEW view_1_tab1_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_479') DROP VIEW view_2_tab1_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_479') DROP VIEW view_3_tab1_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_479

statement ok
CREATE VIEW view_1_tab1_479 AS SELECT pk, col0 FROM tab1 WHERE col3 < 66

statement ok
CREATE VIEW view_2_tab1_479 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 66)

statement ok
CREATE VIEW view_3_tab1_479 AS SELECT pk FROM view_1_tab1_479

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE col3 < 66
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 66)
----
1
65
3
6
7
52

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_479
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_479
----
1
65
3
6
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 66 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_479 UNION ALL SELECT pk, col0 FROM view_2_tab1_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 66 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_479 UNION SELECT pk, col0 FROM view_2_tab1_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 66 ) AS tab1_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE col3 < 66
----
0
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab1_479

statement ok
DROP VIEW view_2_tab1_479

statement ok
DROP VIEW view_3_tab1_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_479') DROP VIEW view_1_tab2_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_479') DROP VIEW view_2_tab2_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_479') DROP VIEW view_3_tab2_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_479

statement ok
CREATE VIEW view_1_tab2_479 AS SELECT pk, col0 FROM tab2 WHERE col3 < 66

statement ok
CREATE VIEW view_2_tab2_479 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 66)

statement ok
CREATE VIEW view_3_tab2_479 AS SELECT pk FROM view_1_tab2_479

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE col3 < 66
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 66)
----
1
65
3
6
7
52

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_479
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_479
----
1
65
3
6
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 66 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_479 UNION ALL SELECT pk, col0 FROM view_2_tab2_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 66 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_479 UNION SELECT pk, col0 FROM view_2_tab2_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 66 ) AS tab2_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE col3 < 66
----
0
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab2_479

statement ok
DROP VIEW view_2_tab2_479

statement ok
DROP VIEW view_3_tab2_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_479') DROP VIEW view_1_tab3_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_479') DROP VIEW view_2_tab3_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_479') DROP VIEW view_3_tab3_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_479

statement ok
CREATE VIEW view_1_tab3_479 AS SELECT pk, col0 FROM tab3 WHERE col3 < 66

statement ok
CREATE VIEW view_2_tab3_479 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 66)

statement ok
CREATE VIEW view_3_tab3_479 AS SELECT pk FROM view_1_tab3_479

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE col3 < 66
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 66)
----
1
65
3
6
7
52

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_479
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_479
----
1
65
3
6
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 66 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_479 UNION ALL SELECT pk, col0 FROM view_2_tab3_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 66 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_479 UNION SELECT pk, col0 FROM view_2_tab3_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 66 ) AS tab3_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE col3 < 66
----
0
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab3_479

statement ok
DROP VIEW view_2_tab3_479

statement ok
DROP VIEW view_3_tab3_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_479') DROP VIEW view_1_tab4_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_479') DROP VIEW view_2_tab4_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_479') DROP VIEW view_3_tab4_479

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_479

statement ok
CREATE VIEW view_1_tab4_479 AS SELECT pk, col0 FROM tab4 WHERE col3 < 66

statement ok
CREATE VIEW view_2_tab4_479 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 66)

statement ok
CREATE VIEW view_3_tab4_479 AS SELECT pk FROM view_1_tab4_479

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE col3 < 66
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 66)
----
1
65
3
6
7
52

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_479
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_479
----
1
65
3
6
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 66 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_479 UNION ALL SELECT pk, col0 FROM view_2_tab4_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 66 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 66)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_479 UNION SELECT pk, col0 FROM view_2_tab4_479
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 66 ) AS tab4_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_479
----
0
2
4
5
6
8
9

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE col3 < 66
----
0
2
4
5
6
8
9

statement ok
DROP VIEW view_1_tab4_479

statement ok
DROP VIEW view_2_tab4_479

statement ok
DROP VIEW view_3_tab4_479

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_480') DROP VIEW view_1_tab0_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_480') DROP VIEW view_2_tab0_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_480') DROP VIEW view_3_tab0_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_480

statement ok
CREATE VIEW view_1_tab0_480 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col4 < 45.69

statement ok
CREATE VIEW view_2_tab0_480 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col4 < 45.69)

statement ok
CREATE VIEW view_3_tab0_480 AS SELECT pk FROM view_1_tab0_480

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col4 < 45.69
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_480
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col4 < 45.69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_480 UNION ALL SELECT pk, col0 FROM view_2_tab0_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col4 < 45.69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_480 UNION SELECT pk, col0 FROM view_2_tab0_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL AND col4 < 45.69 ) AS tab0_480
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_480
----

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE col0 IS NULL AND col4 < 45.69
----

statement ok
DROP VIEW view_1_tab0_480

statement ok
DROP VIEW view_2_tab0_480

statement ok
DROP VIEW view_3_tab0_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_480') DROP VIEW view_1_tab1_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_480') DROP VIEW view_2_tab1_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_480') DROP VIEW view_3_tab1_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_480

statement ok
CREATE VIEW view_1_tab1_480 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col4 < 45.69

statement ok
CREATE VIEW view_2_tab1_480 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col4 < 45.69)

statement ok
CREATE VIEW view_3_tab1_480 AS SELECT pk FROM view_1_tab1_480

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col4 < 45.69
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_480
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col4 < 45.69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_480 UNION ALL SELECT pk, col0 FROM view_2_tab1_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col4 < 45.69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_480 UNION SELECT pk, col0 FROM view_2_tab1_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL AND col4 < 45.69 ) AS tab1_480
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_480
----

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE col0 IS NULL AND col4 < 45.69
----

statement ok
DROP VIEW view_1_tab1_480

statement ok
DROP VIEW view_2_tab1_480

statement ok
DROP VIEW view_3_tab1_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_480') DROP VIEW view_1_tab2_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_480') DROP VIEW view_2_tab2_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_480') DROP VIEW view_3_tab2_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_480

statement ok
CREATE VIEW view_1_tab2_480 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col4 < 45.69

statement ok
CREATE VIEW view_2_tab2_480 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col4 < 45.69)

statement ok
CREATE VIEW view_3_tab2_480 AS SELECT pk FROM view_1_tab2_480

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col4 < 45.69
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_480
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col4 < 45.69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_480 UNION ALL SELECT pk, col0 FROM view_2_tab2_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col4 < 45.69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_480 UNION SELECT pk, col0 FROM view_2_tab2_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL AND col4 < 45.69 ) AS tab2_480
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_480
----

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE col0 IS NULL AND col4 < 45.69
----

statement ok
DROP VIEW view_1_tab2_480

statement ok
DROP VIEW view_2_tab2_480

statement ok
DROP VIEW view_3_tab2_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_480') DROP VIEW view_1_tab3_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_480') DROP VIEW view_2_tab3_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_480') DROP VIEW view_3_tab3_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_480

statement ok
CREATE VIEW view_1_tab3_480 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col4 < 45.69

statement ok
CREATE VIEW view_2_tab3_480 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col4 < 45.69)

statement ok
CREATE VIEW view_3_tab3_480 AS SELECT pk FROM view_1_tab3_480

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col4 < 45.69
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_480
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col4 < 45.69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_480 UNION ALL SELECT pk, col0 FROM view_2_tab3_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col4 < 45.69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_480 UNION SELECT pk, col0 FROM view_2_tab3_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL AND col4 < 45.69 ) AS tab3_480
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_480
----

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE col0 IS NULL AND col4 < 45.69
----

statement ok
DROP VIEW view_1_tab3_480

statement ok
DROP VIEW view_2_tab3_480

statement ok
DROP VIEW view_3_tab3_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_480') DROP VIEW view_1_tab4_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_480') DROP VIEW view_2_tab4_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_480') DROP VIEW view_3_tab4_480

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_480

statement ok
CREATE VIEW view_1_tab4_480 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col4 < 45.69

statement ok
CREATE VIEW view_2_tab4_480 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col4 < 45.69)

statement ok
CREATE VIEW view_3_tab4_480 AS SELECT pk FROM view_1_tab4_480

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col4 < 45.69
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_480
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col4 < 45.69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_480 UNION ALL SELECT pk, col0 FROM view_2_tab4_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col4 < 45.69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL AND col4 < 45.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_480 UNION SELECT pk, col0 FROM view_2_tab4_480
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL AND col4 < 45.69 ) AS tab4_480
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_480
----

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE col0 IS NULL AND col4 < 45.69
----

statement ok
DROP VIEW view_1_tab4_480

statement ok
DROP VIEW view_2_tab4_480

statement ok
DROP VIEW view_3_tab4_480

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_481') DROP VIEW view_1_tab0_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_481') DROP VIEW view_2_tab0_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_481') DROP VIEW view_3_tab0_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_481

statement ok
CREATE VIEW view_1_tab0_481 AS SELECT pk, col0 FROM tab0 WHERE (col0 = 52)

statement ok
CREATE VIEW view_2_tab0_481 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 52))

statement ok
CREATE VIEW view_3_tab0_481 AS SELECT pk FROM view_1_tab0_481

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE (col0 = 52)
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 52))
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_481
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_481
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 = 52) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_481 UNION ALL SELECT pk, col0 FROM view_2_tab0_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 = 52) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_481 UNION SELECT pk, col0 FROM view_2_tab0_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 = 52) ) AS tab0_481
----
7

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_481
----
7

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE (col0 = 52)
----
7

statement ok
DROP VIEW view_1_tab0_481

statement ok
DROP VIEW view_2_tab0_481

statement ok
DROP VIEW view_3_tab0_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_481') DROP VIEW view_1_tab1_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_481') DROP VIEW view_2_tab1_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_481') DROP VIEW view_3_tab1_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_481

statement ok
CREATE VIEW view_1_tab1_481 AS SELECT pk, col0 FROM tab1 WHERE (col0 = 52)

statement ok
CREATE VIEW view_2_tab1_481 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 52))

statement ok
CREATE VIEW view_3_tab1_481 AS SELECT pk FROM view_1_tab1_481

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE (col0 = 52)
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 52))
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_481
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_481
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 = 52) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_481 UNION ALL SELECT pk, col0 FROM view_2_tab1_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 = 52) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_481 UNION SELECT pk, col0 FROM view_2_tab1_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 = 52) ) AS tab1_481
----
7

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_481
----
7

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE (col0 = 52)
----
7

statement ok
DROP VIEW view_1_tab1_481

statement ok
DROP VIEW view_2_tab1_481

statement ok
DROP VIEW view_3_tab1_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_481') DROP VIEW view_1_tab2_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_481') DROP VIEW view_2_tab2_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_481') DROP VIEW view_3_tab2_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_481

statement ok
CREATE VIEW view_1_tab2_481 AS SELECT pk, col0 FROM tab2 WHERE (col0 = 52)

statement ok
CREATE VIEW view_2_tab2_481 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 52))

statement ok
CREATE VIEW view_3_tab2_481 AS SELECT pk FROM view_1_tab2_481

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE (col0 = 52)
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 52))
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_481
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_481
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 = 52) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_481 UNION ALL SELECT pk, col0 FROM view_2_tab2_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 = 52) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_481 UNION SELECT pk, col0 FROM view_2_tab2_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 = 52) ) AS tab2_481
----
7

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_481
----
7

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE (col0 = 52)
----
7

statement ok
DROP VIEW view_1_tab2_481

statement ok
DROP VIEW view_2_tab2_481

statement ok
DROP VIEW view_3_tab2_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_481') DROP VIEW view_1_tab3_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_481') DROP VIEW view_2_tab3_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_481') DROP VIEW view_3_tab3_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_481

statement ok
CREATE VIEW view_1_tab3_481 AS SELECT pk, col0 FROM tab3 WHERE (col0 = 52)

statement ok
CREATE VIEW view_2_tab3_481 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 52))

statement ok
CREATE VIEW view_3_tab3_481 AS SELECT pk FROM view_1_tab3_481

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE (col0 = 52)
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 52))
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_481
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_481
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 = 52) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_481 UNION ALL SELECT pk, col0 FROM view_2_tab3_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 = 52) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_481 UNION SELECT pk, col0 FROM view_2_tab3_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 = 52) ) AS tab3_481
----
7

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_481
----
7

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE (col0 = 52)
----
7

statement ok
DROP VIEW view_1_tab3_481

statement ok
DROP VIEW view_2_tab3_481

statement ok
DROP VIEW view_3_tab3_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_481') DROP VIEW view_1_tab4_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_481') DROP VIEW view_2_tab4_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_481') DROP VIEW view_3_tab4_481

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_481

statement ok
CREATE VIEW view_1_tab4_481 AS SELECT pk, col0 FROM tab4 WHERE (col0 = 52)

statement ok
CREATE VIEW view_2_tab4_481 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 52))

statement ok
CREATE VIEW view_3_tab4_481 AS SELECT pk FROM view_1_tab4_481

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE (col0 = 52)
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 52))
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_481
----
7
52

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_481
----
18 values hashing to 1a126bdacf9f1760a1948c1129b5017f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 = 52) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_481 UNION ALL SELECT pk, col0 FROM view_2_tab4_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 = 52) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 52))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_481 UNION SELECT pk, col0 FROM view_2_tab4_481
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 = 52) ) AS tab4_481
----
7

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_481
----
7

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE (col0 = 52)
----
7

statement ok
DROP VIEW view_1_tab4_481

statement ok
DROP VIEW view_2_tab4_481

statement ok
DROP VIEW view_3_tab4_481

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_482') DROP VIEW view_1_tab0_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_482') DROP VIEW view_2_tab0_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_482') DROP VIEW view_3_tab0_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_482

statement ok
CREATE VIEW view_1_tab0_482 AS SELECT pk, col0 FROM tab0 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))

statement ok
CREATE VIEW view_2_tab0_482 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))

statement ok
CREATE VIEW view_3_tab0_482 AS SELECT pk FROM view_1_tab0_482

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
1
65
2
66
5
67
9
46

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_482
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_482
----
1
65
2
66
5
67
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_482 UNION ALL SELECT pk, col0 FROM view_2_tab0_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_482 UNION SELECT pk, col0 FROM view_2_tab0_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) ) AS tab0_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
0
3
4
6
7
8

statement ok
DROP VIEW view_1_tab0_482

statement ok
DROP VIEW view_2_tab0_482

statement ok
DROP VIEW view_3_tab0_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_482') DROP VIEW view_1_tab1_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_482') DROP VIEW view_2_tab1_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_482') DROP VIEW view_3_tab1_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_482

statement ok
CREATE VIEW view_1_tab1_482 AS SELECT pk, col0 FROM tab1 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))

statement ok
CREATE VIEW view_2_tab1_482 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))

statement ok
CREATE VIEW view_3_tab1_482 AS SELECT pk FROM view_1_tab1_482

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
1
65
2
66
5
67
9
46

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_482
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_482
----
1
65
2
66
5
67
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_482 UNION ALL SELECT pk, col0 FROM view_2_tab1_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_482 UNION SELECT pk, col0 FROM view_2_tab1_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) ) AS tab1_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
0
3
4
6
7
8

statement ok
DROP VIEW view_1_tab1_482

statement ok
DROP VIEW view_2_tab1_482

statement ok
DROP VIEW view_3_tab1_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_482') DROP VIEW view_1_tab2_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_482') DROP VIEW view_2_tab2_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_482') DROP VIEW view_3_tab2_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_482

statement ok
CREATE VIEW view_1_tab2_482 AS SELECT pk, col0 FROM tab2 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))

statement ok
CREATE VIEW view_2_tab2_482 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))

statement ok
CREATE VIEW view_3_tab2_482 AS SELECT pk FROM view_1_tab2_482

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
1
65
2
66
5
67
9
46

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_482
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_482
----
1
65
2
66
5
67
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_482 UNION ALL SELECT pk, col0 FROM view_2_tab2_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_482 UNION SELECT pk, col0 FROM view_2_tab2_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) ) AS tab2_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
0
3
4
6
7
8

statement ok
DROP VIEW view_1_tab2_482

statement ok
DROP VIEW view_2_tab2_482

statement ok
DROP VIEW view_3_tab2_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_482') DROP VIEW view_1_tab3_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_482') DROP VIEW view_2_tab3_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_482') DROP VIEW view_3_tab3_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_482

statement ok
CREATE VIEW view_1_tab3_482 AS SELECT pk, col0 FROM tab3 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))

statement ok
CREATE VIEW view_2_tab3_482 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))

statement ok
CREATE VIEW view_3_tab3_482 AS SELECT pk FROM view_1_tab3_482

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
1
65
2
66
5
67
9
46

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_482
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_482
----
1
65
2
66
5
67
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_482 UNION ALL SELECT pk, col0 FROM view_2_tab3_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_482 UNION SELECT pk, col0 FROM view_2_tab3_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) ) AS tab3_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
0
3
4
6
7
8

statement ok
DROP VIEW view_1_tab3_482

statement ok
DROP VIEW view_2_tab3_482

statement ok
DROP VIEW view_3_tab3_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_482') DROP VIEW view_1_tab4_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_482') DROP VIEW view_2_tab4_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_482') DROP VIEW view_3_tab4_482

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_482

statement ok
CREATE VIEW view_1_tab4_482 AS SELECT pk, col0 FROM tab4 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))

statement ok
CREATE VIEW view_2_tab4_482 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))

statement ok
CREATE VIEW view_3_tab4_482 AS SELECT pk FROM view_1_tab4_482

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
1
65
2
66
5
67
9
46

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_482
----
12 values hashing to fc7fdb5aa00312166271f138589834c9

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_482
----
1
65
2
66
5
67
9
46

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_482 UNION ALL SELECT pk, col0 FROM view_2_tab4_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_482 UNION SELECT pk, col0 FROM view_2_tab4_482
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14)) ) AS tab4_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_482
----
0
3
4
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE (((col0 <= 42))) OR (col0 <= 96) AND (col4 > 76.78) AND ((col4 > 49.14))
----
0
3
4
6
7
8

statement ok
DROP VIEW view_1_tab4_482

statement ok
DROP VIEW view_2_tab4_482

statement ok
DROP VIEW view_3_tab4_482

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_483') DROP VIEW view_1_tab0_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_483') DROP VIEW view_2_tab0_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_483') DROP VIEW view_3_tab0_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_483

statement ok
CREATE VIEW view_1_tab0_483 AS SELECT pk, col0 FROM tab0 WHERE ((col0 IN (95,95,92,84,89,95)))

statement ok
CREATE VIEW view_2_tab0_483 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (95,95,92,84,89,95))))

statement ok
CREATE VIEW view_3_tab0_483 AS SELECT pk FROM view_1_tab0_483

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (95,95,92,84,89,95)))
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_483
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (95,95,92,84,89,95))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_483 UNION ALL SELECT pk, col0 FROM view_2_tab0_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 IN (95,95,92,84,89,95))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_483 UNION SELECT pk, col0 FROM view_2_tab0_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 IN (95,95,92,84,89,95))) ) AS tab0_483
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_483
----

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE ((col0 IN (95,95,92,84,89,95)))
----

statement ok
DROP VIEW view_1_tab0_483

statement ok
DROP VIEW view_2_tab0_483

statement ok
DROP VIEW view_3_tab0_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_483') DROP VIEW view_1_tab1_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_483') DROP VIEW view_2_tab1_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_483') DROP VIEW view_3_tab1_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_483

statement ok
CREATE VIEW view_1_tab1_483 AS SELECT pk, col0 FROM tab1 WHERE ((col0 IN (95,95,92,84,89,95)))

statement ok
CREATE VIEW view_2_tab1_483 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (95,95,92,84,89,95))))

statement ok
CREATE VIEW view_3_tab1_483 AS SELECT pk FROM view_1_tab1_483

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (95,95,92,84,89,95)))
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_483
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (95,95,92,84,89,95))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_483 UNION ALL SELECT pk, col0 FROM view_2_tab1_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 IN (95,95,92,84,89,95))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_483 UNION SELECT pk, col0 FROM view_2_tab1_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 IN (95,95,92,84,89,95))) ) AS tab1_483
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_483
----

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE ((col0 IN (95,95,92,84,89,95)))
----

statement ok
DROP VIEW view_1_tab1_483

statement ok
DROP VIEW view_2_tab1_483

statement ok
DROP VIEW view_3_tab1_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_483') DROP VIEW view_1_tab2_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_483') DROP VIEW view_2_tab2_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_483') DROP VIEW view_3_tab2_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_483

statement ok
CREATE VIEW view_1_tab2_483 AS SELECT pk, col0 FROM tab2 WHERE ((col0 IN (95,95,92,84,89,95)))

statement ok
CREATE VIEW view_2_tab2_483 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (95,95,92,84,89,95))))

statement ok
CREATE VIEW view_3_tab2_483 AS SELECT pk FROM view_1_tab2_483

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (95,95,92,84,89,95)))
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_483
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (95,95,92,84,89,95))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_483 UNION ALL SELECT pk, col0 FROM view_2_tab2_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 IN (95,95,92,84,89,95))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_483 UNION SELECT pk, col0 FROM view_2_tab2_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 IN (95,95,92,84,89,95))) ) AS tab2_483
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_483
----

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE ((col0 IN (95,95,92,84,89,95)))
----

statement ok
DROP VIEW view_1_tab2_483

statement ok
DROP VIEW view_2_tab2_483

statement ok
DROP VIEW view_3_tab2_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_483') DROP VIEW view_1_tab3_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_483') DROP VIEW view_2_tab3_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_483') DROP VIEW view_3_tab3_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_483

statement ok
CREATE VIEW view_1_tab3_483 AS SELECT pk, col0 FROM tab3 WHERE ((col0 IN (95,95,92,84,89,95)))

statement ok
CREATE VIEW view_2_tab3_483 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (95,95,92,84,89,95))))

statement ok
CREATE VIEW view_3_tab3_483 AS SELECT pk FROM view_1_tab3_483

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (95,95,92,84,89,95)))
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_483
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (95,95,92,84,89,95))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_483 UNION ALL SELECT pk, col0 FROM view_2_tab3_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 IN (95,95,92,84,89,95))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_483 UNION SELECT pk, col0 FROM view_2_tab3_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 IN (95,95,92,84,89,95))) ) AS tab3_483
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_483
----

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE ((col0 IN (95,95,92,84,89,95)))
----

statement ok
DROP VIEW view_1_tab3_483

statement ok
DROP VIEW view_2_tab3_483

statement ok
DROP VIEW view_3_tab3_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_483') DROP VIEW view_1_tab4_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_483') DROP VIEW view_2_tab4_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_483') DROP VIEW view_3_tab4_483

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_483

statement ok
CREATE VIEW view_1_tab4_483 AS SELECT pk, col0 FROM tab4 WHERE ((col0 IN (95,95,92,84,89,95)))

statement ok
CREATE VIEW view_2_tab4_483 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (95,95,92,84,89,95))))

statement ok
CREATE VIEW view_3_tab4_483 AS SELECT pk FROM view_1_tab4_483

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (95,95,92,84,89,95)))
----

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_483
----

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (95,95,92,84,89,95))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_483 UNION ALL SELECT pk, col0 FROM view_2_tab4_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 IN (95,95,92,84,89,95))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 IN (95,95,92,84,89,95))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_483 UNION SELECT pk, col0 FROM view_2_tab4_483
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 IN (95,95,92,84,89,95))) ) AS tab4_483
----

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_483
----

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE ((col0 IN (95,95,92,84,89,95)))
----

statement ok
DROP VIEW view_1_tab4_483

statement ok
DROP VIEW view_2_tab4_483

statement ok
DROP VIEW view_3_tab4_483

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_484') DROP VIEW view_1_tab0_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_484') DROP VIEW view_2_tab0_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_484') DROP VIEW view_3_tab0_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_484

statement ok
CREATE VIEW view_1_tab0_484 AS SELECT pk, col0 FROM tab0 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50

statement ok
CREATE VIEW view_2_tab0_484 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)

statement ok
CREATE VIEW view_3_tab0_484 AS SELECT pk FROM view_1_tab0_484

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_484
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_484 UNION ALL SELECT pk, col0 FROM view_2_tab0_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_484 UNION SELECT pk, col0 FROM view_2_tab0_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 ) AS tab0_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_484

statement ok
DROP VIEW view_2_tab0_484

statement ok
DROP VIEW view_3_tab0_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_484') DROP VIEW view_1_tab1_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_484') DROP VIEW view_2_tab1_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_484') DROP VIEW view_3_tab1_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_484

statement ok
CREATE VIEW view_1_tab1_484 AS SELECT pk, col0 FROM tab1 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50

statement ok
CREATE VIEW view_2_tab1_484 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)

statement ok
CREATE VIEW view_3_tab1_484 AS SELECT pk FROM view_1_tab1_484

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_484
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_484 UNION ALL SELECT pk, col0 FROM view_2_tab1_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_484 UNION SELECT pk, col0 FROM view_2_tab1_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 ) AS tab1_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_484

statement ok
DROP VIEW view_2_tab1_484

statement ok
DROP VIEW view_3_tab1_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_484') DROP VIEW view_1_tab2_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_484') DROP VIEW view_2_tab2_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_484') DROP VIEW view_3_tab2_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_484

statement ok
CREATE VIEW view_1_tab2_484 AS SELECT pk, col0 FROM tab2 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50

statement ok
CREATE VIEW view_2_tab2_484 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)

statement ok
CREATE VIEW view_3_tab2_484 AS SELECT pk FROM view_1_tab2_484

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_484
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_484 UNION ALL SELECT pk, col0 FROM view_2_tab2_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_484 UNION SELECT pk, col0 FROM view_2_tab2_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 ) AS tab2_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_484

statement ok
DROP VIEW view_2_tab2_484

statement ok
DROP VIEW view_3_tab2_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_484') DROP VIEW view_1_tab3_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_484') DROP VIEW view_2_tab3_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_484') DROP VIEW view_3_tab3_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_484

statement ok
CREATE VIEW view_1_tab3_484 AS SELECT pk, col0 FROM tab3 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50

statement ok
CREATE VIEW view_2_tab3_484 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)

statement ok
CREATE VIEW view_3_tab3_484 AS SELECT pk FROM view_1_tab3_484

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_484
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_484 UNION ALL SELECT pk, col0 FROM view_2_tab3_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_484 UNION SELECT pk, col0 FROM view_2_tab3_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 ) AS tab3_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_484

statement ok
DROP VIEW view_2_tab3_484

statement ok
DROP VIEW view_3_tab3_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_484') DROP VIEW view_1_tab4_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_484') DROP VIEW view_2_tab4_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_484') DROP VIEW view_3_tab4_484

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_484

statement ok
CREATE VIEW view_1_tab4_484 AS SELECT pk, col0 FROM tab4 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50

statement ok
CREATE VIEW view_2_tab4_484 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)

statement ok
CREATE VIEW view_3_tab4_484 AS SELECT pk FROM view_1_tab4_484

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_484
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_484 UNION ALL SELECT pk, col0 FROM view_2_tab4_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_484 UNION SELECT pk, col0 FROM view_2_tab4_484
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50 ) AS tab4_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_484
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE (col0 <= 77) OR (col0 < 43 AND (col3 > 64)) AND (col1 <= 3.72) AND col3 > 50
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_484

statement ok
DROP VIEW view_2_tab4_484

statement ok
DROP VIEW view_3_tab4_484

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_485') DROP VIEW view_1_tab0_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_485') DROP VIEW view_2_tab0_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_485') DROP VIEW view_3_tab0_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_485

statement ok
CREATE VIEW view_1_tab0_485 AS SELECT pk, col0 FROM tab0 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))

statement ok
CREATE VIEW view_2_tab0_485 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))

statement ok
CREATE VIEW view_3_tab0_485 AS SELECT pk FROM view_1_tab0_485

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_485
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_485 UNION ALL SELECT pk, col0 FROM view_2_tab0_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_485 UNION SELECT pk, col0 FROM view_2_tab0_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) ) AS tab0_485
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_485
----

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

statement ok
DROP VIEW view_1_tab0_485

statement ok
DROP VIEW view_2_tab0_485

statement ok
DROP VIEW view_3_tab0_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_485') DROP VIEW view_1_tab1_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_485') DROP VIEW view_2_tab1_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_485') DROP VIEW view_3_tab1_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_485

statement ok
CREATE VIEW view_1_tab1_485 AS SELECT pk, col0 FROM tab1 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))

statement ok
CREATE VIEW view_2_tab1_485 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))

statement ok
CREATE VIEW view_3_tab1_485 AS SELECT pk FROM view_1_tab1_485

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_485
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_485 UNION ALL SELECT pk, col0 FROM view_2_tab1_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_485 UNION SELECT pk, col0 FROM view_2_tab1_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) ) AS tab1_485
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_485
----

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

statement ok
DROP VIEW view_1_tab1_485

statement ok
DROP VIEW view_2_tab1_485

statement ok
DROP VIEW view_3_tab1_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_485') DROP VIEW view_1_tab2_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_485') DROP VIEW view_2_tab2_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_485') DROP VIEW view_3_tab2_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_485

statement ok
CREATE VIEW view_1_tab2_485 AS SELECT pk, col0 FROM tab2 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))

statement ok
CREATE VIEW view_2_tab2_485 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))

statement ok
CREATE VIEW view_3_tab2_485 AS SELECT pk FROM view_1_tab2_485

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_485
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_485 UNION ALL SELECT pk, col0 FROM view_2_tab2_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_485 UNION SELECT pk, col0 FROM view_2_tab2_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) ) AS tab2_485
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_485
----

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

statement ok
DROP VIEW view_1_tab2_485

statement ok
DROP VIEW view_2_tab2_485

statement ok
DROP VIEW view_3_tab2_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_485') DROP VIEW view_1_tab3_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_485') DROP VIEW view_2_tab3_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_485') DROP VIEW view_3_tab3_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_485

statement ok
CREATE VIEW view_1_tab3_485 AS SELECT pk, col0 FROM tab3 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))

statement ok
CREATE VIEW view_2_tab3_485 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))

statement ok
CREATE VIEW view_3_tab3_485 AS SELECT pk FROM view_1_tab3_485

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_485
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_485 UNION ALL SELECT pk, col0 FROM view_2_tab3_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_485 UNION SELECT pk, col0 FROM view_2_tab3_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) ) AS tab3_485
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_485
----

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

statement ok
DROP VIEW view_1_tab3_485

statement ok
DROP VIEW view_2_tab3_485

statement ok
DROP VIEW view_3_tab3_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_485') DROP VIEW view_1_tab4_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_485') DROP VIEW view_2_tab4_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_485') DROP VIEW view_3_tab4_485

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_485

statement ok
CREATE VIEW view_1_tab4_485 AS SELECT pk, col0 FROM tab4 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))

statement ok
CREATE VIEW view_2_tab4_485 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))

statement ok
CREATE VIEW view_3_tab4_485 AS SELECT pk FROM view_1_tab4_485

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_485
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_485 UNION ALL SELECT pk, col0 FROM view_2_tab4_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_485 UNION SELECT pk, col0 FROM view_2_tab4_485
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73))) ) AS tab4_485
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_485
----

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE (((col3 < 25 OR ((col4 = 87.66 AND col1 >= 56.75 AND (col4 > 82.67) AND ((col0 > 36) AND col4 IS NULL AND col3 < 77 OR col3 <= 46 AND col0 < 9 AND ((col4 <= 63.75))) AND col0 < 81))) AND (col3 >= 73)))
----

statement ok
DROP VIEW view_1_tab4_485

statement ok
DROP VIEW view_2_tab4_485

statement ok
DROP VIEW view_3_tab4_485

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_486') DROP VIEW view_1_tab0_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_486') DROP VIEW view_2_tab0_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_486') DROP VIEW view_3_tab0_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_486

statement ok
CREATE VIEW view_1_tab0_486 AS SELECT pk, col0 FROM tab0 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78

statement ok
CREATE VIEW view_2_tab0_486 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)

statement ok
CREATE VIEW view_3_tab0_486 AS SELECT pk FROM view_1_tab0_486

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_486
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_486
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_486 UNION ALL SELECT pk, col0 FROM view_2_tab0_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_486 UNION SELECT pk, col0 FROM view_2_tab0_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 ) AS tab0_486
----
1
7

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_486
----
1
7

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
7

statement ok
DROP VIEW view_1_tab0_486

statement ok
DROP VIEW view_2_tab0_486

statement ok
DROP VIEW view_3_tab0_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_486') DROP VIEW view_1_tab1_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_486') DROP VIEW view_2_tab1_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_486') DROP VIEW view_3_tab1_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_486

statement ok
CREATE VIEW view_1_tab1_486 AS SELECT pk, col0 FROM tab1 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78

statement ok
CREATE VIEW view_2_tab1_486 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)

statement ok
CREATE VIEW view_3_tab1_486 AS SELECT pk FROM view_1_tab1_486

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_486
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_486
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_486 UNION ALL SELECT pk, col0 FROM view_2_tab1_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_486 UNION SELECT pk, col0 FROM view_2_tab1_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 ) AS tab1_486
----
1
7

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_486
----
1
7

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
7

statement ok
DROP VIEW view_1_tab1_486

statement ok
DROP VIEW view_2_tab1_486

statement ok
DROP VIEW view_3_tab1_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_486') DROP VIEW view_1_tab2_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_486') DROP VIEW view_2_tab2_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_486') DROP VIEW view_3_tab2_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_486

statement ok
CREATE VIEW view_1_tab2_486 AS SELECT pk, col0 FROM tab2 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78

statement ok
CREATE VIEW view_2_tab2_486 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)

statement ok
CREATE VIEW view_3_tab2_486 AS SELECT pk FROM view_1_tab2_486

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_486
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_486
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_486 UNION ALL SELECT pk, col0 FROM view_2_tab2_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_486 UNION SELECT pk, col0 FROM view_2_tab2_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 ) AS tab2_486
----
1
7

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_486
----
1
7

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
7

statement ok
DROP VIEW view_1_tab2_486

statement ok
DROP VIEW view_2_tab2_486

statement ok
DROP VIEW view_3_tab2_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_486') DROP VIEW view_1_tab3_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_486') DROP VIEW view_2_tab3_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_486') DROP VIEW view_3_tab3_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_486

statement ok
CREATE VIEW view_1_tab3_486 AS SELECT pk, col0 FROM tab3 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78

statement ok
CREATE VIEW view_2_tab3_486 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)

statement ok
CREATE VIEW view_3_tab3_486 AS SELECT pk FROM view_1_tab3_486

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_486
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_486
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_486 UNION ALL SELECT pk, col0 FROM view_2_tab3_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_486 UNION SELECT pk, col0 FROM view_2_tab3_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 ) AS tab3_486
----
1
7

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_486
----
1
7

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
7

statement ok
DROP VIEW view_1_tab3_486

statement ok
DROP VIEW view_2_tab3_486

statement ok
DROP VIEW view_3_tab3_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_486') DROP VIEW view_1_tab4_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_486') DROP VIEW view_2_tab4_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_486') DROP VIEW view_3_tab4_486

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_486

statement ok
CREATE VIEW view_1_tab4_486 AS SELECT pk, col0 FROM tab4 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78

statement ok
CREATE VIEW view_2_tab4_486 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)

statement ok
CREATE VIEW view_3_tab4_486 AS SELECT pk FROM view_1_tab4_486

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_486
----
1
65
7
52

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_486
----
16 values hashing to 3d0f44e30b9d13a604a2628e70b98558

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_486 UNION ALL SELECT pk, col0 FROM view_2_tab4_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 < 8) OR col0 > 17)) AND col3 >= 78)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_486 UNION SELECT pk, col0 FROM view_2_tab4_486
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78 ) AS tab4_486
----
1
7

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_486
----
1
7

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE (((col3 < 8) OR col0 > 17)) AND col3 >= 78
----
1
7

statement ok
DROP VIEW view_1_tab4_486

statement ok
DROP VIEW view_2_tab4_486

statement ok
DROP VIEW view_3_tab4_486

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_487') DROP VIEW view_1_tab0_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_487') DROP VIEW view_2_tab0_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_487') DROP VIEW view_3_tab0_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_487

statement ok
CREATE VIEW view_1_tab0_487 AS SELECT pk, col0 FROM tab0 WHERE col1 >= 52.32

statement ok
CREATE VIEW view_2_tab0_487 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 52.32)

statement ok
CREATE VIEW view_3_tab0_487 AS SELECT pk FROM view_1_tab0_487

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col1 >= 52.32
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 52.32)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_487
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_487
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 52.32 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_487 UNION ALL SELECT pk, col0 FROM view_2_tab0_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 >= 52.32 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_487 UNION SELECT pk, col0 FROM view_2_tab0_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 >= 52.32 ) AS tab0_487
----
1
5

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_487
----
1
5

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col1 >= 52.32
----
1
5

statement ok
DROP VIEW view_1_tab0_487

statement ok
DROP VIEW view_2_tab0_487

statement ok
DROP VIEW view_3_tab0_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_487') DROP VIEW view_1_tab1_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_487') DROP VIEW view_2_tab1_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_487') DROP VIEW view_3_tab1_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_487

statement ok
CREATE VIEW view_1_tab1_487 AS SELECT pk, col0 FROM tab1 WHERE col1 >= 52.32

statement ok
CREATE VIEW view_2_tab1_487 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 52.32)

statement ok
CREATE VIEW view_3_tab1_487 AS SELECT pk FROM view_1_tab1_487

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col1 >= 52.32
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 52.32)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_487
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_487
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 52.32 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_487 UNION ALL SELECT pk, col0 FROM view_2_tab1_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 >= 52.32 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_487 UNION SELECT pk, col0 FROM view_2_tab1_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 >= 52.32 ) AS tab1_487
----
1
5

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_487
----
1
5

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col1 >= 52.32
----
1
5

statement ok
DROP VIEW view_1_tab1_487

statement ok
DROP VIEW view_2_tab1_487

statement ok
DROP VIEW view_3_tab1_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_487') DROP VIEW view_1_tab2_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_487') DROP VIEW view_2_tab2_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_487') DROP VIEW view_3_tab2_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_487

statement ok
CREATE VIEW view_1_tab2_487 AS SELECT pk, col0 FROM tab2 WHERE col1 >= 52.32

statement ok
CREATE VIEW view_2_tab2_487 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 52.32)

statement ok
CREATE VIEW view_3_tab2_487 AS SELECT pk FROM view_1_tab2_487

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col1 >= 52.32
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 52.32)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_487
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_487
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 52.32 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_487 UNION ALL SELECT pk, col0 FROM view_2_tab2_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 >= 52.32 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_487 UNION SELECT pk, col0 FROM view_2_tab2_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 >= 52.32 ) AS tab2_487
----
1
5

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_487
----
1
5

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col1 >= 52.32
----
1
5

statement ok
DROP VIEW view_1_tab2_487

statement ok
DROP VIEW view_2_tab2_487

statement ok
DROP VIEW view_3_tab2_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_487') DROP VIEW view_1_tab3_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_487') DROP VIEW view_2_tab3_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_487') DROP VIEW view_3_tab3_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_487

statement ok
CREATE VIEW view_1_tab3_487 AS SELECT pk, col0 FROM tab3 WHERE col1 >= 52.32

statement ok
CREATE VIEW view_2_tab3_487 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 52.32)

statement ok
CREATE VIEW view_3_tab3_487 AS SELECT pk FROM view_1_tab3_487

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col1 >= 52.32
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 52.32)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_487
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_487
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 52.32 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_487 UNION ALL SELECT pk, col0 FROM view_2_tab3_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 >= 52.32 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_487 UNION SELECT pk, col0 FROM view_2_tab3_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 >= 52.32 ) AS tab3_487
----
1
5

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_487
----
1
5

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col1 >= 52.32
----
1
5

statement ok
DROP VIEW view_1_tab3_487

statement ok
DROP VIEW view_2_tab3_487

statement ok
DROP VIEW view_3_tab3_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_487') DROP VIEW view_1_tab4_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_487') DROP VIEW view_2_tab4_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_487') DROP VIEW view_3_tab4_487

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_487

statement ok
CREATE VIEW view_1_tab4_487 AS SELECT pk, col0 FROM tab4 WHERE col1 >= 52.32

statement ok
CREATE VIEW view_2_tab4_487 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 52.32)

statement ok
CREATE VIEW view_3_tab4_487 AS SELECT pk FROM view_1_tab4_487

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col1 >= 52.32
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 52.32)
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_487
----
1
65
5
67

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_487
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 52.32 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_487 UNION ALL SELECT pk, col0 FROM view_2_tab4_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 >= 52.32 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 >= 52.32)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_487 UNION SELECT pk, col0 FROM view_2_tab4_487
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 >= 52.32 ) AS tab4_487
----
1
5

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_487
----
1
5

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col1 >= 52.32
----
1
5

statement ok
DROP VIEW view_1_tab4_487

statement ok
DROP VIEW view_2_tab4_487

statement ok
DROP VIEW view_3_tab4_487

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_488') DROP VIEW view_1_tab0_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_488') DROP VIEW view_2_tab0_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_488') DROP VIEW view_3_tab0_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_488

statement ok
CREATE VIEW view_1_tab0_488 AS SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 79 AND 96

statement ok
CREATE VIEW view_2_tab0_488 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 79 AND 96)

statement ok
CREATE VIEW view_3_tab0_488 AS SELECT pk FROM view_1_tab0_488

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 79 AND 96
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 79 AND 96)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_488
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_488
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 79 AND 96 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_488 UNION ALL SELECT pk, col0 FROM view_2_tab0_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 79 AND 96 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_488 UNION SELECT pk, col0 FROM view_2_tab0_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 79 AND 96 ) AS tab0_488
----
1
3
7

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_488
----
1
3
7

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col3 BETWEEN 79 AND 96
----
1
3
7

statement ok
DROP VIEW view_1_tab0_488

statement ok
DROP VIEW view_2_tab0_488

statement ok
DROP VIEW view_3_tab0_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_488') DROP VIEW view_1_tab1_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_488') DROP VIEW view_2_tab1_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_488') DROP VIEW view_3_tab1_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_488

statement ok
CREATE VIEW view_1_tab1_488 AS SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 79 AND 96

statement ok
CREATE VIEW view_2_tab1_488 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 79 AND 96)

statement ok
CREATE VIEW view_3_tab1_488 AS SELECT pk FROM view_1_tab1_488

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 79 AND 96
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 79 AND 96)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_488
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_488
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 79 AND 96 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_488 UNION ALL SELECT pk, col0 FROM view_2_tab1_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 79 AND 96 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_488 UNION SELECT pk, col0 FROM view_2_tab1_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 79 AND 96 ) AS tab1_488
----
1
3
7

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_488
----
1
3
7

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col3 BETWEEN 79 AND 96
----
1
3
7

statement ok
DROP VIEW view_1_tab1_488

statement ok
DROP VIEW view_2_tab1_488

statement ok
DROP VIEW view_3_tab1_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_488') DROP VIEW view_1_tab2_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_488') DROP VIEW view_2_tab2_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_488') DROP VIEW view_3_tab2_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_488

statement ok
CREATE VIEW view_1_tab2_488 AS SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 79 AND 96

statement ok
CREATE VIEW view_2_tab2_488 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 79 AND 96)

statement ok
CREATE VIEW view_3_tab2_488 AS SELECT pk FROM view_1_tab2_488

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 79 AND 96
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 79 AND 96)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_488
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_488
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 79 AND 96 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_488 UNION ALL SELECT pk, col0 FROM view_2_tab2_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 79 AND 96 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_488 UNION SELECT pk, col0 FROM view_2_tab2_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 79 AND 96 ) AS tab2_488
----
1
3
7

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_488
----
1
3
7

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col3 BETWEEN 79 AND 96
----
1
3
7

statement ok
DROP VIEW view_1_tab2_488

statement ok
DROP VIEW view_2_tab2_488

statement ok
DROP VIEW view_3_tab2_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_488') DROP VIEW view_1_tab3_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_488') DROP VIEW view_2_tab3_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_488') DROP VIEW view_3_tab3_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_488

statement ok
CREATE VIEW view_1_tab3_488 AS SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 79 AND 96

statement ok
CREATE VIEW view_2_tab3_488 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 79 AND 96)

statement ok
CREATE VIEW view_3_tab3_488 AS SELECT pk FROM view_1_tab3_488

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 79 AND 96
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 79 AND 96)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_488
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_488
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 79 AND 96 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_488 UNION ALL SELECT pk, col0 FROM view_2_tab3_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 79 AND 96 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_488 UNION SELECT pk, col0 FROM view_2_tab3_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 79 AND 96 ) AS tab3_488
----
1
3
7

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_488
----
1
3
7

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col3 BETWEEN 79 AND 96
----
1
3
7

statement ok
DROP VIEW view_1_tab3_488

statement ok
DROP VIEW view_2_tab3_488

statement ok
DROP VIEW view_3_tab3_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_488') DROP VIEW view_1_tab4_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_488') DROP VIEW view_2_tab4_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_488') DROP VIEW view_3_tab4_488

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_488

statement ok
CREATE VIEW view_1_tab4_488 AS SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 79 AND 96

statement ok
CREATE VIEW view_2_tab4_488 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 79 AND 96)

statement ok
CREATE VIEW view_3_tab4_488 AS SELECT pk FROM view_1_tab4_488

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 79 AND 96
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 79 AND 96)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_488
----
1
65
3
6
7
52

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_488
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 79 AND 96 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_488 UNION ALL SELECT pk, col0 FROM view_2_tab4_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 79 AND 96 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 79 AND 96)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_488 UNION SELECT pk, col0 FROM view_2_tab4_488
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 79 AND 96 ) AS tab4_488
----
1
3
7

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_488
----
1
3
7

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col3 BETWEEN 79 AND 96
----
1
3
7

statement ok
DROP VIEW view_1_tab4_488

statement ok
DROP VIEW view_2_tab4_488

statement ok
DROP VIEW view_3_tab4_488

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_489') DROP VIEW view_1_tab0_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_489') DROP VIEW view_2_tab0_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_489') DROP VIEW view_3_tab0_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_489

statement ok
CREATE VIEW view_1_tab0_489 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10

statement ok
CREATE VIEW view_2_tab0_489 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)

statement ok
CREATE VIEW view_3_tab0_489 AS SELECT pk FROM view_1_tab0_489

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_489
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_489 UNION ALL SELECT pk, col0 FROM view_2_tab0_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_489 UNION SELECT pk, col0 FROM view_2_tab0_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 ) AS tab0_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_489

statement ok
DROP VIEW view_2_tab0_489

statement ok
DROP VIEW view_3_tab0_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_489') DROP VIEW view_1_tab1_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_489') DROP VIEW view_2_tab1_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_489') DROP VIEW view_3_tab1_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_489

statement ok
CREATE VIEW view_1_tab1_489 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10

statement ok
CREATE VIEW view_2_tab1_489 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)

statement ok
CREATE VIEW view_3_tab1_489 AS SELECT pk FROM view_1_tab1_489

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_489
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_489 UNION ALL SELECT pk, col0 FROM view_2_tab1_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_489 UNION SELECT pk, col0 FROM view_2_tab1_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 ) AS tab1_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_489

statement ok
DROP VIEW view_2_tab1_489

statement ok
DROP VIEW view_3_tab1_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_489') DROP VIEW view_1_tab2_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_489') DROP VIEW view_2_tab2_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_489') DROP VIEW view_3_tab2_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_489

statement ok
CREATE VIEW view_1_tab2_489 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10

statement ok
CREATE VIEW view_2_tab2_489 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)

statement ok
CREATE VIEW view_3_tab2_489 AS SELECT pk FROM view_1_tab2_489

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_489
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_489 UNION ALL SELECT pk, col0 FROM view_2_tab2_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_489 UNION SELECT pk, col0 FROM view_2_tab2_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 ) AS tab2_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_489

statement ok
DROP VIEW view_2_tab2_489

statement ok
DROP VIEW view_3_tab2_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_489') DROP VIEW view_1_tab3_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_489') DROP VIEW view_2_tab3_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_489') DROP VIEW view_3_tab3_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_489

statement ok
CREATE VIEW view_1_tab3_489 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10

statement ok
CREATE VIEW view_2_tab3_489 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)

statement ok
CREATE VIEW view_3_tab3_489 AS SELECT pk FROM view_1_tab3_489

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_489
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_489 UNION ALL SELECT pk, col0 FROM view_2_tab3_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_489 UNION SELECT pk, col0 FROM view_2_tab3_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 ) AS tab3_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_489

statement ok
DROP VIEW view_2_tab3_489

statement ok
DROP VIEW view_3_tab3_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_489') DROP VIEW view_1_tab4_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_489') DROP VIEW view_2_tab4_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_489') DROP VIEW view_3_tab4_489

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_489

statement ok
CREATE VIEW view_1_tab4_489 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10

statement ok
CREATE VIEW view_2_tab4_489 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)

statement ok
CREATE VIEW view_3_tab4_489 AS SELECT pk FROM view_1_tab4_489

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_489
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_489 UNION ALL SELECT pk, col0 FROM view_2_tab4_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_489 UNION SELECT pk, col0 FROM view_2_tab4_489
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10 ) AS tab4_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_489
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE (col3 > 48 AND (col0 < 43 AND col0 IS NULL OR col3 > 84 OR col0 = 98 AND col1 >= 23.35) OR col3 >= 59 AND col0 > 97 OR col0 BETWEEN 52 AND 77 AND ((((col0 <= 2 OR col3 > 42))))) AND col3 = 72 AND col3 = 48 OR col1 >= 5.10
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_489

statement ok
DROP VIEW view_2_tab4_489

statement ok
DROP VIEW view_3_tab4_489

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_490') DROP VIEW view_1_tab0_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_490') DROP VIEW view_2_tab0_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_490') DROP VIEW view_3_tab0_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_490

statement ok
CREATE VIEW view_1_tab0_490 AS SELECT pk, col0 FROM tab0 WHERE col3 = 10

statement ok
CREATE VIEW view_2_tab0_490 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 10)

statement ok
CREATE VIEW view_3_tab0_490 AS SELECT pk FROM view_1_tab0_490

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE col3 = 10
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_490
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 10 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_490 UNION ALL SELECT pk, col0 FROM view_2_tab0_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 10 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_490 UNION SELECT pk, col0 FROM view_2_tab0_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 10 ) AS tab0_490
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_490
----

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE col3 = 10
----

statement ok
DROP VIEW view_1_tab0_490

statement ok
DROP VIEW view_2_tab0_490

statement ok
DROP VIEW view_3_tab0_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_490') DROP VIEW view_1_tab1_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_490') DROP VIEW view_2_tab1_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_490') DROP VIEW view_3_tab1_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_490

statement ok
CREATE VIEW view_1_tab1_490 AS SELECT pk, col0 FROM tab1 WHERE col3 = 10

statement ok
CREATE VIEW view_2_tab1_490 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 10)

statement ok
CREATE VIEW view_3_tab1_490 AS SELECT pk FROM view_1_tab1_490

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE col3 = 10
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_490
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 10 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_490 UNION ALL SELECT pk, col0 FROM view_2_tab1_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 10 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_490 UNION SELECT pk, col0 FROM view_2_tab1_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 10 ) AS tab1_490
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_490
----

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE col3 = 10
----

statement ok
DROP VIEW view_1_tab1_490

statement ok
DROP VIEW view_2_tab1_490

statement ok
DROP VIEW view_3_tab1_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_490') DROP VIEW view_1_tab2_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_490') DROP VIEW view_2_tab2_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_490') DROP VIEW view_3_tab2_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_490

statement ok
CREATE VIEW view_1_tab2_490 AS SELECT pk, col0 FROM tab2 WHERE col3 = 10

statement ok
CREATE VIEW view_2_tab2_490 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 10)

statement ok
CREATE VIEW view_3_tab2_490 AS SELECT pk FROM view_1_tab2_490

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE col3 = 10
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_490
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 10 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_490 UNION ALL SELECT pk, col0 FROM view_2_tab2_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 10 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_490 UNION SELECT pk, col0 FROM view_2_tab2_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 10 ) AS tab2_490
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_490
----

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE col3 = 10
----

statement ok
DROP VIEW view_1_tab2_490

statement ok
DROP VIEW view_2_tab2_490

statement ok
DROP VIEW view_3_tab2_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_490') DROP VIEW view_1_tab3_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_490') DROP VIEW view_2_tab3_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_490') DROP VIEW view_3_tab3_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_490

statement ok
CREATE VIEW view_1_tab3_490 AS SELECT pk, col0 FROM tab3 WHERE col3 = 10

statement ok
CREATE VIEW view_2_tab3_490 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 10)

statement ok
CREATE VIEW view_3_tab3_490 AS SELECT pk FROM view_1_tab3_490

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE col3 = 10
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_490
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 10 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_490 UNION ALL SELECT pk, col0 FROM view_2_tab3_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 10 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_490 UNION SELECT pk, col0 FROM view_2_tab3_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 10 ) AS tab3_490
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_490
----

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE col3 = 10
----

statement ok
DROP VIEW view_1_tab3_490

statement ok
DROP VIEW view_2_tab3_490

statement ok
DROP VIEW view_3_tab3_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_490') DROP VIEW view_1_tab4_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_490') DROP VIEW view_2_tab4_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_490') DROP VIEW view_3_tab4_490

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_490

statement ok
CREATE VIEW view_1_tab4_490 AS SELECT pk, col0 FROM tab4 WHERE col3 = 10

statement ok
CREATE VIEW view_2_tab4_490 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 10)

statement ok
CREATE VIEW view_3_tab4_490 AS SELECT pk FROM view_1_tab4_490

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE col3 = 10
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_490
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 10 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_490 UNION ALL SELECT pk, col0 FROM view_2_tab4_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 10 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 10)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_490 UNION SELECT pk, col0 FROM view_2_tab4_490
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 10 ) AS tab4_490
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_490
----

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE col3 = 10
----

statement ok
DROP VIEW view_1_tab4_490

statement ok
DROP VIEW view_2_tab4_490

statement ok
DROP VIEW view_3_tab4_490

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_491') DROP VIEW view_1_tab0_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_491') DROP VIEW view_2_tab0_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_491') DROP VIEW view_3_tab0_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_491

statement ok
CREATE VIEW view_1_tab0_491 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 35

statement ok
CREATE VIEW view_2_tab0_491 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 35)

statement ok
CREATE VIEW view_3_tab0_491 AS SELECT pk FROM view_1_tab0_491

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 35
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 35)
----
3
6
4
18
6
7
8
29

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_491
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_491
----
3
6
4
18
6
7
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 35 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_491 UNION ALL SELECT pk, col0 FROM view_2_tab0_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 35 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_491 UNION SELECT pk, col0 FROM view_2_tab0_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 35 ) AS tab0_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE col0 >= 35
----
0
1
2
5
7
9

statement ok
DROP VIEW view_1_tab0_491

statement ok
DROP VIEW view_2_tab0_491

statement ok
DROP VIEW view_3_tab0_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_491') DROP VIEW view_1_tab1_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_491') DROP VIEW view_2_tab1_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_491') DROP VIEW view_3_tab1_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_491

statement ok
CREATE VIEW view_1_tab1_491 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 35

statement ok
CREATE VIEW view_2_tab1_491 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 35)

statement ok
CREATE VIEW view_3_tab1_491 AS SELECT pk FROM view_1_tab1_491

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 35
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 35)
----
3
6
4
18
6
7
8
29

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_491
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_491
----
3
6
4
18
6
7
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 35 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_491 UNION ALL SELECT pk, col0 FROM view_2_tab1_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 35 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_491 UNION SELECT pk, col0 FROM view_2_tab1_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 35 ) AS tab1_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE col0 >= 35
----
0
1
2
5
7
9

statement ok
DROP VIEW view_1_tab1_491

statement ok
DROP VIEW view_2_tab1_491

statement ok
DROP VIEW view_3_tab1_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_491') DROP VIEW view_1_tab2_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_491') DROP VIEW view_2_tab2_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_491') DROP VIEW view_3_tab2_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_491

statement ok
CREATE VIEW view_1_tab2_491 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 35

statement ok
CREATE VIEW view_2_tab2_491 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 35)

statement ok
CREATE VIEW view_3_tab2_491 AS SELECT pk FROM view_1_tab2_491

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 35
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 35)
----
3
6
4
18
6
7
8
29

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_491
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_491
----
3
6
4
18
6
7
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 35 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_491 UNION ALL SELECT pk, col0 FROM view_2_tab2_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 35 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_491 UNION SELECT pk, col0 FROM view_2_tab2_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 35 ) AS tab2_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE col0 >= 35
----
0
1
2
5
7
9

statement ok
DROP VIEW view_1_tab2_491

statement ok
DROP VIEW view_2_tab2_491

statement ok
DROP VIEW view_3_tab2_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_491') DROP VIEW view_1_tab3_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_491') DROP VIEW view_2_tab3_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_491') DROP VIEW view_3_tab3_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_491

statement ok
CREATE VIEW view_1_tab3_491 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 35

statement ok
CREATE VIEW view_2_tab3_491 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 35)

statement ok
CREATE VIEW view_3_tab3_491 AS SELECT pk FROM view_1_tab3_491

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 35
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 35)
----
3
6
4
18
6
7
8
29

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_491
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_491
----
3
6
4
18
6
7
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 35 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_491 UNION ALL SELECT pk, col0 FROM view_2_tab3_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 35 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_491 UNION SELECT pk, col0 FROM view_2_tab3_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 35 ) AS tab3_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE col0 >= 35
----
0
1
2
5
7
9

statement ok
DROP VIEW view_1_tab3_491

statement ok
DROP VIEW view_2_tab3_491

statement ok
DROP VIEW view_3_tab3_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_491') DROP VIEW view_1_tab4_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_491') DROP VIEW view_2_tab4_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_491') DROP VIEW view_3_tab4_491

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_491

statement ok
CREATE VIEW view_1_tab4_491 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 35

statement ok
CREATE VIEW view_2_tab4_491 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 35)

statement ok
CREATE VIEW view_3_tab4_491 AS SELECT pk FROM view_1_tab4_491

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 35
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 35)
----
3
6
4
18
6
7
8
29

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_491
----
12 values hashing to fe8d19596a98ba759a0ce0a1efb54e8b

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_491
----
3
6
4
18
6
7
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 35 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_491 UNION ALL SELECT pk, col0 FROM view_2_tab4_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 35 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_491 UNION SELECT pk, col0 FROM view_2_tab4_491
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 35 ) AS tab4_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_491
----
0
1
2
5
7
9

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE col0 >= 35
----
0
1
2
5
7
9

statement ok
DROP VIEW view_1_tab4_491

statement ok
DROP VIEW view_2_tab4_491

statement ok
DROP VIEW view_3_tab4_491

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_492') DROP VIEW view_1_tab0_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_492') DROP VIEW view_2_tab0_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_492') DROP VIEW view_3_tab0_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_492

statement ok
CREATE VIEW view_1_tab0_492 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9

statement ok
CREATE VIEW view_2_tab0_492 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)

statement ok
CREATE VIEW view_3_tab0_492 AS SELECT pk FROM view_1_tab0_492

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
1
65
3
6

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_492
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_492
----
1
65
3
6

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_492 UNION ALL SELECT pk, col0 FROM view_2_tab0_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_492 UNION SELECT pk, col0 FROM view_2_tab0_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 ) AS tab0_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
0
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_492

statement ok
DROP VIEW view_2_tab0_492

statement ok
DROP VIEW view_3_tab0_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_492') DROP VIEW view_1_tab1_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_492') DROP VIEW view_2_tab1_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_492') DROP VIEW view_3_tab1_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_492

statement ok
CREATE VIEW view_1_tab1_492 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9

statement ok
CREATE VIEW view_2_tab1_492 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)

statement ok
CREATE VIEW view_3_tab1_492 AS SELECT pk FROM view_1_tab1_492

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
1
65
3
6

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_492
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_492
----
1
65
3
6

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_492 UNION ALL SELECT pk, col0 FROM view_2_tab1_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_492 UNION SELECT pk, col0 FROM view_2_tab1_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 ) AS tab1_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
0
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_492

statement ok
DROP VIEW view_2_tab1_492

statement ok
DROP VIEW view_3_tab1_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_492') DROP VIEW view_1_tab2_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_492') DROP VIEW view_2_tab2_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_492') DROP VIEW view_3_tab2_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_492

statement ok
CREATE VIEW view_1_tab2_492 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9

statement ok
CREATE VIEW view_2_tab2_492 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)

statement ok
CREATE VIEW view_3_tab2_492 AS SELECT pk FROM view_1_tab2_492

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
1
65
3
6

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_492
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_492
----
1
65
3
6

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_492 UNION ALL SELECT pk, col0 FROM view_2_tab2_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_492 UNION SELECT pk, col0 FROM view_2_tab2_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 ) AS tab2_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
0
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_492

statement ok
DROP VIEW view_2_tab2_492

statement ok
DROP VIEW view_3_tab2_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_492') DROP VIEW view_1_tab3_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_492') DROP VIEW view_2_tab3_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_492') DROP VIEW view_3_tab3_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_492

statement ok
CREATE VIEW view_1_tab3_492 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9

statement ok
CREATE VIEW view_2_tab3_492 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)

statement ok
CREATE VIEW view_3_tab3_492 AS SELECT pk FROM view_1_tab3_492

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
1
65
3
6

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_492
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_492
----
1
65
3
6

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_492 UNION ALL SELECT pk, col0 FROM view_2_tab3_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_492 UNION SELECT pk, col0 FROM view_2_tab3_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 ) AS tab3_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
0
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_492

statement ok
DROP VIEW view_2_tab3_492

statement ok
DROP VIEW view_3_tab3_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_492') DROP VIEW view_1_tab4_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_492') DROP VIEW view_2_tab4_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_492') DROP VIEW view_3_tab4_492

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_492

statement ok
CREATE VIEW view_1_tab4_492 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9

statement ok
CREATE VIEW view_2_tab4_492 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)

statement ok
CREATE VIEW view_3_tab4_492 AS SELECT pk FROM view_1_tab4_492

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
1
65
3
6

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_492
----
16 values hashing to bd03df8c3e93361b66b3a1f6497465ed

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_492
----
1
65
3
6

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_492 UNION ALL SELECT pk, col0 FROM view_2_tab4_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 83 OR col0 IS NULL AND col0 < 9)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_492 UNION SELECT pk, col0 FROM view_2_tab4_492
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9 ) AS tab4_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_492
----
0
2
4
5
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE col3 <= 83 OR col0 IS NULL AND col0 < 9
----
0
2
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_492

statement ok
DROP VIEW view_2_tab4_492

statement ok
DROP VIEW view_3_tab4_492

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_493') DROP VIEW view_1_tab0_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_493') DROP VIEW view_2_tab0_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_493') DROP VIEW view_3_tab0_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_493

statement ok
CREATE VIEW view_1_tab0_493 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 35

statement ok
CREATE VIEW view_2_tab0_493 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 35)

statement ok
CREATE VIEW view_3_tab0_493 AS SELECT pk FROM view_1_tab0_493

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 35
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 35)
----
0
37
5
67
8
29

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_493
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_493
----
0
37
5
67
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 35 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_493 UNION ALL SELECT pk, col0 FROM view_2_tab0_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 35 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_493 UNION SELECT pk, col0 FROM view_2_tab0_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 35 ) AS tab0_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE col3 >= 35
----
1
2
3
4
6
7
9

statement ok
DROP VIEW view_1_tab0_493

statement ok
DROP VIEW view_2_tab0_493

statement ok
DROP VIEW view_3_tab0_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_493') DROP VIEW view_1_tab1_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_493') DROP VIEW view_2_tab1_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_493') DROP VIEW view_3_tab1_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_493

statement ok
CREATE VIEW view_1_tab1_493 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 35

statement ok
CREATE VIEW view_2_tab1_493 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 35)

statement ok
CREATE VIEW view_3_tab1_493 AS SELECT pk FROM view_1_tab1_493

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 35
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 35)
----
0
37
5
67
8
29

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_493
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_493
----
0
37
5
67
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 35 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_493 UNION ALL SELECT pk, col0 FROM view_2_tab1_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 35 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_493 UNION SELECT pk, col0 FROM view_2_tab1_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 35 ) AS tab1_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE col3 >= 35
----
1
2
3
4
6
7
9

statement ok
DROP VIEW view_1_tab1_493

statement ok
DROP VIEW view_2_tab1_493

statement ok
DROP VIEW view_3_tab1_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_493') DROP VIEW view_1_tab2_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_493') DROP VIEW view_2_tab2_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_493') DROP VIEW view_3_tab2_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_493

statement ok
CREATE VIEW view_1_tab2_493 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 35

statement ok
CREATE VIEW view_2_tab2_493 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 35)

statement ok
CREATE VIEW view_3_tab2_493 AS SELECT pk FROM view_1_tab2_493

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 35
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 35)
----
0
37
5
67
8
29

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_493
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_493
----
0
37
5
67
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 35 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_493 UNION ALL SELECT pk, col0 FROM view_2_tab2_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 35 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_493 UNION SELECT pk, col0 FROM view_2_tab2_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 35 ) AS tab2_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE col3 >= 35
----
1
2
3
4
6
7
9

statement ok
DROP VIEW view_1_tab2_493

statement ok
DROP VIEW view_2_tab2_493

statement ok
DROP VIEW view_3_tab2_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_493') DROP VIEW view_1_tab3_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_493') DROP VIEW view_2_tab3_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_493') DROP VIEW view_3_tab3_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_493

statement ok
CREATE VIEW view_1_tab3_493 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 35

statement ok
CREATE VIEW view_2_tab3_493 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 35)

statement ok
CREATE VIEW view_3_tab3_493 AS SELECT pk FROM view_1_tab3_493

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 35
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 35)
----
0
37
5
67
8
29

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_493
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_493
----
0
37
5
67
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 35 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_493 UNION ALL SELECT pk, col0 FROM view_2_tab3_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 35 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_493 UNION SELECT pk, col0 FROM view_2_tab3_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 35 ) AS tab3_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE col3 >= 35
----
1
2
3
4
6
7
9

statement ok
DROP VIEW view_1_tab3_493

statement ok
DROP VIEW view_2_tab3_493

statement ok
DROP VIEW view_3_tab3_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_493') DROP VIEW view_1_tab4_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_493') DROP VIEW view_2_tab4_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_493') DROP VIEW view_3_tab4_493

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_493

statement ok
CREATE VIEW view_1_tab4_493 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 35

statement ok
CREATE VIEW view_2_tab4_493 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 35)

statement ok
CREATE VIEW view_3_tab4_493 AS SELECT pk FROM view_1_tab4_493

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 35
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 35)
----
0
37
5
67
8
29

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_493
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_493
----
0
37
5
67
8
29

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 35 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_493 UNION ALL SELECT pk, col0 FROM view_2_tab4_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 35 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_493 UNION SELECT pk, col0 FROM view_2_tab4_493
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 35 ) AS tab4_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_493
----
1
2
3
4
6
7
9

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE col3 >= 35
----
1
2
3
4
6
7
9

statement ok
DROP VIEW view_1_tab4_493

statement ok
DROP VIEW view_2_tab4_493

statement ok
DROP VIEW view_3_tab4_493

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_494') DROP VIEW view_1_tab0_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_494') DROP VIEW view_2_tab0_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_494') DROP VIEW view_3_tab0_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_494

statement ok
CREATE VIEW view_1_tab0_494 AS SELECT pk, col0 FROM tab0 WHERE (col1 > 58.64)

statement ok
CREATE VIEW view_2_tab0_494 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 58.64))

statement ok
CREATE VIEW view_3_tab0_494 AS SELECT pk FROM view_1_tab0_494

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE (col1 > 58.64)
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 58.64))
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_494
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_494
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 58.64) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_494 UNION ALL SELECT pk, col0 FROM view_2_tab0_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 > 58.64) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_494 UNION SELECT pk, col0 FROM view_2_tab0_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 > 58.64) ) AS tab0_494
----
1
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_494
----
1
5

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE (col1 > 58.64)
----
1
5

statement ok
DROP VIEW view_1_tab0_494

statement ok
DROP VIEW view_2_tab0_494

statement ok
DROP VIEW view_3_tab0_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_494') DROP VIEW view_1_tab1_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_494') DROP VIEW view_2_tab1_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_494') DROP VIEW view_3_tab1_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_494

statement ok
CREATE VIEW view_1_tab1_494 AS SELECT pk, col0 FROM tab1 WHERE (col1 > 58.64)

statement ok
CREATE VIEW view_2_tab1_494 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 58.64))

statement ok
CREATE VIEW view_3_tab1_494 AS SELECT pk FROM view_1_tab1_494

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE (col1 > 58.64)
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 58.64))
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_494
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_494
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 58.64) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_494 UNION ALL SELECT pk, col0 FROM view_2_tab1_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 > 58.64) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_494 UNION SELECT pk, col0 FROM view_2_tab1_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 > 58.64) ) AS tab1_494
----
1
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_494
----
1
5

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE (col1 > 58.64)
----
1
5

statement ok
DROP VIEW view_1_tab1_494

statement ok
DROP VIEW view_2_tab1_494

statement ok
DROP VIEW view_3_tab1_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_494') DROP VIEW view_1_tab2_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_494') DROP VIEW view_2_tab2_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_494') DROP VIEW view_3_tab2_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_494

statement ok
CREATE VIEW view_1_tab2_494 AS SELECT pk, col0 FROM tab2 WHERE (col1 > 58.64)

statement ok
CREATE VIEW view_2_tab2_494 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 58.64))

statement ok
CREATE VIEW view_3_tab2_494 AS SELECT pk FROM view_1_tab2_494

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE (col1 > 58.64)
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 58.64))
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_494
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_494
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 58.64) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_494 UNION ALL SELECT pk, col0 FROM view_2_tab2_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 > 58.64) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_494 UNION SELECT pk, col0 FROM view_2_tab2_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 > 58.64) ) AS tab2_494
----
1
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_494
----
1
5

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE (col1 > 58.64)
----
1
5

statement ok
DROP VIEW view_1_tab2_494

statement ok
DROP VIEW view_2_tab2_494

statement ok
DROP VIEW view_3_tab2_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_494') DROP VIEW view_1_tab3_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_494') DROP VIEW view_2_tab3_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_494') DROP VIEW view_3_tab3_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_494

statement ok
CREATE VIEW view_1_tab3_494 AS SELECT pk, col0 FROM tab3 WHERE (col1 > 58.64)

statement ok
CREATE VIEW view_2_tab3_494 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 58.64))

statement ok
CREATE VIEW view_3_tab3_494 AS SELECT pk FROM view_1_tab3_494

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE (col1 > 58.64)
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 58.64))
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_494
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_494
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 58.64) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_494 UNION ALL SELECT pk, col0 FROM view_2_tab3_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 > 58.64) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_494 UNION SELECT pk, col0 FROM view_2_tab3_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 > 58.64) ) AS tab3_494
----
1
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_494
----
1
5

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE (col1 > 58.64)
----
1
5

statement ok
DROP VIEW view_1_tab3_494

statement ok
DROP VIEW view_2_tab3_494

statement ok
DROP VIEW view_3_tab3_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_494') DROP VIEW view_1_tab4_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_494') DROP VIEW view_2_tab4_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_494') DROP VIEW view_3_tab4_494

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_494

statement ok
CREATE VIEW view_1_tab4_494 AS SELECT pk, col0 FROM tab4 WHERE (col1 > 58.64)

statement ok
CREATE VIEW view_2_tab4_494 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 58.64))

statement ok
CREATE VIEW view_3_tab4_494 AS SELECT pk FROM view_1_tab4_494

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE (col1 > 58.64)
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 58.64))
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_494
----
1
65
5
67

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_494
----
16 values hashing to 499b3842280b588cde6f6c67e2314480

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 58.64) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_494 UNION ALL SELECT pk, col0 FROM view_2_tab4_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 > 58.64) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 > 58.64))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_494 UNION SELECT pk, col0 FROM view_2_tab4_494
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 > 58.64) ) AS tab4_494
----
1
5

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_494
----
1
5

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE (col1 > 58.64)
----
1
5

statement ok
DROP VIEW view_1_tab4_494

statement ok
DROP VIEW view_2_tab4_494

statement ok
DROP VIEW view_3_tab4_494

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_495') DROP VIEW view_1_tab0_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_495') DROP VIEW view_2_tab0_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_495') DROP VIEW view_3_tab0_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_495

statement ok
CREATE VIEW view_1_tab0_495 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 41

statement ok
CREATE VIEW view_2_tab0_495 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 41)

statement ok
CREATE VIEW view_3_tab0_495 AS SELECT pk FROM view_1_tab0_495

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 41
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 41)
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_495
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_495
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 41 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_495 UNION ALL SELECT pk, col0 FROM view_2_tab0_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 41 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_495 UNION SELECT pk, col0 FROM view_2_tab0_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 41 ) AS tab0_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col3 <= 41
----
0
2
5
8
9

statement ok
DROP VIEW view_1_tab0_495

statement ok
DROP VIEW view_2_tab0_495

statement ok
DROP VIEW view_3_tab0_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_495') DROP VIEW view_1_tab1_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_495') DROP VIEW view_2_tab1_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_495') DROP VIEW view_3_tab1_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_495

statement ok
CREATE VIEW view_1_tab1_495 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 41

statement ok
CREATE VIEW view_2_tab1_495 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 41)

statement ok
CREATE VIEW view_3_tab1_495 AS SELECT pk FROM view_1_tab1_495

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 41
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 41)
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_495
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_495
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 41 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_495 UNION ALL SELECT pk, col0 FROM view_2_tab1_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 41 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_495 UNION SELECT pk, col0 FROM view_2_tab1_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 41 ) AS tab1_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col3 <= 41
----
0
2
5
8
9

statement ok
DROP VIEW view_1_tab1_495

statement ok
DROP VIEW view_2_tab1_495

statement ok
DROP VIEW view_3_tab1_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_495') DROP VIEW view_1_tab2_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_495') DROP VIEW view_2_tab2_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_495') DROP VIEW view_3_tab2_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_495

statement ok
CREATE VIEW view_1_tab2_495 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 41

statement ok
CREATE VIEW view_2_tab2_495 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 41)

statement ok
CREATE VIEW view_3_tab2_495 AS SELECT pk FROM view_1_tab2_495

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 41
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 41)
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_495
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_495
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 41 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_495 UNION ALL SELECT pk, col0 FROM view_2_tab2_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 41 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_495 UNION SELECT pk, col0 FROM view_2_tab2_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 41 ) AS tab2_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col3 <= 41
----
0
2
5
8
9

statement ok
DROP VIEW view_1_tab2_495

statement ok
DROP VIEW view_2_tab2_495

statement ok
DROP VIEW view_3_tab2_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_495') DROP VIEW view_1_tab3_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_495') DROP VIEW view_2_tab3_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_495') DROP VIEW view_3_tab3_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_495

statement ok
CREATE VIEW view_1_tab3_495 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 41

statement ok
CREATE VIEW view_2_tab3_495 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 41)

statement ok
CREATE VIEW view_3_tab3_495 AS SELECT pk FROM view_1_tab3_495

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 41
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 41)
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_495
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_495
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 41 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_495 UNION ALL SELECT pk, col0 FROM view_2_tab3_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 41 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_495 UNION SELECT pk, col0 FROM view_2_tab3_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 41 ) AS tab3_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col3 <= 41
----
0
2
5
8
9

statement ok
DROP VIEW view_1_tab3_495

statement ok
DROP VIEW view_2_tab3_495

statement ok
DROP VIEW view_3_tab3_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_495') DROP VIEW view_1_tab4_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_495') DROP VIEW view_2_tab4_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_495') DROP VIEW view_3_tab4_495

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_495

statement ok
CREATE VIEW view_1_tab4_495 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 41

statement ok
CREATE VIEW view_2_tab4_495 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 41)

statement ok
CREATE VIEW view_3_tab4_495 AS SELECT pk FROM view_1_tab4_495

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 41
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 41)
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_495
----
10 values hashing to 4e6890200776c1d36258fd68d7e5594b

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_495
----
10 values hashing to 7dcc5fde74b3b6e416b30d8d24083117

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 41 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_495 UNION ALL SELECT pk, col0 FROM view_2_tab4_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 41 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 41)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_495 UNION SELECT pk, col0 FROM view_2_tab4_495
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 41 ) AS tab4_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_495
----
0
2
5
8
9

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col3 <= 41
----
0
2
5
8
9

statement ok
DROP VIEW view_1_tab4_495

statement ok
DROP VIEW view_2_tab4_495

statement ok
DROP VIEW view_3_tab4_495

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_496') DROP VIEW view_1_tab0_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_496') DROP VIEW view_2_tab0_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_496') DROP VIEW view_3_tab0_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_496

statement ok
CREATE VIEW view_1_tab0_496 AS SELECT pk, col0 FROM tab0 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))

statement ok
CREATE VIEW view_2_tab0_496 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))

statement ok
CREATE VIEW view_3_tab0_496 AS SELECT pk FROM view_1_tab0_496

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_496
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_496 UNION ALL SELECT pk, col0 FROM view_2_tab0_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_496 UNION SELECT pk, col0 FROM view_2_tab0_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) ) AS tab0_496
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_496
----

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

statement ok
DROP VIEW view_1_tab0_496

statement ok
DROP VIEW view_2_tab0_496

statement ok
DROP VIEW view_3_tab0_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_496') DROP VIEW view_1_tab1_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_496') DROP VIEW view_2_tab1_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_496') DROP VIEW view_3_tab1_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_496

statement ok
CREATE VIEW view_1_tab1_496 AS SELECT pk, col0 FROM tab1 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))

statement ok
CREATE VIEW view_2_tab1_496 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))

statement ok
CREATE VIEW view_3_tab1_496 AS SELECT pk FROM view_1_tab1_496

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_496
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_496 UNION ALL SELECT pk, col0 FROM view_2_tab1_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_496 UNION SELECT pk, col0 FROM view_2_tab1_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) ) AS tab1_496
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_496
----

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

statement ok
DROP VIEW view_1_tab1_496

statement ok
DROP VIEW view_2_tab1_496

statement ok
DROP VIEW view_3_tab1_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_496') DROP VIEW view_1_tab2_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_496') DROP VIEW view_2_tab2_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_496') DROP VIEW view_3_tab2_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_496

statement ok
CREATE VIEW view_1_tab2_496 AS SELECT pk, col0 FROM tab2 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))

statement ok
CREATE VIEW view_2_tab2_496 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))

statement ok
CREATE VIEW view_3_tab2_496 AS SELECT pk FROM view_1_tab2_496

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_496
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_496 UNION ALL SELECT pk, col0 FROM view_2_tab2_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_496 UNION SELECT pk, col0 FROM view_2_tab2_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) ) AS tab2_496
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_496
----

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

statement ok
DROP VIEW view_1_tab2_496

statement ok
DROP VIEW view_2_tab2_496

statement ok
DROP VIEW view_3_tab2_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_496') DROP VIEW view_1_tab3_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_496') DROP VIEW view_2_tab3_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_496') DROP VIEW view_3_tab3_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_496

statement ok
CREATE VIEW view_1_tab3_496 AS SELECT pk, col0 FROM tab3 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))

statement ok
CREATE VIEW view_2_tab3_496 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))

statement ok
CREATE VIEW view_3_tab3_496 AS SELECT pk FROM view_1_tab3_496

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_496
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_496 UNION ALL SELECT pk, col0 FROM view_2_tab3_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_496 UNION SELECT pk, col0 FROM view_2_tab3_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) ) AS tab3_496
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_496
----

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

statement ok
DROP VIEW view_1_tab3_496

statement ok
DROP VIEW view_2_tab3_496

statement ok
DROP VIEW view_3_tab3_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_496') DROP VIEW view_1_tab4_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_496') DROP VIEW view_2_tab4_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_496') DROP VIEW view_3_tab4_496

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_496

statement ok
CREATE VIEW view_1_tab4_496 AS SELECT pk, col0 FROM tab4 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))

statement ok
CREATE VIEW view_2_tab4_496 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))

statement ok
CREATE VIEW view_3_tab4_496 AS SELECT pk FROM view_1_tab4_496

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_496
----

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_496 UNION ALL SELECT pk, col0 FROM view_2_tab4_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_496 UNION SELECT pk, col0 FROM view_2_tab4_496
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14)) ) AS tab4_496
----

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_496
----

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE col0 = 56 OR col0 >= 47 AND (((col0 > 62))) AND col3 <= 54 AND col4 >= 50.76 AND ((col4 > 3.43 AND col4 < 48.14))
----

statement ok
DROP VIEW view_1_tab4_496

statement ok
DROP VIEW view_2_tab4_496

statement ok
DROP VIEW view_3_tab4_496

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_497') DROP VIEW view_1_tab0_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_497') DROP VIEW view_2_tab0_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_497') DROP VIEW view_3_tab0_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_497

statement ok
CREATE VIEW view_1_tab0_497 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 35

statement ok
CREATE VIEW view_2_tab0_497 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 35)

statement ok
CREATE VIEW view_3_tab0_497 AS SELECT pk FROM view_1_tab0_497

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 35
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 35)
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_497
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_497
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 35 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_497 UNION ALL SELECT pk, col0 FROM view_2_tab0_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 35 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_497 UNION SELECT pk, col0 FROM view_2_tab0_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 35 ) AS tab0_497
----
0
5
8

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_497
----
0
5
8

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE col3 <= 35
----
0
5
8

statement ok
DROP VIEW view_1_tab0_497

statement ok
DROP VIEW view_2_tab0_497

statement ok
DROP VIEW view_3_tab0_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_497') DROP VIEW view_1_tab1_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_497') DROP VIEW view_2_tab1_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_497') DROP VIEW view_3_tab1_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_497

statement ok
CREATE VIEW view_1_tab1_497 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 35

statement ok
CREATE VIEW view_2_tab1_497 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 35)

statement ok
CREATE VIEW view_3_tab1_497 AS SELECT pk FROM view_1_tab1_497

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 35
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 35)
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_497
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_497
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 35 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_497 UNION ALL SELECT pk, col0 FROM view_2_tab1_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 35 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_497 UNION SELECT pk, col0 FROM view_2_tab1_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 35 ) AS tab1_497
----
0
5
8

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_497
----
0
5
8

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE col3 <= 35
----
0
5
8

statement ok
DROP VIEW view_1_tab1_497

statement ok
DROP VIEW view_2_tab1_497

statement ok
DROP VIEW view_3_tab1_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_497') DROP VIEW view_1_tab2_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_497') DROP VIEW view_2_tab2_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_497') DROP VIEW view_3_tab2_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_497

statement ok
CREATE VIEW view_1_tab2_497 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 35

statement ok
CREATE VIEW view_2_tab2_497 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 35)

statement ok
CREATE VIEW view_3_tab2_497 AS SELECT pk FROM view_1_tab2_497

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 35
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 35)
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_497
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_497
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 35 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_497 UNION ALL SELECT pk, col0 FROM view_2_tab2_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 35 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_497 UNION SELECT pk, col0 FROM view_2_tab2_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 35 ) AS tab2_497
----
0
5
8

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_497
----
0
5
8

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE col3 <= 35
----
0
5
8

statement ok
DROP VIEW view_1_tab2_497

statement ok
DROP VIEW view_2_tab2_497

statement ok
DROP VIEW view_3_tab2_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_497') DROP VIEW view_1_tab3_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_497') DROP VIEW view_2_tab3_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_497') DROP VIEW view_3_tab3_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_497

statement ok
CREATE VIEW view_1_tab3_497 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 35

statement ok
CREATE VIEW view_2_tab3_497 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 35)

statement ok
CREATE VIEW view_3_tab3_497 AS SELECT pk FROM view_1_tab3_497

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 35
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 35)
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_497
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_497
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 35 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_497 UNION ALL SELECT pk, col0 FROM view_2_tab3_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 35 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_497 UNION SELECT pk, col0 FROM view_2_tab3_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 35 ) AS tab3_497
----
0
5
8

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_497
----
0
5
8

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE col3 <= 35
----
0
5
8

statement ok
DROP VIEW view_1_tab3_497

statement ok
DROP VIEW view_2_tab3_497

statement ok
DROP VIEW view_3_tab3_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_497') DROP VIEW view_1_tab4_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_497') DROP VIEW view_2_tab4_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_497') DROP VIEW view_3_tab4_497

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_497

statement ok
CREATE VIEW view_1_tab4_497 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 35

statement ok
CREATE VIEW view_2_tab4_497 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 35)

statement ok
CREATE VIEW view_3_tab4_497 AS SELECT pk FROM view_1_tab4_497

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 35
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 35)
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_497
----
0
37
5
67
8
29

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_497
----
14 values hashing to eecf120a42ce0869f5b0f23bc5485c8f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 35 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_497 UNION ALL SELECT pk, col0 FROM view_2_tab4_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 35 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 35)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_497 UNION SELECT pk, col0 FROM view_2_tab4_497
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 35 ) AS tab4_497
----
0
5
8

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_497
----
0
5
8

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE col3 <= 35
----
0
5
8

statement ok
DROP VIEW view_1_tab4_497

statement ok
DROP VIEW view_2_tab4_497

statement ok
DROP VIEW view_3_tab4_497

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_499') DROP VIEW view_1_tab0_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_499') DROP VIEW view_2_tab0_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_499') DROP VIEW view_3_tab0_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_499

statement ok
CREATE VIEW view_1_tab0_499 AS SELECT pk, col0 FROM tab0 WHERE col0 < 42

statement ok
CREATE VIEW view_2_tab0_499 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 42)

statement ok
CREATE VIEW view_3_tab0_499 AS SELECT pk FROM view_1_tab0_499

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE col0 < 42
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 42)
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_499
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_499
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 42 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_499 UNION ALL SELECT pk, col0 FROM view_2_tab0_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 42 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_499 UNION SELECT pk, col0 FROM view_2_tab0_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 42 ) AS tab0_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE col0 < 42
----
0
3
4
6
8

statement ok
DROP VIEW view_1_tab0_499

statement ok
DROP VIEW view_2_tab0_499

statement ok
DROP VIEW view_3_tab0_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_499') DROP VIEW view_1_tab1_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_499') DROP VIEW view_2_tab1_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_499') DROP VIEW view_3_tab1_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_499

statement ok
CREATE VIEW view_1_tab1_499 AS SELECT pk, col0 FROM tab1 WHERE col0 < 42

statement ok
CREATE VIEW view_2_tab1_499 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 42)

statement ok
CREATE VIEW view_3_tab1_499 AS SELECT pk FROM view_1_tab1_499

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE col0 < 42
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 42)
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_499
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_499
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 42 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_499 UNION ALL SELECT pk, col0 FROM view_2_tab1_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 42 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_499 UNION SELECT pk, col0 FROM view_2_tab1_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 42 ) AS tab1_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE col0 < 42
----
0
3
4
6
8

statement ok
DROP VIEW view_1_tab1_499

statement ok
DROP VIEW view_2_tab1_499

statement ok
DROP VIEW view_3_tab1_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_499') DROP VIEW view_1_tab2_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_499') DROP VIEW view_2_tab2_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_499') DROP VIEW view_3_tab2_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_499

statement ok
CREATE VIEW view_1_tab2_499 AS SELECT pk, col0 FROM tab2 WHERE col0 < 42

statement ok
CREATE VIEW view_2_tab2_499 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 42)

statement ok
CREATE VIEW view_3_tab2_499 AS SELECT pk FROM view_1_tab2_499

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE col0 < 42
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 42)
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_499
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_499
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 42 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_499 UNION ALL SELECT pk, col0 FROM view_2_tab2_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 42 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_499 UNION SELECT pk, col0 FROM view_2_tab2_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 42 ) AS tab2_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE col0 < 42
----
0
3
4
6
8

statement ok
DROP VIEW view_1_tab2_499

statement ok
DROP VIEW view_2_tab2_499

statement ok
DROP VIEW view_3_tab2_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_499') DROP VIEW view_1_tab3_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_499') DROP VIEW view_2_tab3_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_499') DROP VIEW view_3_tab3_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_499

statement ok
CREATE VIEW view_1_tab3_499 AS SELECT pk, col0 FROM tab3 WHERE col0 < 42

statement ok
CREATE VIEW view_2_tab3_499 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 42)

statement ok
CREATE VIEW view_3_tab3_499 AS SELECT pk FROM view_1_tab3_499

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE col0 < 42
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 42)
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_499
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_499
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 42 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_499 UNION ALL SELECT pk, col0 FROM view_2_tab3_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 42 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_499 UNION SELECT pk, col0 FROM view_2_tab3_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 42 ) AS tab3_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE col0 < 42
----
0
3
4
6
8

statement ok
DROP VIEW view_1_tab3_499

statement ok
DROP VIEW view_2_tab3_499

statement ok
DROP VIEW view_3_tab3_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_499') DROP VIEW view_1_tab4_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_499') DROP VIEW view_2_tab4_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_499') DROP VIEW view_3_tab4_499

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_499

statement ok
CREATE VIEW view_1_tab4_499 AS SELECT pk, col0 FROM tab4 WHERE col0 < 42

statement ok
CREATE VIEW view_2_tab4_499 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 42)

statement ok
CREATE VIEW view_3_tab4_499 AS SELECT pk FROM view_1_tab4_499

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE col0 < 42
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 42)
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_499
----
10 values hashing to e10d9ef23d97bc6d1cd795c57b31a38c

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_499
----
10 values hashing to 3c7e14685a6a2b3a471a9b149e8c580d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 42 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_499 UNION ALL SELECT pk, col0 FROM view_2_tab4_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 42 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 42)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_499 UNION SELECT pk, col0 FROM view_2_tab4_499
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 42 ) AS tab4_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_499
----
0
3
4
6
8

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE col0 < 42
----
0
3
4
6
8

statement ok
DROP VIEW view_1_tab4_499

statement ok
DROP VIEW view_2_tab4_499

statement ok
DROP VIEW view_3_tab4_499

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_501') DROP VIEW view_1_tab0_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_501') DROP VIEW view_2_tab0_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_501') DROP VIEW view_3_tab0_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_501

statement ok
CREATE VIEW view_1_tab0_501 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 17

statement ok
CREATE VIEW view_2_tab0_501 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 17)

statement ok
CREATE VIEW view_3_tab0_501 AS SELECT pk FROM view_1_tab0_501

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 17
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 17)
----
5
67

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_501
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_501
----
5
67

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 17 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_501 UNION ALL SELECT pk, col0 FROM view_2_tab0_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 17 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_501 UNION SELECT pk, col0 FROM view_2_tab0_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 17 ) AS tab0_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE col3 >= 17
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab0_501

statement ok
DROP VIEW view_2_tab0_501

statement ok
DROP VIEW view_3_tab0_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_501') DROP VIEW view_1_tab1_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_501') DROP VIEW view_2_tab1_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_501') DROP VIEW view_3_tab1_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_501

statement ok
CREATE VIEW view_1_tab1_501 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 17

statement ok
CREATE VIEW view_2_tab1_501 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 17)

statement ok
CREATE VIEW view_3_tab1_501 AS SELECT pk FROM view_1_tab1_501

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 17
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 17)
----
5
67

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_501
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_501
----
5
67

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 17 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_501 UNION ALL SELECT pk, col0 FROM view_2_tab1_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 17 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_501 UNION SELECT pk, col0 FROM view_2_tab1_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 17 ) AS tab1_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE col3 >= 17
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab1_501

statement ok
DROP VIEW view_2_tab1_501

statement ok
DROP VIEW view_3_tab1_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_501') DROP VIEW view_1_tab2_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_501') DROP VIEW view_2_tab2_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_501') DROP VIEW view_3_tab2_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_501

statement ok
CREATE VIEW view_1_tab2_501 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 17

statement ok
CREATE VIEW view_2_tab2_501 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 17)

statement ok
CREATE VIEW view_3_tab2_501 AS SELECT pk FROM view_1_tab2_501

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 17
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 17)
----
5
67

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_501
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_501
----
5
67

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 17 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_501 UNION ALL SELECT pk, col0 FROM view_2_tab2_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 17 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_501 UNION SELECT pk, col0 FROM view_2_tab2_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 17 ) AS tab2_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE col3 >= 17
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab2_501

statement ok
DROP VIEW view_2_tab2_501

statement ok
DROP VIEW view_3_tab2_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_501') DROP VIEW view_1_tab3_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_501') DROP VIEW view_2_tab3_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_501') DROP VIEW view_3_tab3_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_501

statement ok
CREATE VIEW view_1_tab3_501 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 17

statement ok
CREATE VIEW view_2_tab3_501 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 17)

statement ok
CREATE VIEW view_3_tab3_501 AS SELECT pk FROM view_1_tab3_501

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 17
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 17)
----
5
67

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_501
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_501
----
5
67

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 17 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_501 UNION ALL SELECT pk, col0 FROM view_2_tab3_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 17 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_501 UNION SELECT pk, col0 FROM view_2_tab3_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 17 ) AS tab3_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE col3 >= 17
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab3_501

statement ok
DROP VIEW view_2_tab3_501

statement ok
DROP VIEW view_3_tab3_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_501') DROP VIEW view_1_tab4_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_501') DROP VIEW view_2_tab4_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_501') DROP VIEW view_3_tab4_501

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_501

statement ok
CREATE VIEW view_1_tab4_501 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 17

statement ok
CREATE VIEW view_2_tab4_501 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 17)

statement ok
CREATE VIEW view_3_tab4_501 AS SELECT pk FROM view_1_tab4_501

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 17
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 17)
----
5
67

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_501
----
18 values hashing to 64d673d63718f0b89cff702520b1828a

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_501
----
5
67

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 17 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_501 UNION ALL SELECT pk, col0 FROM view_2_tab4_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 17 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 17)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_501 UNION SELECT pk, col0 FROM view_2_tab4_501
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 17 ) AS tab4_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_501
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE col3 >= 17
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab4_501

statement ok
DROP VIEW view_2_tab4_501

statement ok
DROP VIEW view_3_tab4_501

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_502') DROP VIEW view_1_tab0_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_502') DROP VIEW view_2_tab0_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_502') DROP VIEW view_3_tab0_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_502

statement ok
CREATE VIEW view_1_tab0_502 AS SELECT pk, col0 FROM tab0 WHERE col3 > 81

statement ok
CREATE VIEW view_2_tab0_502 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 81)

statement ok
CREATE VIEW view_3_tab0_502 AS SELECT pk FROM view_1_tab0_502

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col3 > 81
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 81)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_502
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_502
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 81 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_502 UNION ALL SELECT pk, col0 FROM view_2_tab0_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 81 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_502 UNION SELECT pk, col0 FROM view_2_tab0_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 81 ) AS tab0_502
----
1
3
7

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_502
----
1
3
7

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col3 > 81
----
1
3
7

statement ok
DROP VIEW view_1_tab0_502

statement ok
DROP VIEW view_2_tab0_502

statement ok
DROP VIEW view_3_tab0_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_502') DROP VIEW view_1_tab1_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_502') DROP VIEW view_2_tab1_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_502') DROP VIEW view_3_tab1_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_502

statement ok
CREATE VIEW view_1_tab1_502 AS SELECT pk, col0 FROM tab1 WHERE col3 > 81

statement ok
CREATE VIEW view_2_tab1_502 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 81)

statement ok
CREATE VIEW view_3_tab1_502 AS SELECT pk FROM view_1_tab1_502

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col3 > 81
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 81)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_502
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_502
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 81 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_502 UNION ALL SELECT pk, col0 FROM view_2_tab1_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 81 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_502 UNION SELECT pk, col0 FROM view_2_tab1_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 81 ) AS tab1_502
----
1
3
7

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_502
----
1
3
7

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col3 > 81
----
1
3
7

statement ok
DROP VIEW view_1_tab1_502

statement ok
DROP VIEW view_2_tab1_502

statement ok
DROP VIEW view_3_tab1_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_502') DROP VIEW view_1_tab2_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_502') DROP VIEW view_2_tab2_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_502') DROP VIEW view_3_tab2_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_502

statement ok
CREATE VIEW view_1_tab2_502 AS SELECT pk, col0 FROM tab2 WHERE col3 > 81

statement ok
CREATE VIEW view_2_tab2_502 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 81)

statement ok
CREATE VIEW view_3_tab2_502 AS SELECT pk FROM view_1_tab2_502

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col3 > 81
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 81)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_502
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_502
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 81 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_502 UNION ALL SELECT pk, col0 FROM view_2_tab2_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 81 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_502 UNION SELECT pk, col0 FROM view_2_tab2_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 81 ) AS tab2_502
----
1
3
7

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_502
----
1
3
7

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col3 > 81
----
1
3
7

statement ok
DROP VIEW view_1_tab2_502

statement ok
DROP VIEW view_2_tab2_502

statement ok
DROP VIEW view_3_tab2_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_502') DROP VIEW view_1_tab3_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_502') DROP VIEW view_2_tab3_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_502') DROP VIEW view_3_tab3_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_502

statement ok
CREATE VIEW view_1_tab3_502 AS SELECT pk, col0 FROM tab3 WHERE col3 > 81

statement ok
CREATE VIEW view_2_tab3_502 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 81)

statement ok
CREATE VIEW view_3_tab3_502 AS SELECT pk FROM view_1_tab3_502

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col3 > 81
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 81)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_502
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_502
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 81 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_502 UNION ALL SELECT pk, col0 FROM view_2_tab3_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 81 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_502 UNION SELECT pk, col0 FROM view_2_tab3_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 81 ) AS tab3_502
----
1
3
7

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_502
----
1
3
7

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col3 > 81
----
1
3
7

statement ok
DROP VIEW view_1_tab3_502

statement ok
DROP VIEW view_2_tab3_502

statement ok
DROP VIEW view_3_tab3_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_502') DROP VIEW view_1_tab4_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_502') DROP VIEW view_2_tab4_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_502') DROP VIEW view_3_tab4_502

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_502

statement ok
CREATE VIEW view_1_tab4_502 AS SELECT pk, col0 FROM tab4 WHERE col3 > 81

statement ok
CREATE VIEW view_2_tab4_502 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 81)

statement ok
CREATE VIEW view_3_tab4_502 AS SELECT pk FROM view_1_tab4_502

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE col3 > 81
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 81)
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_502
----
1
65
3
6
7
52

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_502
----
14 values hashing to c9b2251d8a6dc63ad1ded284363cc037

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 81 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_502 UNION ALL SELECT pk, col0 FROM view_2_tab4_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 81 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 81)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_502 UNION SELECT pk, col0 FROM view_2_tab4_502
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 81 ) AS tab4_502
----
1
3
7

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_502
----
1
3
7

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE col3 > 81
----
1
3
7

statement ok
DROP VIEW view_1_tab4_502

statement ok
DROP VIEW view_2_tab4_502

statement ok
DROP VIEW view_3_tab4_502

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_503') DROP VIEW view_1_tab0_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_503') DROP VIEW view_2_tab0_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_503') DROP VIEW view_3_tab0_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_503

statement ok
CREATE VIEW view_1_tab0_503 AS SELECT pk, col0 FROM tab0 WHERE col1 <= 39.69

statement ok
CREATE VIEW view_2_tab0_503 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 39.69)

statement ok
CREATE VIEW view_3_tab0_503 AS SELECT pk FROM view_1_tab0_503

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE col1 <= 39.69
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 39.69)
----
1
65
5
67
7
52

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_503
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_503
----
1
65
5
67
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 39.69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_503 UNION ALL SELECT pk, col0 FROM view_2_tab0_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 <= 39.69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_503 UNION SELECT pk, col0 FROM view_2_tab0_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 <= 39.69 ) AS tab0_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE col1 <= 39.69
----
0
2
3
4
6
8
9

statement ok
DROP VIEW view_1_tab0_503

statement ok
DROP VIEW view_2_tab0_503

statement ok
DROP VIEW view_3_tab0_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_503') DROP VIEW view_1_tab1_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_503') DROP VIEW view_2_tab1_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_503') DROP VIEW view_3_tab1_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_503

statement ok
CREATE VIEW view_1_tab1_503 AS SELECT pk, col0 FROM tab1 WHERE col1 <= 39.69

statement ok
CREATE VIEW view_2_tab1_503 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 39.69)

statement ok
CREATE VIEW view_3_tab1_503 AS SELECT pk FROM view_1_tab1_503

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE col1 <= 39.69
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 39.69)
----
1
65
5
67
7
52

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_503
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_503
----
1
65
5
67
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 39.69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_503 UNION ALL SELECT pk, col0 FROM view_2_tab1_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 <= 39.69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_503 UNION SELECT pk, col0 FROM view_2_tab1_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 <= 39.69 ) AS tab1_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE col1 <= 39.69
----
0
2
3
4
6
8
9

statement ok
DROP VIEW view_1_tab1_503

statement ok
DROP VIEW view_2_tab1_503

statement ok
DROP VIEW view_3_tab1_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_503') DROP VIEW view_1_tab2_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_503') DROP VIEW view_2_tab2_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_503') DROP VIEW view_3_tab2_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_503

statement ok
CREATE VIEW view_1_tab2_503 AS SELECT pk, col0 FROM tab2 WHERE col1 <= 39.69

statement ok
CREATE VIEW view_2_tab2_503 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 39.69)

statement ok
CREATE VIEW view_3_tab2_503 AS SELECT pk FROM view_1_tab2_503

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE col1 <= 39.69
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 39.69)
----
1
65
5
67
7
52

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_503
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_503
----
1
65
5
67
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 39.69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_503 UNION ALL SELECT pk, col0 FROM view_2_tab2_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 <= 39.69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_503 UNION SELECT pk, col0 FROM view_2_tab2_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 <= 39.69 ) AS tab2_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE col1 <= 39.69
----
0
2
3
4
6
8
9

statement ok
DROP VIEW view_1_tab2_503

statement ok
DROP VIEW view_2_tab2_503

statement ok
DROP VIEW view_3_tab2_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_503') DROP VIEW view_1_tab3_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_503') DROP VIEW view_2_tab3_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_503') DROP VIEW view_3_tab3_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_503

statement ok
CREATE VIEW view_1_tab3_503 AS SELECT pk, col0 FROM tab3 WHERE col1 <= 39.69

statement ok
CREATE VIEW view_2_tab3_503 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 39.69)

statement ok
CREATE VIEW view_3_tab3_503 AS SELECT pk FROM view_1_tab3_503

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE col1 <= 39.69
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 39.69)
----
1
65
5
67
7
52

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_503
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_503
----
1
65
5
67
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 39.69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_503 UNION ALL SELECT pk, col0 FROM view_2_tab3_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 <= 39.69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_503 UNION SELECT pk, col0 FROM view_2_tab3_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 <= 39.69 ) AS tab3_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE col1 <= 39.69
----
0
2
3
4
6
8
9

statement ok
DROP VIEW view_1_tab3_503

statement ok
DROP VIEW view_2_tab3_503

statement ok
DROP VIEW view_3_tab3_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_503') DROP VIEW view_1_tab4_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_503') DROP VIEW view_2_tab4_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_503') DROP VIEW view_3_tab4_503

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_503

statement ok
CREATE VIEW view_1_tab4_503 AS SELECT pk, col0 FROM tab4 WHERE col1 <= 39.69

statement ok
CREATE VIEW view_2_tab4_503 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 39.69)

statement ok
CREATE VIEW view_3_tab4_503 AS SELECT pk FROM view_1_tab4_503

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE col1 <= 39.69
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 39.69)
----
1
65
5
67
7
52

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_503
----
14 values hashing to 5bd9531ef4346f3d81aecfff91039f43

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_503
----
1
65
5
67
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 39.69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_503 UNION ALL SELECT pk, col0 FROM view_2_tab4_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 <= 39.69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 <= 39.69)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_503 UNION SELECT pk, col0 FROM view_2_tab4_503
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 <= 39.69 ) AS tab4_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_503
----
0
2
3
4
6
8
9

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE col1 <= 39.69
----
0
2
3
4
6
8
9

statement ok
DROP VIEW view_1_tab4_503

statement ok
DROP VIEW view_2_tab4_503

statement ok
DROP VIEW view_3_tab4_503

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_504') DROP VIEW view_1_tab0_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_504') DROP VIEW view_2_tab0_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_504') DROP VIEW view_3_tab0_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_504

statement ok
CREATE VIEW view_1_tab0_504 AS SELECT pk, col0 FROM tab0 WHERE col3 < 99

statement ok
CREATE VIEW view_2_tab0_504 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 99)

statement ok
CREATE VIEW view_3_tab0_504 AS SELECT pk FROM view_1_tab0_504

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE col3 < 99
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 99)
----

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_504
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 99 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_504 UNION ALL SELECT pk, col0 FROM view_2_tab0_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 99 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_504 UNION SELECT pk, col0 FROM view_2_tab0_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 99 ) AS tab0_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_504

statement ok
DROP VIEW view_2_tab0_504

statement ok
DROP VIEW view_3_tab0_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_504') DROP VIEW view_1_tab1_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_504') DROP VIEW view_2_tab1_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_504') DROP VIEW view_3_tab1_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_504

statement ok
CREATE VIEW view_1_tab1_504 AS SELECT pk, col0 FROM tab1 WHERE col3 < 99

statement ok
CREATE VIEW view_2_tab1_504 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 99)

statement ok
CREATE VIEW view_3_tab1_504 AS SELECT pk FROM view_1_tab1_504

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE col3 < 99
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 99)
----

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_504
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 99 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_504 UNION ALL SELECT pk, col0 FROM view_2_tab1_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 99 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_504 UNION SELECT pk, col0 FROM view_2_tab1_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 99 ) AS tab1_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_504

statement ok
DROP VIEW view_2_tab1_504

statement ok
DROP VIEW view_3_tab1_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_504') DROP VIEW view_1_tab2_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_504') DROP VIEW view_2_tab2_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_504') DROP VIEW view_3_tab2_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_504

statement ok
CREATE VIEW view_1_tab2_504 AS SELECT pk, col0 FROM tab2 WHERE col3 < 99

statement ok
CREATE VIEW view_2_tab2_504 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 99)

statement ok
CREATE VIEW view_3_tab2_504 AS SELECT pk FROM view_1_tab2_504

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE col3 < 99
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 99)
----

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_504
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 99 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_504 UNION ALL SELECT pk, col0 FROM view_2_tab2_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 99 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_504 UNION SELECT pk, col0 FROM view_2_tab2_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 99 ) AS tab2_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_504

statement ok
DROP VIEW view_2_tab2_504

statement ok
DROP VIEW view_3_tab2_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_504') DROP VIEW view_1_tab3_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_504') DROP VIEW view_2_tab3_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_504') DROP VIEW view_3_tab3_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_504

statement ok
CREATE VIEW view_1_tab3_504 AS SELECT pk, col0 FROM tab3 WHERE col3 < 99

statement ok
CREATE VIEW view_2_tab3_504 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 99)

statement ok
CREATE VIEW view_3_tab3_504 AS SELECT pk FROM view_1_tab3_504

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE col3 < 99
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 99)
----

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_504
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 99 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_504 UNION ALL SELECT pk, col0 FROM view_2_tab3_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 99 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_504 UNION SELECT pk, col0 FROM view_2_tab3_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 99 ) AS tab3_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_504

statement ok
DROP VIEW view_2_tab3_504

statement ok
DROP VIEW view_3_tab3_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_504') DROP VIEW view_1_tab4_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_504') DROP VIEW view_2_tab4_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_504') DROP VIEW view_3_tab4_504

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_504

statement ok
CREATE VIEW view_1_tab4_504 AS SELECT pk, col0 FROM tab4 WHERE col3 < 99

statement ok
CREATE VIEW view_2_tab4_504 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 99)

statement ok
CREATE VIEW view_3_tab4_504 AS SELECT pk FROM view_1_tab4_504

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE col3 < 99
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 99)
----

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_504
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 99 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_504 UNION ALL SELECT pk, col0 FROM view_2_tab4_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 99 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 99)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_504 UNION SELECT pk, col0 FROM view_2_tab4_504
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 99 ) AS tab4_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_504
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE col3 < 99
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_504

statement ok
DROP VIEW view_2_tab4_504

statement ok
DROP VIEW view_3_tab4_504

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_505') DROP VIEW view_1_tab0_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_505') DROP VIEW view_2_tab0_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_505') DROP VIEW view_3_tab0_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_505

statement ok
CREATE VIEW view_1_tab0_505 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 23 AND (col1 = 69.86)

statement ok
CREATE VIEW view_2_tab0_505 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 23 AND (col1 = 69.86))

statement ok
CREATE VIEW view_3_tab0_505 AS SELECT pk FROM view_1_tab0_505

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 23 AND (col1 = 69.86)
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_505
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 23 AND (col1 = 69.86) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_505 UNION ALL SELECT pk, col0 FROM view_2_tab0_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 23 AND (col1 = 69.86) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_505 UNION SELECT pk, col0 FROM view_2_tab0_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 23 AND (col1 = 69.86) ) AS tab0_505
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_505
----

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE col0 >= 23 AND (col1 = 69.86)
----

statement ok
DROP VIEW view_1_tab0_505

statement ok
DROP VIEW view_2_tab0_505

statement ok
DROP VIEW view_3_tab0_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_505') DROP VIEW view_1_tab1_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_505') DROP VIEW view_2_tab1_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_505') DROP VIEW view_3_tab1_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_505

statement ok
CREATE VIEW view_1_tab1_505 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 23 AND (col1 = 69.86)

statement ok
CREATE VIEW view_2_tab1_505 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 23 AND (col1 = 69.86))

statement ok
CREATE VIEW view_3_tab1_505 AS SELECT pk FROM view_1_tab1_505

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 23 AND (col1 = 69.86)
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_505
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 23 AND (col1 = 69.86) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_505 UNION ALL SELECT pk, col0 FROM view_2_tab1_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 23 AND (col1 = 69.86) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_505 UNION SELECT pk, col0 FROM view_2_tab1_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 23 AND (col1 = 69.86) ) AS tab1_505
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_505
----

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE col0 >= 23 AND (col1 = 69.86)
----

statement ok
DROP VIEW view_1_tab1_505

statement ok
DROP VIEW view_2_tab1_505

statement ok
DROP VIEW view_3_tab1_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_505') DROP VIEW view_1_tab2_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_505') DROP VIEW view_2_tab2_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_505') DROP VIEW view_3_tab2_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_505

statement ok
CREATE VIEW view_1_tab2_505 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 23 AND (col1 = 69.86)

statement ok
CREATE VIEW view_2_tab2_505 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 23 AND (col1 = 69.86))

statement ok
CREATE VIEW view_3_tab2_505 AS SELECT pk FROM view_1_tab2_505

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 23 AND (col1 = 69.86)
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_505
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 23 AND (col1 = 69.86) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_505 UNION ALL SELECT pk, col0 FROM view_2_tab2_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 23 AND (col1 = 69.86) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_505 UNION SELECT pk, col0 FROM view_2_tab2_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 23 AND (col1 = 69.86) ) AS tab2_505
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_505
----

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE col0 >= 23 AND (col1 = 69.86)
----

statement ok
DROP VIEW view_1_tab2_505

statement ok
DROP VIEW view_2_tab2_505

statement ok
DROP VIEW view_3_tab2_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_505') DROP VIEW view_1_tab3_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_505') DROP VIEW view_2_tab3_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_505') DROP VIEW view_3_tab3_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_505

statement ok
CREATE VIEW view_1_tab3_505 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 23 AND (col1 = 69.86)

statement ok
CREATE VIEW view_2_tab3_505 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 23 AND (col1 = 69.86))

statement ok
CREATE VIEW view_3_tab3_505 AS SELECT pk FROM view_1_tab3_505

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 23 AND (col1 = 69.86)
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_505
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 23 AND (col1 = 69.86) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_505 UNION ALL SELECT pk, col0 FROM view_2_tab3_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 23 AND (col1 = 69.86) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_505 UNION SELECT pk, col0 FROM view_2_tab3_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 23 AND (col1 = 69.86) ) AS tab3_505
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_505
----

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE col0 >= 23 AND (col1 = 69.86)
----

statement ok
DROP VIEW view_1_tab3_505

statement ok
DROP VIEW view_2_tab3_505

statement ok
DROP VIEW view_3_tab3_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_505') DROP VIEW view_1_tab4_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_505') DROP VIEW view_2_tab4_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_505') DROP VIEW view_3_tab4_505

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_505

statement ok
CREATE VIEW view_1_tab4_505 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 23 AND (col1 = 69.86)

statement ok
CREATE VIEW view_2_tab4_505 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 23 AND (col1 = 69.86))

statement ok
CREATE VIEW view_3_tab4_505 AS SELECT pk FROM view_1_tab4_505

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 23 AND (col1 = 69.86)
----

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_505
----

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 23 AND (col1 = 69.86) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_505 UNION ALL SELECT pk, col0 FROM view_2_tab4_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 23 AND (col1 = 69.86) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 23 AND (col1 = 69.86))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_505 UNION SELECT pk, col0 FROM view_2_tab4_505
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 23 AND (col1 = 69.86) ) AS tab4_505
----

query I rowsort label-5900-3
SELECT * FROM view_3_tab4_505
----

query I rowsort label-5900-3
SELECT pk FROM tab4 WHERE col0 >= 23 AND (col1 = 69.86)
----

statement ok
DROP VIEW view_1_tab4_505

statement ok
DROP VIEW view_2_tab4_505

statement ok
DROP VIEW view_3_tab4_505

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_506') DROP VIEW view_1_tab0_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_506') DROP VIEW view_2_tab0_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_506') DROP VIEW view_3_tab0_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_506

statement ok
CREATE VIEW view_1_tab0_506 AS SELECT pk, col0 FROM tab0 WHERE col0 > 16 AND (col4 > 55.94)

statement ok
CREATE VIEW view_2_tab0_506 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 16 AND (col4 > 55.94))

statement ok
CREATE VIEW view_3_tab0_506 AS SELECT pk FROM view_1_tab0_506

query II rowsort label-6000-1
SELECT pk, col0 FROM tab0 WHERE col0 > 16 AND (col4 > 55.94)
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab0_506
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab0_506
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 16 AND (col4 > 55.94) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_506 UNION ALL SELECT pk, col0 FROM view_2_tab0_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 16 AND (col4 > 55.94) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_506 UNION SELECT pk, col0 FROM view_2_tab0_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 16 AND (col4 > 55.94) ) AS tab0_506
----
4
7
8

query I rowsort label-6000-3
SELECT * FROM view_3_tab0_506
----
4
7
8

query I rowsort label-6000-3
SELECT pk FROM tab0 WHERE col0 > 16 AND (col4 > 55.94)
----
4
7
8

statement ok
DROP VIEW view_1_tab0_506

statement ok
DROP VIEW view_2_tab0_506

statement ok
DROP VIEW view_3_tab0_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_506') DROP VIEW view_1_tab1_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_506') DROP VIEW view_2_tab1_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_506') DROP VIEW view_3_tab1_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_506

statement ok
CREATE VIEW view_1_tab1_506 AS SELECT pk, col0 FROM tab1 WHERE col0 > 16 AND (col4 > 55.94)

statement ok
CREATE VIEW view_2_tab1_506 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 16 AND (col4 > 55.94))

statement ok
CREATE VIEW view_3_tab1_506 AS SELECT pk FROM view_1_tab1_506

query II rowsort label-6000-1
SELECT pk, col0 FROM tab1 WHERE col0 > 16 AND (col4 > 55.94)
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab1_506
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab1_506
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 16 AND (col4 > 55.94) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_506 UNION ALL SELECT pk, col0 FROM view_2_tab1_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 16 AND (col4 > 55.94) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_506 UNION SELECT pk, col0 FROM view_2_tab1_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 16 AND (col4 > 55.94) ) AS tab1_506
----
4
7
8

query I rowsort label-6000-3
SELECT * FROM view_3_tab1_506
----
4
7
8

query I rowsort label-6000-3
SELECT pk FROM tab1 WHERE col0 > 16 AND (col4 > 55.94)
----
4
7
8

statement ok
DROP VIEW view_1_tab1_506

statement ok
DROP VIEW view_2_tab1_506

statement ok
DROP VIEW view_3_tab1_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_506') DROP VIEW view_1_tab2_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_506') DROP VIEW view_2_tab2_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_506') DROP VIEW view_3_tab2_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_506

statement ok
CREATE VIEW view_1_tab2_506 AS SELECT pk, col0 FROM tab2 WHERE col0 > 16 AND (col4 > 55.94)

statement ok
CREATE VIEW view_2_tab2_506 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 16 AND (col4 > 55.94))

statement ok
CREATE VIEW view_3_tab2_506 AS SELECT pk FROM view_1_tab2_506

query II rowsort label-6000-1
SELECT pk, col0 FROM tab2 WHERE col0 > 16 AND (col4 > 55.94)
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab2_506
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab2_506
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 16 AND (col4 > 55.94) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_506 UNION ALL SELECT pk, col0 FROM view_2_tab2_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 16 AND (col4 > 55.94) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_506 UNION SELECT pk, col0 FROM view_2_tab2_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 16 AND (col4 > 55.94) ) AS tab2_506
----
4
7
8

query I rowsort label-6000-3
SELECT * FROM view_3_tab2_506
----
4
7
8

query I rowsort label-6000-3
SELECT pk FROM tab2 WHERE col0 > 16 AND (col4 > 55.94)
----
4
7
8

statement ok
DROP VIEW view_1_tab2_506

statement ok
DROP VIEW view_2_tab2_506

statement ok
DROP VIEW view_3_tab2_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_506') DROP VIEW view_1_tab3_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_506') DROP VIEW view_2_tab3_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_506') DROP VIEW view_3_tab3_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_506

statement ok
CREATE VIEW view_1_tab3_506 AS SELECT pk, col0 FROM tab3 WHERE col0 > 16 AND (col4 > 55.94)

statement ok
CREATE VIEW view_2_tab3_506 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 16 AND (col4 > 55.94))

statement ok
CREATE VIEW view_3_tab3_506 AS SELECT pk FROM view_1_tab3_506

query II rowsort label-6000-1
SELECT pk, col0 FROM tab3 WHERE col0 > 16 AND (col4 > 55.94)
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab3_506
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab3_506
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 16 AND (col4 > 55.94) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_506 UNION ALL SELECT pk, col0 FROM view_2_tab3_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 16 AND (col4 > 55.94) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_506 UNION SELECT pk, col0 FROM view_2_tab3_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 16 AND (col4 > 55.94) ) AS tab3_506
----
4
7
8

query I rowsort label-6000-3
SELECT * FROM view_3_tab3_506
----
4
7
8

query I rowsort label-6000-3
SELECT pk FROM tab3 WHERE col0 > 16 AND (col4 > 55.94)
----
4
7
8

statement ok
DROP VIEW view_1_tab3_506

statement ok
DROP VIEW view_2_tab3_506

statement ok
DROP VIEW view_3_tab3_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_506') DROP VIEW view_1_tab4_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_506') DROP VIEW view_2_tab4_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_506') DROP VIEW view_3_tab4_506

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_506

statement ok
CREATE VIEW view_1_tab4_506 AS SELECT pk, col0 FROM tab4 WHERE col0 > 16 AND (col4 > 55.94)

statement ok
CREATE VIEW view_2_tab4_506 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 16 AND (col4 > 55.94))

statement ok
CREATE VIEW view_3_tab4_506 AS SELECT pk FROM view_1_tab4_506

query II rowsort label-6000-1
SELECT pk, col0 FROM tab4 WHERE col0 > 16 AND (col4 > 55.94)
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab4_506
----
4
18
7
52
8
29

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab4_506
----
14 values hashing to 3cf25df45aaa626dcb1a52b1b064e488

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 16 AND (col4 > 55.94) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_506 UNION ALL SELECT pk, col0 FROM view_2_tab4_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 16 AND (col4 > 55.94) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 16 AND (col4 > 55.94))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_506 UNION SELECT pk, col0 FROM view_2_tab4_506
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 16 AND (col4 > 55.94) ) AS tab4_506
----
4
7
8

query I rowsort label-6000-3
SELECT * FROM view_3_tab4_506
----
4
7
8

query I rowsort label-6000-3
SELECT pk FROM tab4 WHERE col0 > 16 AND (col4 > 55.94)
----
4
7
8

statement ok
DROP VIEW view_1_tab4_506

statement ok
DROP VIEW view_2_tab4_506

statement ok
DROP VIEW view_3_tab4_506

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_507') DROP VIEW view_1_tab0_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_507') DROP VIEW view_2_tab0_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_507') DROP VIEW view_3_tab0_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_507

statement ok
CREATE VIEW view_1_tab0_507 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)

statement ok
CREATE VIEW view_2_tab0_507 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))

statement ok
CREATE VIEW view_3_tab0_507 AS SELECT pk FROM view_1_tab0_507

query II rowsort label-6100-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab0_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab0_507
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_507 UNION ALL SELECT pk, col0 FROM view_2_tab0_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_507 UNION SELECT pk, col0 FROM view_2_tab0_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) ) AS tab0_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT * FROM view_3_tab0_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT pk FROM tab0 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_507

statement ok
DROP VIEW view_2_tab0_507

statement ok
DROP VIEW view_3_tab0_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_507') DROP VIEW view_1_tab1_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_507') DROP VIEW view_2_tab1_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_507') DROP VIEW view_3_tab1_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_507

statement ok
CREATE VIEW view_1_tab1_507 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)

statement ok
CREATE VIEW view_2_tab1_507 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))

statement ok
CREATE VIEW view_3_tab1_507 AS SELECT pk FROM view_1_tab1_507

query II rowsort label-6100-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab1_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab1_507
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_507 UNION ALL SELECT pk, col0 FROM view_2_tab1_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_507 UNION SELECT pk, col0 FROM view_2_tab1_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) ) AS tab1_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT * FROM view_3_tab1_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT pk FROM tab1 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_507

statement ok
DROP VIEW view_2_tab1_507

statement ok
DROP VIEW view_3_tab1_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_507') DROP VIEW view_1_tab2_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_507') DROP VIEW view_2_tab2_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_507') DROP VIEW view_3_tab2_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_507

statement ok
CREATE VIEW view_1_tab2_507 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)

statement ok
CREATE VIEW view_2_tab2_507 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))

statement ok
CREATE VIEW view_3_tab2_507 AS SELECT pk FROM view_1_tab2_507

query II rowsort label-6100-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab2_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab2_507
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_507 UNION ALL SELECT pk, col0 FROM view_2_tab2_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_507 UNION SELECT pk, col0 FROM view_2_tab2_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) ) AS tab2_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT * FROM view_3_tab2_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT pk FROM tab2 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_507

statement ok
DROP VIEW view_2_tab2_507

statement ok
DROP VIEW view_3_tab2_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_507') DROP VIEW view_1_tab3_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_507') DROP VIEW view_2_tab3_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_507') DROP VIEW view_3_tab3_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_507

statement ok
CREATE VIEW view_1_tab3_507 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)

statement ok
CREATE VIEW view_2_tab3_507 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))

statement ok
CREATE VIEW view_3_tab3_507 AS SELECT pk FROM view_1_tab3_507

query II rowsort label-6100-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab3_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab3_507
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_507 UNION ALL SELECT pk, col0 FROM view_2_tab3_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_507 UNION SELECT pk, col0 FROM view_2_tab3_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) ) AS tab3_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT * FROM view_3_tab3_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT pk FROM tab3 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_507

statement ok
DROP VIEW view_2_tab3_507

statement ok
DROP VIEW view_3_tab3_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_507') DROP VIEW view_1_tab4_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_507') DROP VIEW view_2_tab4_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_507') DROP VIEW view_3_tab4_507

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_507

statement ok
CREATE VIEW view_1_tab4_507 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)

statement ok
CREATE VIEW view_2_tab4_507 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))

statement ok
CREATE VIEW view_3_tab4_507 AS SELECT pk FROM view_1_tab4_507

query II rowsort label-6100-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab4_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab4_507
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_507 UNION ALL SELECT pk, col0 FROM view_2_tab4_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_507 UNION SELECT pk, col0 FROM view_2_tab4_507
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84) ) AS tab4_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT * FROM view_3_tab4_507
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6100-3
SELECT pk FROM tab4 WHERE col0 >= 5 OR col0 BETWEEN 94 AND 34 OR col0 > 41 AND (col0 > 23) OR col1 IN (11.41,77.57,22.49,61.84)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_507

statement ok
DROP VIEW view_2_tab4_507

statement ok
DROP VIEW view_3_tab4_507

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_508') DROP VIEW view_1_tab0_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_508') DROP VIEW view_2_tab0_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_508') DROP VIEW view_3_tab0_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_508

statement ok
CREATE VIEW view_1_tab0_508 AS SELECT pk, col0 FROM tab0 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab0_508 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab0_508 AS SELECT pk FROM view_1_tab0_508

query II rowsort label-6200-1
SELECT pk, col0 FROM tab0 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab0_508
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab0_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_508 UNION ALL SELECT pk, col0 FROM view_2_tab0_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_508 UNION SELECT pk, col0 FROM view_2_tab0_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) ) AS tab0_508
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab0_508
----

query I rowsort label-6200-3
SELECT pk FROM tab0 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

statement ok
DROP VIEW view_1_tab0_508

statement ok
DROP VIEW view_2_tab0_508

statement ok
DROP VIEW view_3_tab0_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_508') DROP VIEW view_1_tab1_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_508') DROP VIEW view_2_tab1_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_508') DROP VIEW view_3_tab1_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_508

statement ok
CREATE VIEW view_1_tab1_508 AS SELECT pk, col0 FROM tab1 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab1_508 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab1_508 AS SELECT pk FROM view_1_tab1_508

query II rowsort label-6200-1
SELECT pk, col0 FROM tab1 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab1_508
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab1_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_508 UNION ALL SELECT pk, col0 FROM view_2_tab1_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_508 UNION SELECT pk, col0 FROM view_2_tab1_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) ) AS tab1_508
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab1_508
----

query I rowsort label-6200-3
SELECT pk FROM tab1 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

statement ok
DROP VIEW view_1_tab1_508

statement ok
DROP VIEW view_2_tab1_508

statement ok
DROP VIEW view_3_tab1_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_508') DROP VIEW view_1_tab2_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_508') DROP VIEW view_2_tab2_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_508') DROP VIEW view_3_tab2_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_508

statement ok
CREATE VIEW view_1_tab2_508 AS SELECT pk, col0 FROM tab2 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab2_508 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab2_508 AS SELECT pk FROM view_1_tab2_508

query II rowsort label-6200-1
SELECT pk, col0 FROM tab2 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab2_508
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab2_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_508 UNION ALL SELECT pk, col0 FROM view_2_tab2_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_508 UNION SELECT pk, col0 FROM view_2_tab2_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) ) AS tab2_508
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab2_508
----

query I rowsort label-6200-3
SELECT pk FROM tab2 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

statement ok
DROP VIEW view_1_tab2_508

statement ok
DROP VIEW view_2_tab2_508

statement ok
DROP VIEW view_3_tab2_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_508') DROP VIEW view_1_tab3_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_508') DROP VIEW view_2_tab3_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_508') DROP VIEW view_3_tab3_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_508

statement ok
CREATE VIEW view_1_tab3_508 AS SELECT pk, col0 FROM tab3 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab3_508 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab3_508 AS SELECT pk FROM view_1_tab3_508

query II rowsort label-6200-1
SELECT pk, col0 FROM tab3 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab3_508
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab3_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_508 UNION ALL SELECT pk, col0 FROM view_2_tab3_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_508 UNION SELECT pk, col0 FROM view_2_tab3_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) ) AS tab3_508
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab3_508
----

query I rowsort label-6200-3
SELECT pk FROM tab3 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

statement ok
DROP VIEW view_1_tab3_508

statement ok
DROP VIEW view_2_tab3_508

statement ok
DROP VIEW view_3_tab3_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_508') DROP VIEW view_1_tab4_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_508') DROP VIEW view_2_tab4_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_508') DROP VIEW view_3_tab4_508

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_508

statement ok
CREATE VIEW view_1_tab4_508 AS SELECT pk, col0 FROM tab4 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))

statement ok
CREATE VIEW view_2_tab4_508 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))

statement ok
CREATE VIEW view_3_tab4_508 AS SELECT pk FROM view_1_tab4_508

query II rowsort label-6200-1
SELECT pk, col0 FROM tab4 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab4_508
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab4_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_508 UNION ALL SELECT pk, col0 FROM view_2_tab4_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))))
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_508 UNION SELECT pk, col0 FROM view_2_tab4_508
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL))) ) AS tab4_508
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab4_508
----

query I rowsort label-6200-3
SELECT pk FROM tab4 WHERE ((((col0 > 91 OR col1 > 30.39) OR (col3 > 59)) AND col3 < 74 AND ((col0 <= 32) AND col4 <= 63.88 OR col4 = 31.49) OR ((col3 > 37 AND col3 >= 66)) AND (col3 IS NULL)))
----

statement ok
DROP VIEW view_1_tab4_508

statement ok
DROP VIEW view_2_tab4_508

statement ok
DROP VIEW view_3_tab4_508

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_509') DROP VIEW view_1_tab0_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_509') DROP VIEW view_2_tab0_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_509') DROP VIEW view_3_tab0_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_509

statement ok
CREATE VIEW view_1_tab0_509 AS SELECT pk, col0 FROM tab0 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19

statement ok
CREATE VIEW view_2_tab0_509 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)

statement ok
CREATE VIEW view_3_tab0_509 AS SELECT pk FROM view_1_tab0_509

query II rowsort label-6300-1
SELECT pk, col0 FROM tab0 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab0_509
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab0_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_509 UNION ALL SELECT pk, col0 FROM view_2_tab0_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_509 UNION SELECT pk, col0 FROM view_2_tab0_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 ) AS tab0_509
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab0_509
----

query I rowsort label-6300-3
SELECT pk FROM tab0 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

statement ok
DROP VIEW view_1_tab0_509

statement ok
DROP VIEW view_2_tab0_509

statement ok
DROP VIEW view_3_tab0_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_509') DROP VIEW view_1_tab1_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_509') DROP VIEW view_2_tab1_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_509') DROP VIEW view_3_tab1_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_509

statement ok
CREATE VIEW view_1_tab1_509 AS SELECT pk, col0 FROM tab1 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19

statement ok
CREATE VIEW view_2_tab1_509 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)

statement ok
CREATE VIEW view_3_tab1_509 AS SELECT pk FROM view_1_tab1_509

query II rowsort label-6300-1
SELECT pk, col0 FROM tab1 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab1_509
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab1_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_509 UNION ALL SELECT pk, col0 FROM view_2_tab1_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_509 UNION SELECT pk, col0 FROM view_2_tab1_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 ) AS tab1_509
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab1_509
----

query I rowsort label-6300-3
SELECT pk FROM tab1 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

statement ok
DROP VIEW view_1_tab1_509

statement ok
DROP VIEW view_2_tab1_509

statement ok
DROP VIEW view_3_tab1_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_509') DROP VIEW view_1_tab2_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_509') DROP VIEW view_2_tab2_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_509') DROP VIEW view_3_tab2_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_509

statement ok
CREATE VIEW view_1_tab2_509 AS SELECT pk, col0 FROM tab2 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19

statement ok
CREATE VIEW view_2_tab2_509 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)

statement ok
CREATE VIEW view_3_tab2_509 AS SELECT pk FROM view_1_tab2_509

query II rowsort label-6300-1
SELECT pk, col0 FROM tab2 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab2_509
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab2_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_509 UNION ALL SELECT pk, col0 FROM view_2_tab2_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_509 UNION SELECT pk, col0 FROM view_2_tab2_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 ) AS tab2_509
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab2_509
----

query I rowsort label-6300-3
SELECT pk FROM tab2 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

statement ok
DROP VIEW view_1_tab2_509

statement ok
DROP VIEW view_2_tab2_509

statement ok
DROP VIEW view_3_tab2_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_509') DROP VIEW view_1_tab3_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_509') DROP VIEW view_2_tab3_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_509') DROP VIEW view_3_tab3_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_509

statement ok
CREATE VIEW view_1_tab3_509 AS SELECT pk, col0 FROM tab3 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19

statement ok
CREATE VIEW view_2_tab3_509 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)

statement ok
CREATE VIEW view_3_tab3_509 AS SELECT pk FROM view_1_tab3_509

query II rowsort label-6300-1
SELECT pk, col0 FROM tab3 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab3_509
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab3_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_509 UNION ALL SELECT pk, col0 FROM view_2_tab3_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_509 UNION SELECT pk, col0 FROM view_2_tab3_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 ) AS tab3_509
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab3_509
----

query I rowsort label-6300-3
SELECT pk FROM tab3 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

statement ok
DROP VIEW view_1_tab3_509

statement ok
DROP VIEW view_2_tab3_509

statement ok
DROP VIEW view_3_tab3_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_509') DROP VIEW view_1_tab4_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_509') DROP VIEW view_2_tab4_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_509') DROP VIEW view_3_tab4_509

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_509

statement ok
CREATE VIEW view_1_tab4_509 AS SELECT pk, col0 FROM tab4 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19

statement ok
CREATE VIEW view_2_tab4_509 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)

statement ok
CREATE VIEW view_3_tab4_509 AS SELECT pk FROM view_1_tab4_509

query II rowsort label-6300-1
SELECT pk, col0 FROM tab4 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab4_509
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab4_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_509 UNION ALL SELECT pk, col0 FROM view_2_tab4_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_509 UNION SELECT pk, col0 FROM view_2_tab4_509
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19 ) AS tab4_509
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab4_509
----

query I rowsort label-6300-3
SELECT pk FROM tab4 WHERE col0 = 49 AND (col0 < 48) AND col3 > 94 OR col3 IS NULL OR col1 = 11.59 AND col0 >= 44 OR col3 < 83 AND col0 < 7 OR col4 IN (75.87) AND col4 > 10.17 OR col0 >= 69 AND col3 >= 19
----

statement ok
DROP VIEW view_1_tab4_509

statement ok
DROP VIEW view_2_tab4_509

statement ok
DROP VIEW view_3_tab4_509

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_510') DROP VIEW view_1_tab0_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_510') DROP VIEW view_2_tab0_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_510') DROP VIEW view_3_tab0_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_510

statement ok
CREATE VIEW view_1_tab0_510 AS SELECT pk, col0 FROM tab0 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87

statement ok
CREATE VIEW view_2_tab0_510 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)

statement ok
CREATE VIEW view_3_tab0_510 AS SELECT pk FROM view_1_tab0_510

query II rowsort label-6400-1
SELECT pk, col0 FROM tab0 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab0_510
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab0_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_510 UNION ALL SELECT pk, col0 FROM view_2_tab0_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_510 UNION SELECT pk, col0 FROM view_2_tab0_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 ) AS tab0_510
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab0_510
----

query I rowsort label-6400-3
SELECT pk FROM tab0 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

statement ok
DROP VIEW view_1_tab0_510

statement ok
DROP VIEW view_2_tab0_510

statement ok
DROP VIEW view_3_tab0_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_510') DROP VIEW view_1_tab1_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_510') DROP VIEW view_2_tab1_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_510') DROP VIEW view_3_tab1_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_510

statement ok
CREATE VIEW view_1_tab1_510 AS SELECT pk, col0 FROM tab1 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87

statement ok
CREATE VIEW view_2_tab1_510 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)

statement ok
CREATE VIEW view_3_tab1_510 AS SELECT pk FROM view_1_tab1_510

query II rowsort label-6400-1
SELECT pk, col0 FROM tab1 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab1_510
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab1_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_510 UNION ALL SELECT pk, col0 FROM view_2_tab1_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_510 UNION SELECT pk, col0 FROM view_2_tab1_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 ) AS tab1_510
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab1_510
----

query I rowsort label-6400-3
SELECT pk FROM tab1 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

statement ok
DROP VIEW view_1_tab1_510

statement ok
DROP VIEW view_2_tab1_510

statement ok
DROP VIEW view_3_tab1_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_510') DROP VIEW view_1_tab2_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_510') DROP VIEW view_2_tab2_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_510') DROP VIEW view_3_tab2_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_510

statement ok
CREATE VIEW view_1_tab2_510 AS SELECT pk, col0 FROM tab2 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87

statement ok
CREATE VIEW view_2_tab2_510 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)

statement ok
CREATE VIEW view_3_tab2_510 AS SELECT pk FROM view_1_tab2_510

query II rowsort label-6400-1
SELECT pk, col0 FROM tab2 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab2_510
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab2_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_510 UNION ALL SELECT pk, col0 FROM view_2_tab2_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_510 UNION SELECT pk, col0 FROM view_2_tab2_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 ) AS tab2_510
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab2_510
----

query I rowsort label-6400-3
SELECT pk FROM tab2 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

statement ok
DROP VIEW view_1_tab2_510

statement ok
DROP VIEW view_2_tab2_510

statement ok
DROP VIEW view_3_tab2_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_510') DROP VIEW view_1_tab3_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_510') DROP VIEW view_2_tab3_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_510') DROP VIEW view_3_tab3_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_510

statement ok
CREATE VIEW view_1_tab3_510 AS SELECT pk, col0 FROM tab3 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87

statement ok
CREATE VIEW view_2_tab3_510 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)

statement ok
CREATE VIEW view_3_tab3_510 AS SELECT pk FROM view_1_tab3_510

query II rowsort label-6400-1
SELECT pk, col0 FROM tab3 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab3_510
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab3_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_510 UNION ALL SELECT pk, col0 FROM view_2_tab3_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_510 UNION SELECT pk, col0 FROM view_2_tab3_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 ) AS tab3_510
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab3_510
----

query I rowsort label-6400-3
SELECT pk FROM tab3 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

statement ok
DROP VIEW view_1_tab3_510

statement ok
DROP VIEW view_2_tab3_510

statement ok
DROP VIEW view_3_tab3_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_510') DROP VIEW view_1_tab4_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_510') DROP VIEW view_2_tab4_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_510') DROP VIEW view_3_tab4_510

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_510

statement ok
CREATE VIEW view_1_tab4_510 AS SELECT pk, col0 FROM tab4 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87

statement ok
CREATE VIEW view_2_tab4_510 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)

statement ok
CREATE VIEW view_3_tab4_510 AS SELECT pk FROM view_1_tab4_510

query II rowsort label-6400-1
SELECT pk, col0 FROM tab4 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

query II rowsort label-6400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab4_510
----

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab4_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_510 UNION ALL SELECT pk, col0 FROM view_2_tab4_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 70 OR col1 BETWEEN 55.19 AND 13.87)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_510 UNION SELECT pk, col0 FROM view_2_tab4_510
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87 ) AS tab4_510
----

query I rowsort label-6400-3
SELECT * FROM view_3_tab4_510
----

query I rowsort label-6400-3
SELECT pk FROM tab4 WHERE col0 > 70 OR col1 BETWEEN 55.19 AND 13.87
----

statement ok
DROP VIEW view_1_tab4_510

statement ok
DROP VIEW view_2_tab4_510

statement ok
DROP VIEW view_3_tab4_510

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_511') DROP VIEW view_1_tab0_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_511') DROP VIEW view_2_tab0_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_511') DROP VIEW view_3_tab0_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_511

statement ok
CREATE VIEW view_1_tab0_511 AS SELECT pk, col0 FROM tab0 WHERE col0 > 73

statement ok
CREATE VIEW view_2_tab0_511 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 73)

statement ok
CREATE VIEW view_3_tab0_511 AS SELECT pk FROM view_1_tab0_511

query II rowsort label-6500-1
SELECT pk, col0 FROM tab0 WHERE col0 > 73
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab0_511
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab0_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 73 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_511 UNION ALL SELECT pk, col0 FROM view_2_tab0_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 73 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_511 UNION SELECT pk, col0 FROM view_2_tab0_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 73 ) AS tab0_511
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab0_511
----

query I rowsort label-6500-3
SELECT pk FROM tab0 WHERE col0 > 73
----

statement ok
DROP VIEW view_1_tab0_511

statement ok
DROP VIEW view_2_tab0_511

statement ok
DROP VIEW view_3_tab0_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_511') DROP VIEW view_1_tab1_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_511') DROP VIEW view_2_tab1_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_511') DROP VIEW view_3_tab1_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_511

statement ok
CREATE VIEW view_1_tab1_511 AS SELECT pk, col0 FROM tab1 WHERE col0 > 73

statement ok
CREATE VIEW view_2_tab1_511 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 73)

statement ok
CREATE VIEW view_3_tab1_511 AS SELECT pk FROM view_1_tab1_511

query II rowsort label-6500-1
SELECT pk, col0 FROM tab1 WHERE col0 > 73
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab1_511
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab1_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 73 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_511 UNION ALL SELECT pk, col0 FROM view_2_tab1_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 73 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_511 UNION SELECT pk, col0 FROM view_2_tab1_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 73 ) AS tab1_511
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab1_511
----

query I rowsort label-6500-3
SELECT pk FROM tab1 WHERE col0 > 73
----

statement ok
DROP VIEW view_1_tab1_511

statement ok
DROP VIEW view_2_tab1_511

statement ok
DROP VIEW view_3_tab1_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_511') DROP VIEW view_1_tab2_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_511') DROP VIEW view_2_tab2_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_511') DROP VIEW view_3_tab2_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_511

statement ok
CREATE VIEW view_1_tab2_511 AS SELECT pk, col0 FROM tab2 WHERE col0 > 73

statement ok
CREATE VIEW view_2_tab2_511 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 73)

statement ok
CREATE VIEW view_3_tab2_511 AS SELECT pk FROM view_1_tab2_511

query II rowsort label-6500-1
SELECT pk, col0 FROM tab2 WHERE col0 > 73
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab2_511
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab2_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 73 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_511 UNION ALL SELECT pk, col0 FROM view_2_tab2_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 73 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_511 UNION SELECT pk, col0 FROM view_2_tab2_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 73 ) AS tab2_511
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab2_511
----

query I rowsort label-6500-3
SELECT pk FROM tab2 WHERE col0 > 73
----

statement ok
DROP VIEW view_1_tab2_511

statement ok
DROP VIEW view_2_tab2_511

statement ok
DROP VIEW view_3_tab2_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_511') DROP VIEW view_1_tab3_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_511') DROP VIEW view_2_tab3_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_511') DROP VIEW view_3_tab3_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_511

statement ok
CREATE VIEW view_1_tab3_511 AS SELECT pk, col0 FROM tab3 WHERE col0 > 73

statement ok
CREATE VIEW view_2_tab3_511 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 73)

statement ok
CREATE VIEW view_3_tab3_511 AS SELECT pk FROM view_1_tab3_511

query II rowsort label-6500-1
SELECT pk, col0 FROM tab3 WHERE col0 > 73
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab3_511
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab3_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 73 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_511 UNION ALL SELECT pk, col0 FROM view_2_tab3_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 73 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_511 UNION SELECT pk, col0 FROM view_2_tab3_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 73 ) AS tab3_511
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab3_511
----

query I rowsort label-6500-3
SELECT pk FROM tab3 WHERE col0 > 73
----

statement ok
DROP VIEW view_1_tab3_511

statement ok
DROP VIEW view_2_tab3_511

statement ok
DROP VIEW view_3_tab3_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_511') DROP VIEW view_1_tab4_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_511') DROP VIEW view_2_tab4_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_511') DROP VIEW view_3_tab4_511

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_511

statement ok
CREATE VIEW view_1_tab4_511 AS SELECT pk, col0 FROM tab4 WHERE col0 > 73

statement ok
CREATE VIEW view_2_tab4_511 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 73)

statement ok
CREATE VIEW view_3_tab4_511 AS SELECT pk FROM view_1_tab4_511

query II rowsort label-6500-1
SELECT pk, col0 FROM tab4 WHERE col0 > 73
----

query II rowsort label-6500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab4_511
----

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab4_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 73 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_511 UNION ALL SELECT pk, col0 FROM view_2_tab4_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 73 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 73)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_511 UNION SELECT pk, col0 FROM view_2_tab4_511
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 73 ) AS tab4_511
----

query I rowsort label-6500-3
SELECT * FROM view_3_tab4_511
----

query I rowsort label-6500-3
SELECT pk FROM tab4 WHERE col0 > 73
----

statement ok
DROP VIEW view_1_tab4_511

statement ok
DROP VIEW view_2_tab4_511

statement ok
DROP VIEW view_3_tab4_511

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_512') DROP VIEW view_1_tab0_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_512') DROP VIEW view_2_tab0_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_512') DROP VIEW view_3_tab0_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_512

statement ok
CREATE VIEW view_1_tab0_512 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 50

statement ok
CREATE VIEW view_2_tab0_512 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 50)

statement ok
CREATE VIEW view_3_tab0_512 AS SELECT pk FROM view_1_tab0_512

query II rowsort label-6600-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 50
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 50)
----
1
65
3
6
6
7
7
52

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab0_512
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab0_512
----
1
65
3
6
6
7
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 50 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_512 UNION ALL SELECT pk, col0 FROM view_2_tab0_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 50 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_512 UNION SELECT pk, col0 FROM view_2_tab0_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 50 ) AS tab0_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab0_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab0 WHERE col3 <= 50
----
0
2
4
5
8
9

statement ok
DROP VIEW view_1_tab0_512

statement ok
DROP VIEW view_2_tab0_512

statement ok
DROP VIEW view_3_tab0_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_512') DROP VIEW view_1_tab1_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_512') DROP VIEW view_2_tab1_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_512') DROP VIEW view_3_tab1_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_512

statement ok
CREATE VIEW view_1_tab1_512 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 50

statement ok
CREATE VIEW view_2_tab1_512 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 50)

statement ok
CREATE VIEW view_3_tab1_512 AS SELECT pk FROM view_1_tab1_512

query II rowsort label-6600-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 50
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 50)
----
1
65
3
6
6
7
7
52

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab1_512
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab1_512
----
1
65
3
6
6
7
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 50 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_512 UNION ALL SELECT pk, col0 FROM view_2_tab1_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 50 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_512 UNION SELECT pk, col0 FROM view_2_tab1_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 50 ) AS tab1_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab1_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab1 WHERE col3 <= 50
----
0
2
4
5
8
9

statement ok
DROP VIEW view_1_tab1_512

statement ok
DROP VIEW view_2_tab1_512

statement ok
DROP VIEW view_3_tab1_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_512') DROP VIEW view_1_tab2_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_512') DROP VIEW view_2_tab2_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_512') DROP VIEW view_3_tab2_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_512

statement ok
CREATE VIEW view_1_tab2_512 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 50

statement ok
CREATE VIEW view_2_tab2_512 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 50)

statement ok
CREATE VIEW view_3_tab2_512 AS SELECT pk FROM view_1_tab2_512

query II rowsort label-6600-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 50
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 50)
----
1
65
3
6
6
7
7
52

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab2_512
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab2_512
----
1
65
3
6
6
7
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 50 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_512 UNION ALL SELECT pk, col0 FROM view_2_tab2_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 50 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_512 UNION SELECT pk, col0 FROM view_2_tab2_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 50 ) AS tab2_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab2_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab2 WHERE col3 <= 50
----
0
2
4
5
8
9

statement ok
DROP VIEW view_1_tab2_512

statement ok
DROP VIEW view_2_tab2_512

statement ok
DROP VIEW view_3_tab2_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_512') DROP VIEW view_1_tab3_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_512') DROP VIEW view_2_tab3_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_512') DROP VIEW view_3_tab3_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_512

statement ok
CREATE VIEW view_1_tab3_512 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 50

statement ok
CREATE VIEW view_2_tab3_512 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 50)

statement ok
CREATE VIEW view_3_tab3_512 AS SELECT pk FROM view_1_tab3_512

query II rowsort label-6600-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 50
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 50)
----
1
65
3
6
6
7
7
52

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab3_512
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab3_512
----
1
65
3
6
6
7
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 50 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_512 UNION ALL SELECT pk, col0 FROM view_2_tab3_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 50 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_512 UNION SELECT pk, col0 FROM view_2_tab3_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 50 ) AS tab3_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab3_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab3 WHERE col3 <= 50
----
0
2
4
5
8
9

statement ok
DROP VIEW view_1_tab3_512

statement ok
DROP VIEW view_2_tab3_512

statement ok
DROP VIEW view_3_tab3_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_512') DROP VIEW view_1_tab4_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_512') DROP VIEW view_2_tab4_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_512

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_512') DROP VIEW view_3_tab4_512

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_512

statement ok
CREATE VIEW view_1_tab4_512 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 50

statement ok
CREATE VIEW view_2_tab4_512 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 50)

statement ok
CREATE VIEW view_3_tab4_512 AS SELECT pk FROM view_1_tab4_512

query II rowsort label-6600-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 50
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 50)
----
1
65
3
6
6
7
7
52

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab4_512
----
12 values hashing to 6044e30b7d3b046857b1f86cdc69ff5c

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab4_512
----
1
65
3
6
6
7
7
52

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 50 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_512 UNION ALL SELECT pk, col0 FROM view_2_tab4_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 50 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 50)
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_512 UNION SELECT pk, col0 FROM view_2_tab4_512
----
20 values hashing to b4932ce2176929487a0600a939f6326f

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 50 ) AS tab4_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab4_512
----
0
2
4
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab4 WHERE col3 <=