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,8,13.82,'nyidc',27,38.36,'nkmhv')

statement ok
INSERT INTO tab0 VALUES(1,6,79.28,'zeqcc',82,39.99,'fdcys')

statement ok
INSERT INTO tab0 VALUES(2,3,48.18,'cgptd',6,41.66,'zpftv')

statement ok
INSERT INTO tab0 VALUES(3,53,35.72,'faeoo',29,40.23,'glcbu')

statement ok
INSERT INTO tab0 VALUES(4,11,52.22,'lzxzj',87,2.24,'lfkwe')

statement ok
INSERT INTO tab0 VALUES(5,47,69.20,'gqouy',34,44.97,'tjawe')

statement ok
INSERT INTO tab0 VALUES(6,56,81.50,'cowcj',59,79.63,'oojwb')

statement ok
INSERT INTO tab0 VALUES(7,70,64.46,'clzmj',93,89.44,'hogqc')

statement ok
INSERT INTO tab0 VALUES(8,75,44.99,'mgfft',28,83.78,'upkdx')

statement ok
INSERT INTO tab0 VALUES(9,18,55.70,'lkphe',20,61.30,'dhcqf')

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

statement ok
CREATE INDEX idx_tab2_1 ON tab2 (col4)

statement ok
CREATE INDEX idx_tab2_3 ON tab2 (col1 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,col3)

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

statement ok
CREATE INDEX idx_tab3_2 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 UNIQUE INDEX idx_tab4_0 ON tab4 (col1,col0)

statement ok
CREATE UNIQUE INDEX idx_tab4_2 ON tab4 (col3 DESC)

statement ok
INSERT INTO tab4 SELECT * FROM tab0

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_302 AS SELECT pk, col0 FROM tab0 WHERE col3 < 84

statement ok
CREATE VIEW view_2_tab0_302 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 84)

statement ok
CREATE VIEW view_3_tab0_302 AS SELECT pk FROM view_1_tab0_302

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE col3 < 84
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 84)
----
4
11
7
70

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_302
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_302
----
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 84 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_302 UNION ALL SELECT pk, col0 FROM view_2_tab0_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 84 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_302 UNION SELECT pk, col0 FROM view_2_tab0_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 84 ) AS tab0_302
----
0
1
2
3
5
6
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE col3 < 84
----
0
1
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab0_302

statement ok
DROP VIEW view_2_tab0_302

statement ok
DROP VIEW view_3_tab0_302

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_302 AS SELECT pk, col0 FROM tab1 WHERE col3 < 84

statement ok
CREATE VIEW view_2_tab1_302 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 84)

statement ok
CREATE VIEW view_3_tab1_302 AS SELECT pk FROM view_1_tab1_302

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE col3 < 84
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 84)
----
4
11
7
70

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_302
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_302
----
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 84 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_302 UNION ALL SELECT pk, col0 FROM view_2_tab1_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 84 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_302 UNION SELECT pk, col0 FROM view_2_tab1_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 84 ) AS tab1_302
----
0
1
2
3
5
6
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE col3 < 84
----
0
1
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab1_302

statement ok
DROP VIEW view_2_tab1_302

statement ok
DROP VIEW view_3_tab1_302

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_302 AS SELECT pk, col0 FROM tab2 WHERE col3 < 84

statement ok
CREATE VIEW view_2_tab2_302 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 84)

statement ok
CREATE VIEW view_3_tab2_302 AS SELECT pk FROM view_1_tab2_302

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE col3 < 84
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 84)
----
4
11
7
70

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_302
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_302
----
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 84 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_302 UNION ALL SELECT pk, col0 FROM view_2_tab2_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 84 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_302 UNION SELECT pk, col0 FROM view_2_tab2_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 84 ) AS tab2_302
----
0
1
2
3
5
6
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE col3 < 84
----
0
1
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab2_302

statement ok
DROP VIEW view_2_tab2_302

statement ok
DROP VIEW view_3_tab2_302

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_302 AS SELECT pk, col0 FROM tab3 WHERE col3 < 84

statement ok
CREATE VIEW view_2_tab3_302 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 84)

statement ok
CREATE VIEW view_3_tab3_302 AS SELECT pk FROM view_1_tab3_302

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE col3 < 84
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 84)
----
4
11
7
70

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_302
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_302
----
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 84 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_302 UNION ALL SELECT pk, col0 FROM view_2_tab3_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 84 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_302 UNION SELECT pk, col0 FROM view_2_tab3_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 84 ) AS tab3_302
----
0
1
2
3
5
6
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE col3 < 84
----
0
1
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab3_302

statement ok
DROP VIEW view_2_tab3_302

statement ok
DROP VIEW view_3_tab3_302

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_302 AS SELECT pk, col0 FROM tab4 WHERE col3 < 84

statement ok
CREATE VIEW view_2_tab4_302 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 84)

statement ok
CREATE VIEW view_3_tab4_302 AS SELECT pk FROM view_1_tab4_302

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE col3 < 84
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 84)
----
4
11
7
70

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_302
----
16 values hashing to 51cd8c33a52e705e358b935366ca75d1

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_302
----
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 84 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_302 UNION ALL SELECT pk, col0 FROM view_2_tab4_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 84 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_302 UNION SELECT pk, col0 FROM view_2_tab4_302
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 84 ) AS tab4_302
----
0
1
2
3
5
6
8
9

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

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE col3 < 84
----
0
1
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab4_302

statement ok
DROP VIEW view_2_tab4_302

statement ok
DROP VIEW view_3_tab4_302

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_303 AS SELECT pk, col0 FROM tab0 WHERE col4 < 22.92 AND (col3 = 16)

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

statement ok
CREATE VIEW view_3_tab0_303 AS SELECT pk FROM view_1_tab0_303

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

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 22.92 AND (col3 = 16))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_303 UNION ALL SELECT pk, col0 FROM view_2_tab0_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_303 UNION SELECT pk, col0 FROM view_2_tab0_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 22.92 AND (col3 = 16) ) AS tab0_303
----

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

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE col4 < 22.92 AND (col3 = 16)
----

statement ok
DROP VIEW view_1_tab0_303

statement ok
DROP VIEW view_2_tab0_303

statement ok
DROP VIEW view_3_tab0_303

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_303 AS SELECT pk, col0 FROM tab1 WHERE col4 < 22.92 AND (col3 = 16)

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

statement ok
CREATE VIEW view_3_tab1_303 AS SELECT pk FROM view_1_tab1_303

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

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 22.92 AND (col3 = 16))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_303 UNION ALL SELECT pk, col0 FROM view_2_tab1_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_303 UNION SELECT pk, col0 FROM view_2_tab1_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 22.92 AND (col3 = 16) ) AS tab1_303
----

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

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE col4 < 22.92 AND (col3 = 16)
----

statement ok
DROP VIEW view_1_tab1_303

statement ok
DROP VIEW view_2_tab1_303

statement ok
DROP VIEW view_3_tab1_303

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_303 AS SELECT pk, col0 FROM tab2 WHERE col4 < 22.92 AND (col3 = 16)

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

statement ok
CREATE VIEW view_3_tab2_303 AS SELECT pk FROM view_1_tab2_303

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

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 22.92 AND (col3 = 16))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_303 UNION ALL SELECT pk, col0 FROM view_2_tab2_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_303 UNION SELECT pk, col0 FROM view_2_tab2_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 22.92 AND (col3 = 16) ) AS tab2_303
----

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

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE col4 < 22.92 AND (col3 = 16)
----

statement ok
DROP VIEW view_1_tab2_303

statement ok
DROP VIEW view_2_tab2_303

statement ok
DROP VIEW view_3_tab2_303

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_303 AS SELECT pk, col0 FROM tab3 WHERE col4 < 22.92 AND (col3 = 16)

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

statement ok
CREATE VIEW view_3_tab3_303 AS SELECT pk FROM view_1_tab3_303

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

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 22.92 AND (col3 = 16))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_303 UNION ALL SELECT pk, col0 FROM view_2_tab3_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_303 UNION SELECT pk, col0 FROM view_2_tab3_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 22.92 AND (col3 = 16) ) AS tab3_303
----

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

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE col4 < 22.92 AND (col3 = 16)
----

statement ok
DROP VIEW view_1_tab3_303

statement ok
DROP VIEW view_2_tab3_303

statement ok
DROP VIEW view_3_tab3_303

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_303 AS SELECT pk, col0 FROM tab4 WHERE col4 < 22.92 AND (col3 = 16)

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

statement ok
CREATE VIEW view_3_tab4_303 AS SELECT pk FROM view_1_tab4_303

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

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 22.92 AND (col3 = 16))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_303 UNION ALL SELECT pk, col0 FROM view_2_tab4_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_303 UNION SELECT pk, col0 FROM view_2_tab4_303
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 22.92 AND (col3 = 16) ) AS tab4_303
----

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

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE col4 < 22.92 AND (col3 = 16)
----

statement ok
DROP VIEW view_1_tab4_303

statement ok
DROP VIEW view_2_tab4_303

statement ok
DROP VIEW view_3_tab4_303

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_304 AS SELECT pk, col0 FROM tab0 WHERE (col4 >= 5.32) AND col0 < 74

statement ok
CREATE VIEW view_2_tab0_304 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 5.32) AND col0 < 74)

statement ok
CREATE VIEW view_3_tab0_304 AS SELECT pk FROM view_1_tab0_304

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE (col4 >= 5.32) AND col0 < 74
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
4
11
8
75

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_304
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_304
----
4
11
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 >= 5.32) AND col0 < 74 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_304 UNION ALL SELECT pk, col0 FROM view_2_tab0_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 >= 5.32) AND col0 < 74 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_304 UNION SELECT pk, col0 FROM view_2_tab0_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 >= 5.32) AND col0 < 74 ) AS tab0_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT * FROM view_3_tab0_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE (col4 >= 5.32) AND col0 < 74
----
0
1
2
3
5
6
7
9

statement ok
DROP VIEW view_1_tab0_304

statement ok
DROP VIEW view_2_tab0_304

statement ok
DROP VIEW view_3_tab0_304

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_304 AS SELECT pk, col0 FROM tab1 WHERE (col4 >= 5.32) AND col0 < 74

statement ok
CREATE VIEW view_2_tab1_304 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 5.32) AND col0 < 74)

statement ok
CREATE VIEW view_3_tab1_304 AS SELECT pk FROM view_1_tab1_304

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE (col4 >= 5.32) AND col0 < 74
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
4
11
8
75

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_304
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_304
----
4
11
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 >= 5.32) AND col0 < 74 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_304 UNION ALL SELECT pk, col0 FROM view_2_tab1_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 >= 5.32) AND col0 < 74 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_304 UNION SELECT pk, col0 FROM view_2_tab1_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 >= 5.32) AND col0 < 74 ) AS tab1_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT * FROM view_3_tab1_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE (col4 >= 5.32) AND col0 < 74
----
0
1
2
3
5
6
7
9

statement ok
DROP VIEW view_1_tab1_304

statement ok
DROP VIEW view_2_tab1_304

statement ok
DROP VIEW view_3_tab1_304

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_304 AS SELECT pk, col0 FROM tab2 WHERE (col4 >= 5.32) AND col0 < 74

statement ok
CREATE VIEW view_2_tab2_304 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 5.32) AND col0 < 74)

statement ok
CREATE VIEW view_3_tab2_304 AS SELECT pk FROM view_1_tab2_304

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE (col4 >= 5.32) AND col0 < 74
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
4
11
8
75

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_304
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_304
----
4
11
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 >= 5.32) AND col0 < 74 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_304 UNION ALL SELECT pk, col0 FROM view_2_tab2_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 >= 5.32) AND col0 < 74 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_304 UNION SELECT pk, col0 FROM view_2_tab2_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 >= 5.32) AND col0 < 74 ) AS tab2_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT * FROM view_3_tab2_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE (col4 >= 5.32) AND col0 < 74
----
0
1
2
3
5
6
7
9

statement ok
DROP VIEW view_1_tab2_304

statement ok
DROP VIEW view_2_tab2_304

statement ok
DROP VIEW view_3_tab2_304

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_304 AS SELECT pk, col0 FROM tab3 WHERE (col4 >= 5.32) AND col0 < 74

statement ok
CREATE VIEW view_2_tab3_304 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 5.32) AND col0 < 74)

statement ok
CREATE VIEW view_3_tab3_304 AS SELECT pk FROM view_1_tab3_304

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE (col4 >= 5.32) AND col0 < 74
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
4
11
8
75

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_304
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_304
----
4
11
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 >= 5.32) AND col0 < 74 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_304 UNION ALL SELECT pk, col0 FROM view_2_tab3_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 >= 5.32) AND col0 < 74 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_304 UNION SELECT pk, col0 FROM view_2_tab3_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 >= 5.32) AND col0 < 74 ) AS tab3_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT * FROM view_3_tab3_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE (col4 >= 5.32) AND col0 < 74
----
0
1
2
3
5
6
7
9

statement ok
DROP VIEW view_1_tab3_304

statement ok
DROP VIEW view_2_tab3_304

statement ok
DROP VIEW view_3_tab3_304

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_304 AS SELECT pk, col0 FROM tab4 WHERE (col4 >= 5.32) AND col0 < 74

statement ok
CREATE VIEW view_2_tab4_304 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 5.32) AND col0 < 74)

statement ok
CREATE VIEW view_3_tab4_304 AS SELECT pk FROM view_1_tab4_304

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE (col4 >= 5.32) AND col0 < 74
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
4
11
8
75

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_304
----
16 values hashing to f33f81bee67d7fd27a248e21a7274a79

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_304
----
4
11
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 >= 5.32) AND col0 < 74 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_304 UNION ALL SELECT pk, col0 FROM view_2_tab4_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 >= 5.32) AND col0 < 74 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 5.32) AND col0 < 74)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_304 UNION SELECT pk, col0 FROM view_2_tab4_304
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 >= 5.32) AND col0 < 74 ) AS tab4_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT * FROM view_3_tab4_304
----
0
1
2
3
5
6
7
9

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE (col4 >= 5.32) AND col0 < 74
----
0
1
2
3
5
6
7
9

statement ok
DROP VIEW view_1_tab4_304

statement ok
DROP VIEW view_2_tab4_304

statement ok
DROP VIEW view_3_tab4_304

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_305 AS SELECT pk, col0 FROM tab0 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))

statement ok
CREATE VIEW view_2_tab0_305 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))

statement ok
CREATE VIEW view_3_tab0_305 AS SELECT pk FROM view_1_tab0_305

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
6
56
7
70
8
75

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_305
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_305
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_305 UNION ALL SELECT pk, col0 FROM view_2_tab0_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_305 UNION SELECT pk, col0 FROM view_2_tab0_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) ) AS tab0_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT * FROM view_3_tab0_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab0_305

statement ok
DROP VIEW view_2_tab0_305

statement ok
DROP VIEW view_3_tab0_305

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_305 AS SELECT pk, col0 FROM tab1 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))

statement ok
CREATE VIEW view_2_tab1_305 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))

statement ok
CREATE VIEW view_3_tab1_305 AS SELECT pk FROM view_1_tab1_305

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
6
56
7
70
8
75

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_305
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_305
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_305 UNION ALL SELECT pk, col0 FROM view_2_tab1_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_305 UNION SELECT pk, col0 FROM view_2_tab1_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) ) AS tab1_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT * FROM view_3_tab1_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab1_305

statement ok
DROP VIEW view_2_tab1_305

statement ok
DROP VIEW view_3_tab1_305

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_305 AS SELECT pk, col0 FROM tab2 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))

statement ok
CREATE VIEW view_2_tab2_305 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))

statement ok
CREATE VIEW view_3_tab2_305 AS SELECT pk FROM view_1_tab2_305

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
6
56
7
70
8
75

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_305
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_305
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_305 UNION ALL SELECT pk, col0 FROM view_2_tab2_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_305 UNION SELECT pk, col0 FROM view_2_tab2_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) ) AS tab2_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT * FROM view_3_tab2_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab2_305

statement ok
DROP VIEW view_2_tab2_305

statement ok
DROP VIEW view_3_tab2_305

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_305 AS SELECT pk, col0 FROM tab3 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))

statement ok
CREATE VIEW view_2_tab3_305 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))

statement ok
CREATE VIEW view_3_tab3_305 AS SELECT pk FROM view_1_tab3_305

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
6
56
7
70
8
75

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_305
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_305
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_305 UNION ALL SELECT pk, col0 FROM view_2_tab3_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_305 UNION SELECT pk, col0 FROM view_2_tab3_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) ) AS tab3_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT * FROM view_3_tab3_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab3_305

statement ok
DROP VIEW view_2_tab3_305

statement ok
DROP VIEW view_3_tab3_305

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_305 AS SELECT pk, col0 FROM tab4 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))

statement ok
CREATE VIEW view_2_tab4_305 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))

statement ok
CREATE VIEW view_3_tab4_305 AS SELECT pk FROM view_1_tab4_305

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
6
56
7
70
8
75

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_305
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_305
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_305 UNION ALL SELECT pk, col0 FROM view_2_tab4_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_305 UNION SELECT pk, col0 FROM view_2_tab4_305
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6)) ) AS tab4_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT * FROM view_3_tab4_305
----
0
1
2
3
4
5
9

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE col0 < 41 OR (col1 < 93.66) AND col3 >= 21 AND col1 = 30.28 OR ((col4 <= 61.6))
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab4_305

statement ok
DROP VIEW view_2_tab4_305

statement ok
DROP VIEW view_3_tab4_305

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_306 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 36.7 AND col3 >= 6

statement ok
CREATE VIEW view_2_tab0_306 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 36.7 AND col3 >= 6)

statement ok
CREATE VIEW view_3_tab0_306 AS SELECT pk FROM view_1_tab0_306

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 36.7 AND col3 >= 6
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
4
11

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_306
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_306
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 36.7 AND col3 >= 6 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_306 UNION ALL SELECT pk, col0 FROM view_2_tab0_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 36.7 AND col3 >= 6 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_306 UNION SELECT pk, col0 FROM view_2_tab0_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 36.7 AND col3 >= 6 ) AS tab0_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT * FROM view_3_tab0_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE col4 >= 36.7 AND col3 >= 6
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab0_306

statement ok
DROP VIEW view_2_tab0_306

statement ok
DROP VIEW view_3_tab0_306

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_306 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 36.7 AND col3 >= 6

statement ok
CREATE VIEW view_2_tab1_306 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 36.7 AND col3 >= 6)

statement ok
CREATE VIEW view_3_tab1_306 AS SELECT pk FROM view_1_tab1_306

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 36.7 AND col3 >= 6
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
4
11

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_306
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_306
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 36.7 AND col3 >= 6 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_306 UNION ALL SELECT pk, col0 FROM view_2_tab1_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 36.7 AND col3 >= 6 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_306 UNION SELECT pk, col0 FROM view_2_tab1_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 36.7 AND col3 >= 6 ) AS tab1_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT * FROM view_3_tab1_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE col4 >= 36.7 AND col3 >= 6
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab1_306

statement ok
DROP VIEW view_2_tab1_306

statement ok
DROP VIEW view_3_tab1_306

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_306 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 36.7 AND col3 >= 6

statement ok
CREATE VIEW view_2_tab2_306 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 36.7 AND col3 >= 6)

statement ok
CREATE VIEW view_3_tab2_306 AS SELECT pk FROM view_1_tab2_306

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 36.7 AND col3 >= 6
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
4
11

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_306
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_306
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 36.7 AND col3 >= 6 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_306 UNION ALL SELECT pk, col0 FROM view_2_tab2_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 36.7 AND col3 >= 6 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_306 UNION SELECT pk, col0 FROM view_2_tab2_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 36.7 AND col3 >= 6 ) AS tab2_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT * FROM view_3_tab2_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE col4 >= 36.7 AND col3 >= 6
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab2_306

statement ok
DROP VIEW view_2_tab2_306

statement ok
DROP VIEW view_3_tab2_306

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_306 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 36.7 AND col3 >= 6

statement ok
CREATE VIEW view_2_tab3_306 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 36.7 AND col3 >= 6)

statement ok
CREATE VIEW view_3_tab3_306 AS SELECT pk FROM view_1_tab3_306

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 36.7 AND col3 >= 6
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
4
11

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_306
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_306
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 36.7 AND col3 >= 6 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_306 UNION ALL SELECT pk, col0 FROM view_2_tab3_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 36.7 AND col3 >= 6 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_306 UNION SELECT pk, col0 FROM view_2_tab3_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 36.7 AND col3 >= 6 ) AS tab3_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT * FROM view_3_tab3_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE col4 >= 36.7 AND col3 >= 6
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab3_306

statement ok
DROP VIEW view_2_tab3_306

statement ok
DROP VIEW view_3_tab3_306

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_306 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 36.7 AND col3 >= 6

statement ok
CREATE VIEW view_2_tab4_306 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 36.7 AND col3 >= 6)

statement ok
CREATE VIEW view_3_tab4_306 AS SELECT pk FROM view_1_tab4_306

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 36.7 AND col3 >= 6
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
4
11

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_306
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_306
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 36.7 AND col3 >= 6 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_306 UNION ALL SELECT pk, col0 FROM view_2_tab4_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 36.7 AND col3 >= 6 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 36.7 AND col3 >= 6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_306 UNION SELECT pk, col0 FROM view_2_tab4_306
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 36.7 AND col3 >= 6 ) AS tab4_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT * FROM view_3_tab4_306
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE col4 >= 36.7 AND col3 >= 6
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab4_306

statement ok
DROP VIEW view_2_tab4_306

statement ok
DROP VIEW view_3_tab4_306

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_307 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 9)

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

statement ok
CREATE VIEW view_3_tab0_307 AS SELECT pk FROM view_1_tab0_307

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 9)
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 9))
----
0
8
1
6
2
3

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_307
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_307
----
0
8
1
6
2
3

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_307 UNION ALL SELECT pk, col0 FROM view_2_tab0_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_307 UNION SELECT pk, col0 FROM view_2_tab0_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 9) ) AS tab0_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT * FROM view_3_tab0_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE (col0 > 9)
----
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_307

statement ok
DROP VIEW view_2_tab0_307

statement ok
DROP VIEW view_3_tab0_307

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_307 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 9)

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

statement ok
CREATE VIEW view_3_tab1_307 AS SELECT pk FROM view_1_tab1_307

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 9)
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 9))
----
0
8
1
6
2
3

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_307
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_307
----
0
8
1
6
2
3

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_307 UNION ALL SELECT pk, col0 FROM view_2_tab1_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_307 UNION SELECT pk, col0 FROM view_2_tab1_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 9) ) AS tab1_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT * FROM view_3_tab1_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE (col0 > 9)
----
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_307

statement ok
DROP VIEW view_2_tab1_307

statement ok
DROP VIEW view_3_tab1_307

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_307 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 9)

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

statement ok
CREATE VIEW view_3_tab2_307 AS SELECT pk FROM view_1_tab2_307

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 9)
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 9))
----
0
8
1
6
2
3

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_307
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_307
----
0
8
1
6
2
3

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_307 UNION ALL SELECT pk, col0 FROM view_2_tab2_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_307 UNION SELECT pk, col0 FROM view_2_tab2_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 9) ) AS tab2_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT * FROM view_3_tab2_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE (col0 > 9)
----
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_307

statement ok
DROP VIEW view_2_tab2_307

statement ok
DROP VIEW view_3_tab2_307

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_307 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 9)

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

statement ok
CREATE VIEW view_3_tab3_307 AS SELECT pk FROM view_1_tab3_307

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 9)
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 9))
----
0
8
1
6
2
3

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_307
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_307
----
0
8
1
6
2
3

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_307 UNION ALL SELECT pk, col0 FROM view_2_tab3_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_307 UNION SELECT pk, col0 FROM view_2_tab3_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 9) ) AS tab3_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT * FROM view_3_tab3_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE (col0 > 9)
----
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_307

statement ok
DROP VIEW view_2_tab3_307

statement ok
DROP VIEW view_3_tab3_307

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_307 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 9)

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

statement ok
CREATE VIEW view_3_tab4_307 AS SELECT pk FROM view_1_tab4_307

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 9)
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 9))
----
0
8
1
6
2
3

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_307
----
14 values hashing to e388d026f1f8a9cfd8a3520c7f082eaf

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_307
----
0
8
1
6
2
3

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_307 UNION ALL SELECT pk, col0 FROM view_2_tab4_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_307 UNION SELECT pk, col0 FROM view_2_tab4_307
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 9) ) AS tab4_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT * FROM view_3_tab4_307
----
3
4
5
6
7
8
9

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE (col0 > 9)
----
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_307

statement ok
DROP VIEW view_2_tab4_307

statement ok
DROP VIEW view_3_tab4_307

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_308 AS SELECT pk, col0 FROM tab0 WHERE col1 > 17.28 AND (col3 < 43)

statement ok
CREATE VIEW view_2_tab0_308 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 17.28 AND (col3 < 43))

statement ok
CREATE VIEW view_3_tab0_308 AS SELECT pk FROM view_1_tab0_308

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE col1 > 17.28 AND (col3 < 43)
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab0_308
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_308
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 17.28 AND (col3 < 43) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_308 UNION ALL SELECT pk, col0 FROM view_2_tab0_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 17.28 AND (col3 < 43) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_308 UNION SELECT pk, col0 FROM view_2_tab0_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 17.28 AND (col3 < 43) ) AS tab0_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT * FROM view_3_tab0_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE col1 > 17.28 AND (col3 < 43)
----
2
3
5
8
9

statement ok
DROP VIEW view_1_tab0_308

statement ok
DROP VIEW view_2_tab0_308

statement ok
DROP VIEW view_3_tab0_308

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_308 AS SELECT pk, col0 FROM tab1 WHERE col1 > 17.28 AND (col3 < 43)

statement ok
CREATE VIEW view_2_tab1_308 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 17.28 AND (col3 < 43))

statement ok
CREATE VIEW view_3_tab1_308 AS SELECT pk FROM view_1_tab1_308

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE col1 > 17.28 AND (col3 < 43)
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab1_308
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_308
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 17.28 AND (col3 < 43) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_308 UNION ALL SELECT pk, col0 FROM view_2_tab1_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 17.28 AND (col3 < 43) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_308 UNION SELECT pk, col0 FROM view_2_tab1_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 17.28 AND (col3 < 43) ) AS tab1_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT * FROM view_3_tab1_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE col1 > 17.28 AND (col3 < 43)
----
2
3
5
8
9

statement ok
DROP VIEW view_1_tab1_308

statement ok
DROP VIEW view_2_tab1_308

statement ok
DROP VIEW view_3_tab1_308

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_308 AS SELECT pk, col0 FROM tab2 WHERE col1 > 17.28 AND (col3 < 43)

statement ok
CREATE VIEW view_2_tab2_308 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 17.28 AND (col3 < 43))

statement ok
CREATE VIEW view_3_tab2_308 AS SELECT pk FROM view_1_tab2_308

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE col1 > 17.28 AND (col3 < 43)
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab2_308
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_308
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 17.28 AND (col3 < 43) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_308 UNION ALL SELECT pk, col0 FROM view_2_tab2_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 17.28 AND (col3 < 43) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_308 UNION SELECT pk, col0 FROM view_2_tab2_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 17.28 AND (col3 < 43) ) AS tab2_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT * FROM view_3_tab2_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE col1 > 17.28 AND (col3 < 43)
----
2
3
5
8
9

statement ok
DROP VIEW view_1_tab2_308

statement ok
DROP VIEW view_2_tab2_308

statement ok
DROP VIEW view_3_tab2_308

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_308 AS SELECT pk, col0 FROM tab3 WHERE col1 > 17.28 AND (col3 < 43)

statement ok
CREATE VIEW view_2_tab3_308 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 17.28 AND (col3 < 43))

statement ok
CREATE VIEW view_3_tab3_308 AS SELECT pk FROM view_1_tab3_308

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE col1 > 17.28 AND (col3 < 43)
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab3_308
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_308
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 17.28 AND (col3 < 43) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_308 UNION ALL SELECT pk, col0 FROM view_2_tab3_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 17.28 AND (col3 < 43) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_308 UNION SELECT pk, col0 FROM view_2_tab3_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 17.28 AND (col3 < 43) ) AS tab3_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT * FROM view_3_tab3_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE col1 > 17.28 AND (col3 < 43)
----
2
3
5
8
9

statement ok
DROP VIEW view_1_tab3_308

statement ok
DROP VIEW view_2_tab3_308

statement ok
DROP VIEW view_3_tab3_308

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_308 AS SELECT pk, col0 FROM tab4 WHERE col1 > 17.28 AND (col3 < 43)

statement ok
CREATE VIEW view_2_tab4_308 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 17.28 AND (col3 < 43))

statement ok
CREATE VIEW view_3_tab4_308 AS SELECT pk FROM view_1_tab4_308

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE col1 > 17.28 AND (col3 < 43)
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-600-1
SELECT pk, col0 FROM view_1_tab4_308
----
10 values hashing to 94e9631112097ffef4c24d037cb7e291

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_308
----
10 values hashing to 96d4a54fcc66298dd113cca21a596ec3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 17.28 AND (col3 < 43) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_308 UNION ALL SELECT pk, col0 FROM view_2_tab4_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 17.28 AND (col3 < 43) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 17.28 AND (col3 < 43))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_308 UNION SELECT pk, col0 FROM view_2_tab4_308
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 17.28 AND (col3 < 43) ) AS tab4_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT * FROM view_3_tab4_308
----
2
3
5
8
9

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE col1 > 17.28 AND (col3 < 43)
----
2
3
5
8
9

statement ok
DROP VIEW view_1_tab4_308

statement ok
DROP VIEW view_2_tab4_308

statement ok
DROP VIEW view_3_tab4_308

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_309 AS SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))

statement ok
CREATE VIEW view_2_tab0_309 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))

statement ok
CREATE VIEW view_3_tab0_309 AS SELECT pk FROM view_1_tab0_309

query II rowsort label-700-1
SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_309 UNION ALL SELECT pk, col0 FROM view_2_tab0_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_309 UNION SELECT pk, col0 FROM view_2_tab0_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) ) AS tab0_309
----

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

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

statement ok
DROP VIEW view_1_tab0_309

statement ok
DROP VIEW view_2_tab0_309

statement ok
DROP VIEW view_3_tab0_309

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_309 AS SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))

statement ok
CREATE VIEW view_2_tab1_309 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))

statement ok
CREATE VIEW view_3_tab1_309 AS SELECT pk FROM view_1_tab1_309

query II rowsort label-700-1
SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_309 UNION ALL SELECT pk, col0 FROM view_2_tab1_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_309 UNION SELECT pk, col0 FROM view_2_tab1_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) ) AS tab1_309
----

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

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

statement ok
DROP VIEW view_1_tab1_309

statement ok
DROP VIEW view_2_tab1_309

statement ok
DROP VIEW view_3_tab1_309

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_309 AS SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))

statement ok
CREATE VIEW view_2_tab2_309 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))

statement ok
CREATE VIEW view_3_tab2_309 AS SELECT pk FROM view_1_tab2_309

query II rowsort label-700-1
SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_309 UNION ALL SELECT pk, col0 FROM view_2_tab2_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_309 UNION SELECT pk, col0 FROM view_2_tab2_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) ) AS tab2_309
----

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

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

statement ok
DROP VIEW view_1_tab2_309

statement ok
DROP VIEW view_2_tab2_309

statement ok
DROP VIEW view_3_tab2_309

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_309 AS SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))

statement ok
CREATE VIEW view_2_tab3_309 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))

statement ok
CREATE VIEW view_3_tab3_309 AS SELECT pk FROM view_1_tab3_309

query II rowsort label-700-1
SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_309 UNION ALL SELECT pk, col0 FROM view_2_tab3_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_309 UNION SELECT pk, col0 FROM view_2_tab3_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) ) AS tab3_309
----

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

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

statement ok
DROP VIEW view_1_tab3_309

statement ok
DROP VIEW view_2_tab3_309

statement ok
DROP VIEW view_3_tab3_309

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_309 AS SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))

statement ok
CREATE VIEW view_2_tab4_309 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))

statement ok
CREATE VIEW view_3_tab4_309 AS SELECT pk FROM view_1_tab4_309

query II rowsort label-700-1
SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_309 UNION ALL SELECT pk, col0 FROM view_2_tab4_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_309 UNION SELECT pk, col0 FROM view_2_tab4_309
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29)) ) AS tab4_309
----

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

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE (col0 IS NULL AND (col4 IS NULL AND (col3 > 54) AND col0 > 46 OR col3 < 90 AND col1 > 24.37 AND col3 > 74)) AND (col4 <= 83.1 AND ((((col0 = 14))) OR col3 <= 29))
----

statement ok
DROP VIEW view_1_tab4_309

statement ok
DROP VIEW view_2_tab4_309

statement ok
DROP VIEW view_3_tab4_309

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_310 AS SELECT pk, col0 FROM tab0 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))

statement ok
CREATE VIEW view_2_tab0_310 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))

statement ok
CREATE VIEW view_3_tab0_310 AS SELECT pk FROM view_1_tab0_310

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_310 UNION ALL SELECT pk, col0 FROM view_2_tab0_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_310 UNION SELECT pk, col0 FROM view_2_tab0_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) ) AS tab0_310
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

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

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_310

statement ok
DROP VIEW view_2_tab0_310

statement ok
DROP VIEW view_3_tab0_310

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_310 AS SELECT pk, col0 FROM tab1 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))

statement ok
CREATE VIEW view_2_tab1_310 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))

statement ok
CREATE VIEW view_3_tab1_310 AS SELECT pk FROM view_1_tab1_310

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_310 UNION ALL SELECT pk, col0 FROM view_2_tab1_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_310 UNION SELECT pk, col0 FROM view_2_tab1_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) ) AS tab1_310
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

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

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_310

statement ok
DROP VIEW view_2_tab1_310

statement ok
DROP VIEW view_3_tab1_310

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_310 AS SELECT pk, col0 FROM tab2 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))

statement ok
CREATE VIEW view_2_tab2_310 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))

statement ok
CREATE VIEW view_3_tab2_310 AS SELECT pk FROM view_1_tab2_310

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_310 UNION ALL SELECT pk, col0 FROM view_2_tab2_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_310 UNION SELECT pk, col0 FROM view_2_tab2_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) ) AS tab2_310
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

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

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_310

statement ok
DROP VIEW view_2_tab2_310

statement ok
DROP VIEW view_3_tab2_310

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_310 AS SELECT pk, col0 FROM tab3 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))

statement ok
CREATE VIEW view_2_tab3_310 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))

statement ok
CREATE VIEW view_3_tab3_310 AS SELECT pk FROM view_1_tab3_310

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_310 UNION ALL SELECT pk, col0 FROM view_2_tab3_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_310 UNION SELECT pk, col0 FROM view_2_tab3_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) ) AS tab3_310
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

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

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_310

statement ok
DROP VIEW view_2_tab3_310

statement ok
DROP VIEW view_3_tab3_310

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_310 AS SELECT pk, col0 FROM tab4 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))

statement ok
CREATE VIEW view_2_tab4_310 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))

statement ok
CREATE VIEW view_3_tab4_310 AS SELECT pk FROM view_1_tab4_310

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_310 UNION ALL SELECT pk, col0 FROM view_2_tab4_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_310 UNION SELECT pk, col0 FROM view_2_tab4_310
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78)) ) AS tab4_310
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

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

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE col3 = 5 OR ((col0 <= 93 AND ((col4 = 42.93))) AND col0 <= 62) OR ((col0 < 78))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_310

statement ok
DROP VIEW view_2_tab4_310

statement ok
DROP VIEW view_3_tab4_310

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_311 AS SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 35 AND 12

statement ok
CREATE VIEW view_2_tab0_311 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 35 AND 12)

statement ok
CREATE VIEW view_3_tab0_311 AS SELECT pk FROM view_1_tab0_311

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 35 AND 12
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_311
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 35 AND 12 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_311 UNION ALL SELECT pk, col0 FROM view_2_tab0_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 35 AND 12 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_311 UNION SELECT pk, col0 FROM view_2_tab0_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 35 AND 12 ) AS tab0_311
----

query I rowsort label-900-3
SELECT * FROM view_3_tab0_311
----

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE col0 BETWEEN 35 AND 12
----

statement ok
DROP VIEW view_1_tab0_311

statement ok
DROP VIEW view_2_tab0_311

statement ok
DROP VIEW view_3_tab0_311

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_311 AS SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 35 AND 12

statement ok
CREATE VIEW view_2_tab1_311 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 35 AND 12)

statement ok
CREATE VIEW view_3_tab1_311 AS SELECT pk FROM view_1_tab1_311

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 35 AND 12
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_311
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 35 AND 12 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_311 UNION ALL SELECT pk, col0 FROM view_2_tab1_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 35 AND 12 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_311 UNION SELECT pk, col0 FROM view_2_tab1_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 35 AND 12 ) AS tab1_311
----

query I rowsort label-900-3
SELECT * FROM view_3_tab1_311
----

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE col0 BETWEEN 35 AND 12
----

statement ok
DROP VIEW view_1_tab1_311

statement ok
DROP VIEW view_2_tab1_311

statement ok
DROP VIEW view_3_tab1_311

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_311 AS SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 35 AND 12

statement ok
CREATE VIEW view_2_tab2_311 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 35 AND 12)

statement ok
CREATE VIEW view_3_tab2_311 AS SELECT pk FROM view_1_tab2_311

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 35 AND 12
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_311
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 35 AND 12 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_311 UNION ALL SELECT pk, col0 FROM view_2_tab2_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 35 AND 12 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_311 UNION SELECT pk, col0 FROM view_2_tab2_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 35 AND 12 ) AS tab2_311
----

query I rowsort label-900-3
SELECT * FROM view_3_tab2_311
----

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE col0 BETWEEN 35 AND 12
----

statement ok
DROP VIEW view_1_tab2_311

statement ok
DROP VIEW view_2_tab2_311

statement ok
DROP VIEW view_3_tab2_311

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_311 AS SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 35 AND 12

statement ok
CREATE VIEW view_2_tab3_311 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 35 AND 12)

statement ok
CREATE VIEW view_3_tab3_311 AS SELECT pk FROM view_1_tab3_311

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 35 AND 12
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_311
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 35 AND 12 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_311 UNION ALL SELECT pk, col0 FROM view_2_tab3_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 35 AND 12 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_311 UNION SELECT pk, col0 FROM view_2_tab3_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 35 AND 12 ) AS tab3_311
----

query I rowsort label-900-3
SELECT * FROM view_3_tab3_311
----

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE col0 BETWEEN 35 AND 12
----

statement ok
DROP VIEW view_1_tab3_311

statement ok
DROP VIEW view_2_tab3_311

statement ok
DROP VIEW view_3_tab3_311

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_311 AS SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 35 AND 12

statement ok
CREATE VIEW view_2_tab4_311 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 35 AND 12)

statement ok
CREATE VIEW view_3_tab4_311 AS SELECT pk FROM view_1_tab4_311

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 35 AND 12
----

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_311
----

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 35 AND 12 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_311 UNION ALL SELECT pk, col0 FROM view_2_tab4_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 35 AND 12 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 35 AND 12)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_311 UNION SELECT pk, col0 FROM view_2_tab4_311
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 35 AND 12 ) AS tab4_311
----

query I rowsort label-900-3
SELECT * FROM view_3_tab4_311
----

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE col0 BETWEEN 35 AND 12
----

statement ok
DROP VIEW view_1_tab4_311

statement ok
DROP VIEW view_2_tab4_311

statement ok
DROP VIEW view_3_tab4_311

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_312 AS SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29

statement ok
CREATE VIEW view_2_tab0_312 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)

statement ok
CREATE VIEW view_3_tab0_312 AS SELECT pk FROM view_1_tab0_312

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
0
8

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_312
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_312
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_312 UNION ALL SELECT pk, col0 FROM view_2_tab0_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_312 UNION SELECT pk, col0 FROM view_2_tab0_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 ) AS tab0_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT * FROM view_3_tab0_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab0_312

statement ok
DROP VIEW view_2_tab0_312

statement ok
DROP VIEW view_3_tab0_312

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_312 AS SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29

statement ok
CREATE VIEW view_2_tab1_312 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)

statement ok
CREATE VIEW view_3_tab1_312 AS SELECT pk FROM view_1_tab1_312

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
0
8

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_312
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_312
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_312 UNION ALL SELECT pk, col0 FROM view_2_tab1_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_312 UNION SELECT pk, col0 FROM view_2_tab1_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 ) AS tab1_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT * FROM view_3_tab1_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab1_312

statement ok
DROP VIEW view_2_tab1_312

statement ok
DROP VIEW view_3_tab1_312

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_312 AS SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29

statement ok
CREATE VIEW view_2_tab2_312 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)

statement ok
CREATE VIEW view_3_tab2_312 AS SELECT pk FROM view_1_tab2_312

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
0
8

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_312
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_312
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_312 UNION ALL SELECT pk, col0 FROM view_2_tab2_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_312 UNION SELECT pk, col0 FROM view_2_tab2_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 ) AS tab2_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT * FROM view_3_tab2_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab2_312

statement ok
DROP VIEW view_2_tab2_312

statement ok
DROP VIEW view_3_tab2_312

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_312 AS SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29

statement ok
CREATE VIEW view_2_tab3_312 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)

statement ok
CREATE VIEW view_3_tab3_312 AS SELECT pk FROM view_1_tab3_312

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
0
8

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_312
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_312
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_312 UNION ALL SELECT pk, col0 FROM view_2_tab3_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_312 UNION SELECT pk, col0 FROM view_2_tab3_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 ) AS tab3_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT * FROM view_3_tab3_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab3_312

statement ok
DROP VIEW view_2_tab3_312

statement ok
DROP VIEW view_3_tab3_312

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_312 AS SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29

statement ok
CREATE VIEW view_2_tab4_312 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)

statement ok
CREATE VIEW view_3_tab4_312 AS SELECT pk FROM view_1_tab4_312

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
0
8

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_312
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_312
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_312 UNION ALL SELECT pk, col0 FROM view_2_tab4_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_312 UNION SELECT pk, col0 FROM view_2_tab4_312
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29 ) AS tab4_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT * FROM view_3_tab4_312
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE (col3 <= 3) AND col3 > 38 OR col1 BETWEEN 15.33 AND 89.29
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab4_312

statement ok
DROP VIEW view_2_tab4_312

statement ok
DROP VIEW view_3_tab4_312

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_313 AS SELECT pk, col0 FROM tab0 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))

statement ok
CREATE VIEW view_2_tab0_313 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))

statement ok
CREATE VIEW view_3_tab0_313 AS SELECT pk FROM view_1_tab0_313

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_313
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_313
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_313 UNION ALL SELECT pk, col0 FROM view_2_tab0_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_313 UNION SELECT pk, col0 FROM view_2_tab0_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) ) AS tab0_313
----
5
6

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_313
----
5
6

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
6

statement ok
DROP VIEW view_1_tab0_313

statement ok
DROP VIEW view_2_tab0_313

statement ok
DROP VIEW view_3_tab0_313

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_313 AS SELECT pk, col0 FROM tab1 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))

statement ok
CREATE VIEW view_2_tab1_313 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))

statement ok
CREATE VIEW view_3_tab1_313 AS SELECT pk FROM view_1_tab1_313

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_313
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_313
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_313 UNION ALL SELECT pk, col0 FROM view_2_tab1_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_313 UNION SELECT pk, col0 FROM view_2_tab1_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) ) AS tab1_313
----
5
6

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_313
----
5
6

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
6

statement ok
DROP VIEW view_1_tab1_313

statement ok
DROP VIEW view_2_tab1_313

statement ok
DROP VIEW view_3_tab1_313

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_313 AS SELECT pk, col0 FROM tab2 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))

statement ok
CREATE VIEW view_2_tab2_313 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))

statement ok
CREATE VIEW view_3_tab2_313 AS SELECT pk FROM view_1_tab2_313

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_313
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_313
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_313 UNION ALL SELECT pk, col0 FROM view_2_tab2_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_313 UNION SELECT pk, col0 FROM view_2_tab2_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) ) AS tab2_313
----
5
6

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_313
----
5
6

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
6

statement ok
DROP VIEW view_1_tab2_313

statement ok
DROP VIEW view_2_tab2_313

statement ok
DROP VIEW view_3_tab2_313

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_313 AS SELECT pk, col0 FROM tab3 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))

statement ok
CREATE VIEW view_2_tab3_313 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))

statement ok
CREATE VIEW view_3_tab3_313 AS SELECT pk FROM view_1_tab3_313

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_313
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_313
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_313 UNION ALL SELECT pk, col0 FROM view_2_tab3_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_313 UNION SELECT pk, col0 FROM view_2_tab3_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) ) AS tab3_313
----
5
6

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_313
----
5
6

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
6

statement ok
DROP VIEW view_1_tab3_313

statement ok
DROP VIEW view_2_tab3_313

statement ok
DROP VIEW view_3_tab3_313

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_313 AS SELECT pk, col0 FROM tab4 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))

statement ok
CREATE VIEW view_2_tab4_313 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))

statement ok
CREATE VIEW view_3_tab4_313 AS SELECT pk FROM view_1_tab4_313

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_313
----
5
47
6
56

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_313
----
16 values hashing to 3939a56c42b58502d63f31e4f20a7668

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_313 UNION ALL SELECT pk, col0 FROM view_2_tab4_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_313 UNION SELECT pk, col0 FROM view_2_tab4_313
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52)) ) AS tab4_313
----
5
6

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_313
----
5
6

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE (((col0 > 37 OR col4 = 0.26) AND col1 > 47.56 AND col3 < 79) AND (col4 >= 36.76 OR col3 = 52))
----
5
6

statement ok
DROP VIEW view_1_tab4_313

statement ok
DROP VIEW view_2_tab4_313

statement ok
DROP VIEW view_3_tab4_313

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_314 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)

statement ok
CREATE VIEW view_2_tab0_314 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))

statement ok
CREATE VIEW view_3_tab0_314 AS SELECT pk FROM view_1_tab0_314

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_314
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_314 UNION ALL SELECT pk, col0 FROM view_2_tab0_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_314 UNION SELECT pk, col0 FROM view_2_tab0_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) ) AS tab0_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_314

statement ok
DROP VIEW view_2_tab0_314

statement ok
DROP VIEW view_3_tab0_314

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_314 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)

statement ok
CREATE VIEW view_2_tab1_314 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))

statement ok
CREATE VIEW view_3_tab1_314 AS SELECT pk FROM view_1_tab1_314

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_314
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_314 UNION ALL SELECT pk, col0 FROM view_2_tab1_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_314 UNION SELECT pk, col0 FROM view_2_tab1_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) ) AS tab1_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_314

statement ok
DROP VIEW view_2_tab1_314

statement ok
DROP VIEW view_3_tab1_314

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_314 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)

statement ok
CREATE VIEW view_2_tab2_314 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))

statement ok
CREATE VIEW view_3_tab2_314 AS SELECT pk FROM view_1_tab2_314

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_314
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_314 UNION ALL SELECT pk, col0 FROM view_2_tab2_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_314 UNION SELECT pk, col0 FROM view_2_tab2_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) ) AS tab2_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_314

statement ok
DROP VIEW view_2_tab2_314

statement ok
DROP VIEW view_3_tab2_314

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_314 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)

statement ok
CREATE VIEW view_2_tab3_314 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))

statement ok
CREATE VIEW view_3_tab3_314 AS SELECT pk FROM view_1_tab3_314

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_314
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_314 UNION ALL SELECT pk, col0 FROM view_2_tab3_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_314 UNION SELECT pk, col0 FROM view_2_tab3_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) ) AS tab3_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_314

statement ok
DROP VIEW view_2_tab3_314

statement ok
DROP VIEW view_3_tab3_314

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_314 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)

statement ok
CREATE VIEW view_2_tab4_314 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))

statement ok
CREATE VIEW view_3_tab4_314 AS SELECT pk FROM view_1_tab4_314

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_314
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_314 UNION ALL SELECT pk, col0 FROM view_2_tab4_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_314 UNION SELECT pk, col0 FROM view_2_tab4_314
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41) ) AS tab4_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_314
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE col0 >= 62 OR col4 >= 33.38 OR col4 <= 13.37 AND col1 >= 27.41 OR col0 = 51 OR ((((col3 <= 79)) AND col1 > 7.53 AND (col3 IS NULL) OR col3 IS NULL AND col0 = 51 AND (col0 >= 61))) AND col1 < 25.33 AND (col4 BETWEEN 4.12 AND 17.41)
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_314

statement ok
DROP VIEW view_2_tab4_314

statement ok
DROP VIEW view_3_tab4_314

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_315 AS SELECT pk, col0 FROM tab0 WHERE (col0 = 85)

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

statement ok
CREATE VIEW view_3_tab0_315 AS SELECT pk FROM view_1_tab0_315

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE (col0 = 85)
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 85))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_315
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_315 UNION ALL SELECT pk, col0 FROM view_2_tab0_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_315 UNION SELECT pk, col0 FROM view_2_tab0_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 = 85) ) AS tab0_315
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_315
----

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE (col0 = 85)
----

statement ok
DROP VIEW view_1_tab0_315

statement ok
DROP VIEW view_2_tab0_315

statement ok
DROP VIEW view_3_tab0_315

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_315 AS SELECT pk, col0 FROM tab1 WHERE (col0 = 85)

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

statement ok
CREATE VIEW view_3_tab1_315 AS SELECT pk FROM view_1_tab1_315

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE (col0 = 85)
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 85))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_315
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_315 UNION ALL SELECT pk, col0 FROM view_2_tab1_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_315 UNION SELECT pk, col0 FROM view_2_tab1_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 = 85) ) AS tab1_315
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_315
----

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE (col0 = 85)
----

statement ok
DROP VIEW view_1_tab1_315

statement ok
DROP VIEW view_2_tab1_315

statement ok
DROP VIEW view_3_tab1_315

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_315 AS SELECT pk, col0 FROM tab2 WHERE (col0 = 85)

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

statement ok
CREATE VIEW view_3_tab2_315 AS SELECT pk FROM view_1_tab2_315

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE (col0 = 85)
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 85))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_315
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_315 UNION ALL SELECT pk, col0 FROM view_2_tab2_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_315 UNION SELECT pk, col0 FROM view_2_tab2_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 = 85) ) AS tab2_315
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_315
----

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE (col0 = 85)
----

statement ok
DROP VIEW view_1_tab2_315

statement ok
DROP VIEW view_2_tab2_315

statement ok
DROP VIEW view_3_tab2_315

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_315 AS SELECT pk, col0 FROM tab3 WHERE (col0 = 85)

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

statement ok
CREATE VIEW view_3_tab3_315 AS SELECT pk FROM view_1_tab3_315

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE (col0 = 85)
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 85))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_315
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_315 UNION ALL SELECT pk, col0 FROM view_2_tab3_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_315 UNION SELECT pk, col0 FROM view_2_tab3_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 = 85) ) AS tab3_315
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_315
----

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE (col0 = 85)
----

statement ok
DROP VIEW view_1_tab3_315

statement ok
DROP VIEW view_2_tab3_315

statement ok
DROP VIEW view_3_tab3_315

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_315 AS SELECT pk, col0 FROM tab4 WHERE (col0 = 85)

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

statement ok
CREATE VIEW view_3_tab4_315 AS SELECT pk FROM view_1_tab4_315

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE (col0 = 85)
----

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 85))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_315
----

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_315 UNION ALL SELECT pk, col0 FROM view_2_tab4_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_315 UNION SELECT pk, col0 FROM view_2_tab4_315
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 = 85) ) AS tab4_315
----

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_315
----

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE (col0 = 85)
----

statement ok
DROP VIEW view_1_tab4_315

statement ok
DROP VIEW view_2_tab4_315

statement ok
DROP VIEW view_3_tab4_315

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_316 AS SELECT pk, col0 FROM tab0 WHERE (col4 >= 70.98)

statement ok
CREATE VIEW view_2_tab0_316 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 70.98))

statement ok
CREATE VIEW view_3_tab0_316 AS SELECT pk FROM view_1_tab0_316

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE (col4 >= 70.98)
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 70.98))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_316
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_316
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_316 UNION ALL SELECT pk, col0 FROM view_2_tab0_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 >= 70.98) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 >= 70.98))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_316 UNION SELECT pk, col0 FROM view_2_tab0_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 >= 70.98) ) AS tab0_316
----
6
7
8

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_316
----
6
7
8

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE (col4 >= 70.98)
----
6
7
8

statement ok
DROP VIEW view_1_tab0_316

statement ok
DROP VIEW view_2_tab0_316

statement ok
DROP VIEW view_3_tab0_316

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_316 AS SELECT pk, col0 FROM tab1 WHERE (col4 >= 70.98)

statement ok
CREATE VIEW view_2_tab1_316 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 70.98))

statement ok
CREATE VIEW view_3_tab1_316 AS SELECT pk FROM view_1_tab1_316

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE (col4 >= 70.98)
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 70.98))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_316
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_316
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_316 UNION ALL SELECT pk, col0 FROM view_2_tab1_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 >= 70.98) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 >= 70.98))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_316 UNION SELECT pk, col0 FROM view_2_tab1_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 >= 70.98) ) AS tab1_316
----
6
7
8

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_316
----
6
7
8

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE (col4 >= 70.98)
----
6
7
8

statement ok
DROP VIEW view_1_tab1_316

statement ok
DROP VIEW view_2_tab1_316

statement ok
DROP VIEW view_3_tab1_316

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_316 AS SELECT pk, col0 FROM tab2 WHERE (col4 >= 70.98)

statement ok
CREATE VIEW view_2_tab2_316 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 70.98))

statement ok
CREATE VIEW view_3_tab2_316 AS SELECT pk FROM view_1_tab2_316

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE (col4 >= 70.98)
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 70.98))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_316
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_316
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_316 UNION ALL SELECT pk, col0 FROM view_2_tab2_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 >= 70.98) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 >= 70.98))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_316 UNION SELECT pk, col0 FROM view_2_tab2_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 >= 70.98) ) AS tab2_316
----
6
7
8

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_316
----
6
7
8

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE (col4 >= 70.98)
----
6
7
8

statement ok
DROP VIEW view_1_tab2_316

statement ok
DROP VIEW view_2_tab2_316

statement ok
DROP VIEW view_3_tab2_316

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_316 AS SELECT pk, col0 FROM tab3 WHERE (col4 >= 70.98)

statement ok
CREATE VIEW view_2_tab3_316 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 70.98))

statement ok
CREATE VIEW view_3_tab3_316 AS SELECT pk FROM view_1_tab3_316

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE (col4 >= 70.98)
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 70.98))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_316
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_316
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_316 UNION ALL SELECT pk, col0 FROM view_2_tab3_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 >= 70.98) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 >= 70.98))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_316 UNION SELECT pk, col0 FROM view_2_tab3_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 >= 70.98) ) AS tab3_316
----
6
7
8

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_316
----
6
7
8

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE (col4 >= 70.98)
----
6
7
8

statement ok
DROP VIEW view_1_tab3_316

statement ok
DROP VIEW view_2_tab3_316

statement ok
DROP VIEW view_3_tab3_316

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_316 AS SELECT pk, col0 FROM tab4 WHERE (col4 >= 70.98)

statement ok
CREATE VIEW view_2_tab4_316 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 70.98))

statement ok
CREATE VIEW view_3_tab4_316 AS SELECT pk FROM view_1_tab4_316

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE (col4 >= 70.98)
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 70.98))
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_316
----
6
56
7
70
8
75

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_316
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_316 UNION ALL SELECT pk, col0 FROM view_2_tab4_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 >= 70.98) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 >= 70.98))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_316 UNION SELECT pk, col0 FROM view_2_tab4_316
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 >= 70.98) ) AS tab4_316
----
6
7
8

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_316
----
6
7
8

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE (col4 >= 70.98)
----
6
7
8

statement ok
DROP VIEW view_1_tab4_316

statement ok
DROP VIEW view_2_tab4_316

statement ok
DROP VIEW view_3_tab4_316

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_318 AS SELECT pk, col0 FROM tab0 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69

statement ok
CREATE VIEW view_2_tab0_318 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)

statement ok
CREATE VIEW view_3_tab0_318 AS SELECT pk FROM view_1_tab0_318

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_318
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_318 UNION ALL SELECT pk, col0 FROM view_2_tab0_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_318 UNION SELECT pk, col0 FROM view_2_tab0_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 ) AS tab0_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_318

statement ok
DROP VIEW view_2_tab0_318

statement ok
DROP VIEW view_3_tab0_318

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_318 AS SELECT pk, col0 FROM tab1 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69

statement ok
CREATE VIEW view_2_tab1_318 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)

statement ok
CREATE VIEW view_3_tab1_318 AS SELECT pk FROM view_1_tab1_318

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_318
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_318 UNION ALL SELECT pk, col0 FROM view_2_tab1_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_318 UNION SELECT pk, col0 FROM view_2_tab1_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 ) AS tab1_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_318

statement ok
DROP VIEW view_2_tab1_318

statement ok
DROP VIEW view_3_tab1_318

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_318 AS SELECT pk, col0 FROM tab2 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69

statement ok
CREATE VIEW view_2_tab2_318 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)

statement ok
CREATE VIEW view_3_tab2_318 AS SELECT pk FROM view_1_tab2_318

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_318
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_318 UNION ALL SELECT pk, col0 FROM view_2_tab2_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_318 UNION SELECT pk, col0 FROM view_2_tab2_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 ) AS tab2_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_318

statement ok
DROP VIEW view_2_tab2_318

statement ok
DROP VIEW view_3_tab2_318

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_318 AS SELECT pk, col0 FROM tab3 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69

statement ok
CREATE VIEW view_2_tab3_318 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)

statement ok
CREATE VIEW view_3_tab3_318 AS SELECT pk FROM view_1_tab3_318

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_318
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_318 UNION ALL SELECT pk, col0 FROM view_2_tab3_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_318 UNION SELECT pk, col0 FROM view_2_tab3_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 ) AS tab3_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_318

statement ok
DROP VIEW view_2_tab3_318

statement ok
DROP VIEW view_3_tab3_318

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_318 AS SELECT pk, col0 FROM tab4 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69

statement ok
CREATE VIEW view_2_tab4_318 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)

statement ok
CREATE VIEW view_3_tab4_318 AS SELECT pk FROM view_1_tab4_318

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_318
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_318 UNION ALL SELECT pk, col0 FROM view_2_tab4_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_318 UNION SELECT pk, col0 FROM view_2_tab4_318
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69 ) AS tab4_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_318
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE col0 < 89 OR col1 < 1.95 AND col4 >= 75.40 OR col0 >= 69
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_318

statement ok
DROP VIEW view_2_tab4_318

statement ok
DROP VIEW view_3_tab4_318

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_319 AS SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL)) AND col3 = 63)

statement ok
CREATE VIEW view_2_tab0_319 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))

statement ok
CREATE VIEW view_3_tab0_319 AS SELECT pk FROM view_1_tab0_319

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL)) AND col3 = 63)
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_319
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL)) AND col3 = 63) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_319 UNION ALL SELECT pk, col0 FROM view_2_tab0_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL)) AND col3 = 63) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_319 UNION SELECT pk, col0 FROM view_2_tab0_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 IS NULL)) AND col3 = 63) ) AS tab0_319
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_319
----

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE (((col3 IS NULL)) AND col3 = 63)
----

statement ok
DROP VIEW view_1_tab0_319

statement ok
DROP VIEW view_2_tab0_319

statement ok
DROP VIEW view_3_tab0_319

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_319 AS SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL)) AND col3 = 63)

statement ok
CREATE VIEW view_2_tab1_319 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))

statement ok
CREATE VIEW view_3_tab1_319 AS SELECT pk FROM view_1_tab1_319

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL)) AND col3 = 63)
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_319
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL)) AND col3 = 63) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_319 UNION ALL SELECT pk, col0 FROM view_2_tab1_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL)) AND col3 = 63) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_319 UNION SELECT pk, col0 FROM view_2_tab1_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 IS NULL)) AND col3 = 63) ) AS tab1_319
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_319
----

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE (((col3 IS NULL)) AND col3 = 63)
----

statement ok
DROP VIEW view_1_tab1_319

statement ok
DROP VIEW view_2_tab1_319

statement ok
DROP VIEW view_3_tab1_319

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_319 AS SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL)) AND col3 = 63)

statement ok
CREATE VIEW view_2_tab2_319 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))

statement ok
CREATE VIEW view_3_tab2_319 AS SELECT pk FROM view_1_tab2_319

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL)) AND col3 = 63)
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_319
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL)) AND col3 = 63) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_319 UNION ALL SELECT pk, col0 FROM view_2_tab2_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL)) AND col3 = 63) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_319 UNION SELECT pk, col0 FROM view_2_tab2_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 IS NULL)) AND col3 = 63) ) AS tab2_319
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_319
----

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE (((col3 IS NULL)) AND col3 = 63)
----

statement ok
DROP VIEW view_1_tab2_319

statement ok
DROP VIEW view_2_tab2_319

statement ok
DROP VIEW view_3_tab2_319

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_319 AS SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL)) AND col3 = 63)

statement ok
CREATE VIEW view_2_tab3_319 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))

statement ok
CREATE VIEW view_3_tab3_319 AS SELECT pk FROM view_1_tab3_319

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL)) AND col3 = 63)
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_319
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL)) AND col3 = 63) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_319 UNION ALL SELECT pk, col0 FROM view_2_tab3_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL)) AND col3 = 63) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_319 UNION SELECT pk, col0 FROM view_2_tab3_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 IS NULL)) AND col3 = 63) ) AS tab3_319
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_319
----

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE (((col3 IS NULL)) AND col3 = 63)
----

statement ok
DROP VIEW view_1_tab3_319

statement ok
DROP VIEW view_2_tab3_319

statement ok
DROP VIEW view_3_tab3_319

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_319 AS SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL)) AND col3 = 63)

statement ok
CREATE VIEW view_2_tab4_319 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))

statement ok
CREATE VIEW view_3_tab4_319 AS SELECT pk FROM view_1_tab4_319

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL)) AND col3 = 63)
----

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_319
----

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL)) AND col3 = 63) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_319 UNION ALL SELECT pk, col0 FROM view_2_tab4_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL)) AND col3 = 63) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 IS NULL)) AND col3 = 63))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_319 UNION SELECT pk, col0 FROM view_2_tab4_319
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 IS NULL)) AND col3 = 63) ) AS tab4_319
----

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_319
----

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE (((col3 IS NULL)) AND col3 = 63)
----

statement ok
DROP VIEW view_1_tab4_319

statement ok
DROP VIEW view_2_tab4_319

statement ok
DROP VIEW view_3_tab4_319

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_320 AS SELECT pk, col0 FROM tab0 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)

statement ok
CREATE VIEW view_2_tab0_320 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))

statement ok
CREATE VIEW view_3_tab0_320 AS SELECT pk FROM view_1_tab0_320

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_320
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_320 UNION ALL SELECT pk, col0 FROM view_2_tab0_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_320 UNION SELECT pk, col0 FROM view_2_tab0_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) ) AS tab0_320
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_320
----

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

statement ok
DROP VIEW view_1_tab0_320

statement ok
DROP VIEW view_2_tab0_320

statement ok
DROP VIEW view_3_tab0_320

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_320 AS SELECT pk, col0 FROM tab1 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)

statement ok
CREATE VIEW view_2_tab1_320 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))

statement ok
CREATE VIEW view_3_tab1_320 AS SELECT pk FROM view_1_tab1_320

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_320
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_320 UNION ALL SELECT pk, col0 FROM view_2_tab1_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_320 UNION SELECT pk, col0 FROM view_2_tab1_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) ) AS tab1_320
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_320
----

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

statement ok
DROP VIEW view_1_tab1_320

statement ok
DROP VIEW view_2_tab1_320

statement ok
DROP VIEW view_3_tab1_320

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_320 AS SELECT pk, col0 FROM tab2 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)

statement ok
CREATE VIEW view_2_tab2_320 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))

statement ok
CREATE VIEW view_3_tab2_320 AS SELECT pk FROM view_1_tab2_320

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_320
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_320 UNION ALL SELECT pk, col0 FROM view_2_tab2_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_320 UNION SELECT pk, col0 FROM view_2_tab2_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) ) AS tab2_320
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_320
----

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

statement ok
DROP VIEW view_1_tab2_320

statement ok
DROP VIEW view_2_tab2_320

statement ok
DROP VIEW view_3_tab2_320

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_320 AS SELECT pk, col0 FROM tab3 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)

statement ok
CREATE VIEW view_2_tab3_320 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))

statement ok
CREATE VIEW view_3_tab3_320 AS SELECT pk FROM view_1_tab3_320

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_320
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_320 UNION ALL SELECT pk, col0 FROM view_2_tab3_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_320 UNION SELECT pk, col0 FROM view_2_tab3_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) ) AS tab3_320
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_320
----

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

statement ok
DROP VIEW view_1_tab3_320

statement ok
DROP VIEW view_2_tab3_320

statement ok
DROP VIEW view_3_tab3_320

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_320 AS SELECT pk, col0 FROM tab4 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)

statement ok
CREATE VIEW view_2_tab4_320 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))

statement ok
CREATE VIEW view_3_tab4_320 AS SELECT pk FROM view_1_tab4_320

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_320
----

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_320 UNION ALL SELECT pk, col0 FROM view_2_tab4_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_320 UNION SELECT pk, col0 FROM view_2_tab4_320
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99) ) AS tab4_320
----

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_320
----

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE ((((((col3 = 66) AND (((col0 >= 36)) AND col4 > 26.53) AND ((((col0 > 19)))) AND col3 <= 31 OR col3 IN (55) AND (col0 >= 85) OR (col3 < 13) OR col3 >= 36)))) AND col3 >= 78 AND ((col3 < 1))) OR col0 = 59 AND col3 < 27 AND (col3 < 99)
----

statement ok
DROP VIEW view_1_tab4_320

statement ok
DROP VIEW view_2_tab4_320

statement ok
DROP VIEW view_3_tab4_320

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_321 AS SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col1 > 29.53

statement ok
CREATE VIEW view_2_tab0_321 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col1 > 29.53)

statement ok
CREATE VIEW view_3_tab0_321 AS SELECT pk FROM view_1_tab0_321

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col1 > 29.53
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
0
8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_321
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_321
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col1 > 29.53 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_321 UNION ALL SELECT pk, col0 FROM view_2_tab0_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col1 > 29.53 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_321 UNION SELECT pk, col0 FROM view_2_tab0_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col1 > 29.53 ) AS tab0_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE col3 IS NULL OR col1 > 29.53
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab0_321

statement ok
DROP VIEW view_2_tab0_321

statement ok
DROP VIEW view_3_tab0_321

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_321 AS SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col1 > 29.53

statement ok
CREATE VIEW view_2_tab1_321 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col1 > 29.53)

statement ok
CREATE VIEW view_3_tab1_321 AS SELECT pk FROM view_1_tab1_321

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col1 > 29.53
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
0
8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_321
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_321
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col1 > 29.53 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_321 UNION ALL SELECT pk, col0 FROM view_2_tab1_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col1 > 29.53 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_321 UNION SELECT pk, col0 FROM view_2_tab1_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col1 > 29.53 ) AS tab1_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE col3 IS NULL OR col1 > 29.53
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab1_321

statement ok
DROP VIEW view_2_tab1_321

statement ok
DROP VIEW view_3_tab1_321

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_321 AS SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col1 > 29.53

statement ok
CREATE VIEW view_2_tab2_321 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col1 > 29.53)

statement ok
CREATE VIEW view_3_tab2_321 AS SELECT pk FROM view_1_tab2_321

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col1 > 29.53
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
0
8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_321
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_321
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col1 > 29.53 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_321 UNION ALL SELECT pk, col0 FROM view_2_tab2_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col1 > 29.53 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_321 UNION SELECT pk, col0 FROM view_2_tab2_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col1 > 29.53 ) AS tab2_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE col3 IS NULL OR col1 > 29.53
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab2_321

statement ok
DROP VIEW view_2_tab2_321

statement ok
DROP VIEW view_3_tab2_321

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_321 AS SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col1 > 29.53

statement ok
CREATE VIEW view_2_tab3_321 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col1 > 29.53)

statement ok
CREATE VIEW view_3_tab3_321 AS SELECT pk FROM view_1_tab3_321

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col1 > 29.53
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
0
8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_321
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_321
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col1 > 29.53 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_321 UNION ALL SELECT pk, col0 FROM view_2_tab3_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col1 > 29.53 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_321 UNION SELECT pk, col0 FROM view_2_tab3_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col1 > 29.53 ) AS tab3_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE col3 IS NULL OR col1 > 29.53
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab3_321

statement ok
DROP VIEW view_2_tab3_321

statement ok
DROP VIEW view_3_tab3_321

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_321 AS SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col1 > 29.53

statement ok
CREATE VIEW view_2_tab4_321 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col1 > 29.53)

statement ok
CREATE VIEW view_3_tab4_321 AS SELECT pk FROM view_1_tab4_321

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col1 > 29.53
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
0
8

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_321
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_321
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col1 > 29.53 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_321 UNION ALL SELECT pk, col0 FROM view_2_tab4_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col1 > 29.53 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col1 > 29.53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_321 UNION SELECT pk, col0 FROM view_2_tab4_321
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col1 > 29.53 ) AS tab4_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_321
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE col3 IS NULL OR col1 > 29.53
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab4_321

statement ok
DROP VIEW view_2_tab4_321

statement ok
DROP VIEW view_3_tab4_321

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_322 AS SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 46 AND 60

statement ok
CREATE VIEW view_2_tab0_322 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 46 AND 60)

statement ok
CREATE VIEW view_3_tab0_322 AS SELECT pk FROM view_1_tab0_322

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 46 AND 60
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 46 AND 60)
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_322
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_322
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 46 AND 60 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_322 UNION ALL SELECT pk, col0 FROM view_2_tab0_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 46 AND 60 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_322 UNION SELECT pk, col0 FROM view_2_tab0_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 46 AND 60 ) AS tab0_322
----
6

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_322
----
6

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col3 BETWEEN 46 AND 60
----
6

statement ok
DROP VIEW view_1_tab0_322

statement ok
DROP VIEW view_2_tab0_322

statement ok
DROP VIEW view_3_tab0_322

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_322 AS SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 46 AND 60

statement ok
CREATE VIEW view_2_tab1_322 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 46 AND 60)

statement ok
CREATE VIEW view_3_tab1_322 AS SELECT pk FROM view_1_tab1_322

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 46 AND 60
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 46 AND 60)
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_322
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_322
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 46 AND 60 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_322 UNION ALL SELECT pk, col0 FROM view_2_tab1_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 46 AND 60 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_322 UNION SELECT pk, col0 FROM view_2_tab1_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 46 AND 60 ) AS tab1_322
----
6

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_322
----
6

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col3 BETWEEN 46 AND 60
----
6

statement ok
DROP VIEW view_1_tab1_322

statement ok
DROP VIEW view_2_tab1_322

statement ok
DROP VIEW view_3_tab1_322

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_322 AS SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 46 AND 60

statement ok
CREATE VIEW view_2_tab2_322 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 46 AND 60)

statement ok
CREATE VIEW view_3_tab2_322 AS SELECT pk FROM view_1_tab2_322

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 46 AND 60
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 46 AND 60)
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_322
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_322
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 46 AND 60 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_322 UNION ALL SELECT pk, col0 FROM view_2_tab2_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 46 AND 60 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_322 UNION SELECT pk, col0 FROM view_2_tab2_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 46 AND 60 ) AS tab2_322
----
6

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_322
----
6

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col3 BETWEEN 46 AND 60
----
6

statement ok
DROP VIEW view_1_tab2_322

statement ok
DROP VIEW view_2_tab2_322

statement ok
DROP VIEW view_3_tab2_322

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_322 AS SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 46 AND 60

statement ok
CREATE VIEW view_2_tab3_322 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 46 AND 60)

statement ok
CREATE VIEW view_3_tab3_322 AS SELECT pk FROM view_1_tab3_322

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 46 AND 60
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 46 AND 60)
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_322
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_322
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 46 AND 60 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_322 UNION ALL SELECT pk, col0 FROM view_2_tab3_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 46 AND 60 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_322 UNION SELECT pk, col0 FROM view_2_tab3_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 46 AND 60 ) AS tab3_322
----
6

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_322
----
6

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col3 BETWEEN 46 AND 60
----
6

statement ok
DROP VIEW view_1_tab3_322

statement ok
DROP VIEW view_2_tab3_322

statement ok
DROP VIEW view_3_tab3_322

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_322 AS SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 46 AND 60

statement ok
CREATE VIEW view_2_tab4_322 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 46 AND 60)

statement ok
CREATE VIEW view_3_tab4_322 AS SELECT pk FROM view_1_tab4_322

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 46 AND 60
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 46 AND 60)
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_322
----
6
56

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_322
----
18 values hashing to babe5b01f26a44e41ec494b33678567f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 46 AND 60 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_322 UNION ALL SELECT pk, col0 FROM view_2_tab4_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 46 AND 60 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 46 AND 60)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_322 UNION SELECT pk, col0 FROM view_2_tab4_322
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 46 AND 60 ) AS tab4_322
----
6

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_322
----
6

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col3 BETWEEN 46 AND 60
----
6

statement ok
DROP VIEW view_1_tab4_322

statement ok
DROP VIEW view_2_tab4_322

statement ok
DROP VIEW view_3_tab4_322

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_323 AS SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 88 AND 84

statement ok
CREATE VIEW view_2_tab0_323 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 88 AND 84)

statement ok
CREATE VIEW view_3_tab0_323 AS SELECT pk FROM view_1_tab0_323

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 88 AND 84
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_323
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 88 AND 84 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_323 UNION ALL SELECT pk, col0 FROM view_2_tab0_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 88 AND 84 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_323 UNION SELECT pk, col0 FROM view_2_tab0_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 88 AND 84 ) AS tab0_323
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_323
----

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE col3 BETWEEN 88 AND 84
----

statement ok
DROP VIEW view_1_tab0_323

statement ok
DROP VIEW view_2_tab0_323

statement ok
DROP VIEW view_3_tab0_323

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_323 AS SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 88 AND 84

statement ok
CREATE VIEW view_2_tab1_323 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 88 AND 84)

statement ok
CREATE VIEW view_3_tab1_323 AS SELECT pk FROM view_1_tab1_323

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 88 AND 84
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_323
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 88 AND 84 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_323 UNION ALL SELECT pk, col0 FROM view_2_tab1_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 88 AND 84 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_323 UNION SELECT pk, col0 FROM view_2_tab1_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 88 AND 84 ) AS tab1_323
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_323
----

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE col3 BETWEEN 88 AND 84
----

statement ok
DROP VIEW view_1_tab1_323

statement ok
DROP VIEW view_2_tab1_323

statement ok
DROP VIEW view_3_tab1_323

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_323 AS SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 88 AND 84

statement ok
CREATE VIEW view_2_tab2_323 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 88 AND 84)

statement ok
CREATE VIEW view_3_tab2_323 AS SELECT pk FROM view_1_tab2_323

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 88 AND 84
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_323
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 88 AND 84 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_323 UNION ALL SELECT pk, col0 FROM view_2_tab2_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 88 AND 84 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_323 UNION SELECT pk, col0 FROM view_2_tab2_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 88 AND 84 ) AS tab2_323
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_323
----

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE col3 BETWEEN 88 AND 84
----

statement ok
DROP VIEW view_1_tab2_323

statement ok
DROP VIEW view_2_tab2_323

statement ok
DROP VIEW view_3_tab2_323

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_323 AS SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 88 AND 84

statement ok
CREATE VIEW view_2_tab3_323 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 88 AND 84)

statement ok
CREATE VIEW view_3_tab3_323 AS SELECT pk FROM view_1_tab3_323

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 88 AND 84
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_323
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 88 AND 84 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_323 UNION ALL SELECT pk, col0 FROM view_2_tab3_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 88 AND 84 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_323 UNION SELECT pk, col0 FROM view_2_tab3_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 88 AND 84 ) AS tab3_323
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_323
----

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE col3 BETWEEN 88 AND 84
----

statement ok
DROP VIEW view_1_tab3_323

statement ok
DROP VIEW view_2_tab3_323

statement ok
DROP VIEW view_3_tab3_323

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_323 AS SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 88 AND 84

statement ok
CREATE VIEW view_2_tab4_323 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 88 AND 84)

statement ok
CREATE VIEW view_3_tab4_323 AS SELECT pk FROM view_1_tab4_323

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 88 AND 84
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_323
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 88 AND 84 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_323 UNION ALL SELECT pk, col0 FROM view_2_tab4_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 88 AND 84 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 88 AND 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_323 UNION SELECT pk, col0 FROM view_2_tab4_323
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 88 AND 84 ) AS tab4_323
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_323
----

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE col3 BETWEEN 88 AND 84
----

statement ok
DROP VIEW view_1_tab4_323

statement ok
DROP VIEW view_2_tab4_323

statement ok
DROP VIEW view_3_tab4_323

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_324 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 33

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

statement ok
CREATE VIEW view_3_tab0_324 AS SELECT pk FROM view_1_tab0_324

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 33
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 33)
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_324
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_324
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_324 UNION ALL SELECT pk, col0 FROM view_2_tab0_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_324 UNION SELECT pk, col0 FROM view_2_tab0_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 33 ) AS tab0_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE col0 >= 33
----
3
5
6
7
8

statement ok
DROP VIEW view_1_tab0_324

statement ok
DROP VIEW view_2_tab0_324

statement ok
DROP VIEW view_3_tab0_324

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_324 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 33

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

statement ok
CREATE VIEW view_3_tab1_324 AS SELECT pk FROM view_1_tab1_324

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 33
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 33)
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_324
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_324
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_324 UNION ALL SELECT pk, col0 FROM view_2_tab1_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_324 UNION SELECT pk, col0 FROM view_2_tab1_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 33 ) AS tab1_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE col0 >= 33
----
3
5
6
7
8

statement ok
DROP VIEW view_1_tab1_324

statement ok
DROP VIEW view_2_tab1_324

statement ok
DROP VIEW view_3_tab1_324

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_324 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 33

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

statement ok
CREATE VIEW view_3_tab2_324 AS SELECT pk FROM view_1_tab2_324

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 33
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 33)
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_324
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_324
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_324 UNION ALL SELECT pk, col0 FROM view_2_tab2_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_324 UNION SELECT pk, col0 FROM view_2_tab2_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 33 ) AS tab2_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE col0 >= 33
----
3
5
6
7
8

statement ok
DROP VIEW view_1_tab2_324

statement ok
DROP VIEW view_2_tab2_324

statement ok
DROP VIEW view_3_tab2_324

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_324 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 33

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

statement ok
CREATE VIEW view_3_tab3_324 AS SELECT pk FROM view_1_tab3_324

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 33
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 33)
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_324
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_324
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_324 UNION ALL SELECT pk, col0 FROM view_2_tab3_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_324 UNION SELECT pk, col0 FROM view_2_tab3_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 33 ) AS tab3_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE col0 >= 33
----
3
5
6
7
8

statement ok
DROP VIEW view_1_tab3_324

statement ok
DROP VIEW view_2_tab3_324

statement ok
DROP VIEW view_3_tab3_324

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_324 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 33

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

statement ok
CREATE VIEW view_3_tab4_324 AS SELECT pk FROM view_1_tab4_324

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 33
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 33)
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_324
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_324
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_324 UNION ALL SELECT pk, col0 FROM view_2_tab4_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_324 UNION SELECT pk, col0 FROM view_2_tab4_324
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 33 ) AS tab4_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_324
----
3
5
6
7
8

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE col0 >= 33
----
3
5
6
7
8

statement ok
DROP VIEW view_1_tab4_324

statement ok
DROP VIEW view_2_tab4_324

statement ok
DROP VIEW view_3_tab4_324

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_325 AS SELECT pk, col0 FROM tab0 WHERE col1 > 95.84

statement ok
CREATE VIEW view_2_tab0_325 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 95.84)

statement ok
CREATE VIEW view_3_tab0_325 AS SELECT pk FROM view_1_tab0_325

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE col1 > 95.84
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_325
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 95.84 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_325 UNION ALL SELECT pk, col0 FROM view_2_tab0_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 95.84 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_325 UNION SELECT pk, col0 FROM view_2_tab0_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 95.84 ) AS tab0_325
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_325
----

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE col1 > 95.84
----

statement ok
DROP VIEW view_1_tab0_325

statement ok
DROP VIEW view_2_tab0_325

statement ok
DROP VIEW view_3_tab0_325

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_325 AS SELECT pk, col0 FROM tab1 WHERE col1 > 95.84

statement ok
CREATE VIEW view_2_tab1_325 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 95.84)

statement ok
CREATE VIEW view_3_tab1_325 AS SELECT pk FROM view_1_tab1_325

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE col1 > 95.84
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_325
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 95.84 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_325 UNION ALL SELECT pk, col0 FROM view_2_tab1_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 95.84 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_325 UNION SELECT pk, col0 FROM view_2_tab1_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 95.84 ) AS tab1_325
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_325
----

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE col1 > 95.84
----

statement ok
DROP VIEW view_1_tab1_325

statement ok
DROP VIEW view_2_tab1_325

statement ok
DROP VIEW view_3_tab1_325

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_325 AS SELECT pk, col0 FROM tab2 WHERE col1 > 95.84

statement ok
CREATE VIEW view_2_tab2_325 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 95.84)

statement ok
CREATE VIEW view_3_tab2_325 AS SELECT pk FROM view_1_tab2_325

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE col1 > 95.84
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_325
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 95.84 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_325 UNION ALL SELECT pk, col0 FROM view_2_tab2_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 95.84 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_325 UNION SELECT pk, col0 FROM view_2_tab2_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 95.84 ) AS tab2_325
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_325
----

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE col1 > 95.84
----

statement ok
DROP VIEW view_1_tab2_325

statement ok
DROP VIEW view_2_tab2_325

statement ok
DROP VIEW view_3_tab2_325

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_325 AS SELECT pk, col0 FROM tab3 WHERE col1 > 95.84

statement ok
CREATE VIEW view_2_tab3_325 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 95.84)

statement ok
CREATE VIEW view_3_tab3_325 AS SELECT pk FROM view_1_tab3_325

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE col1 > 95.84
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_325
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 95.84 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_325 UNION ALL SELECT pk, col0 FROM view_2_tab3_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 95.84 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_325 UNION SELECT pk, col0 FROM view_2_tab3_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 95.84 ) AS tab3_325
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_325
----

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE col1 > 95.84
----

statement ok
DROP VIEW view_1_tab3_325

statement ok
DROP VIEW view_2_tab3_325

statement ok
DROP VIEW view_3_tab3_325

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_325 AS SELECT pk, col0 FROM tab4 WHERE col1 > 95.84

statement ok
CREATE VIEW view_2_tab4_325 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 95.84)

statement ok
CREATE VIEW view_3_tab4_325 AS SELECT pk FROM view_1_tab4_325

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE col1 > 95.84
----

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_325
----

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 95.84 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_325 UNION ALL SELECT pk, col0 FROM view_2_tab4_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 95.84 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 95.84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_325 UNION SELECT pk, col0 FROM view_2_tab4_325
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 95.84 ) AS tab4_325
----

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_325
----

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE col1 > 95.84
----

statement ok
DROP VIEW view_1_tab4_325

statement ok
DROP VIEW view_2_tab4_325

statement ok
DROP VIEW view_3_tab4_325

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

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_326') DROP VIEW view_2_tab0_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_326') DROP VIEW view_3_tab0_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_326

statement ok
CREATE VIEW view_1_tab0_326 AS SELECT pk, col0 FROM tab0 WHERE col0 < 71

statement ok
CREATE VIEW view_2_tab0_326 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 71)

statement ok
CREATE VIEW view_3_tab0_326 AS SELECT pk FROM view_1_tab0_326

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE col0 < 71
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 71)
----
8
75

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_326
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_326
----
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 71 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_326 UNION ALL SELECT pk, col0 FROM view_2_tab0_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 71 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_326 UNION SELECT pk, col0 FROM view_2_tab0_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 71 ) AS tab0_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE col0 < 71
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab0_326

statement ok
DROP VIEW view_2_tab0_326

statement ok
DROP VIEW view_3_tab0_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_326') DROP VIEW view_1_tab1_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_326') DROP VIEW view_2_tab1_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_326') DROP VIEW view_3_tab1_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_326

statement ok
CREATE VIEW view_1_tab1_326 AS SELECT pk, col0 FROM tab1 WHERE col0 < 71

statement ok
CREATE VIEW view_2_tab1_326 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 71)

statement ok
CREATE VIEW view_3_tab1_326 AS SELECT pk FROM view_1_tab1_326

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE col0 < 71
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 71)
----
8
75

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_326
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_326
----
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 71 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_326 UNION ALL SELECT pk, col0 FROM view_2_tab1_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 71 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_326 UNION SELECT pk, col0 FROM view_2_tab1_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 71 ) AS tab1_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE col0 < 71
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab1_326

statement ok
DROP VIEW view_2_tab1_326

statement ok
DROP VIEW view_3_tab1_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_326') DROP VIEW view_1_tab2_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_326') DROP VIEW view_2_tab2_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_326') DROP VIEW view_3_tab2_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_326

statement ok
CREATE VIEW view_1_tab2_326 AS SELECT pk, col0 FROM tab2 WHERE col0 < 71

statement ok
CREATE VIEW view_2_tab2_326 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 71)

statement ok
CREATE VIEW view_3_tab2_326 AS SELECT pk FROM view_1_tab2_326

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE col0 < 71
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 71)
----
8
75

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_326
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_326
----
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 71 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_326 UNION ALL SELECT pk, col0 FROM view_2_tab2_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 71 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_326 UNION SELECT pk, col0 FROM view_2_tab2_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 71 ) AS tab2_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE col0 < 71
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab2_326

statement ok
DROP VIEW view_2_tab2_326

statement ok
DROP VIEW view_3_tab2_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_326') DROP VIEW view_1_tab3_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_326') DROP VIEW view_2_tab3_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_326') DROP VIEW view_3_tab3_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_326

statement ok
CREATE VIEW view_1_tab3_326 AS SELECT pk, col0 FROM tab3 WHERE col0 < 71

statement ok
CREATE VIEW view_2_tab3_326 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 71)

statement ok
CREATE VIEW view_3_tab3_326 AS SELECT pk FROM view_1_tab3_326

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE col0 < 71
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 71)
----
8
75

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_326
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_326
----
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 71 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_326 UNION ALL SELECT pk, col0 FROM view_2_tab3_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 71 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_326 UNION SELECT pk, col0 FROM view_2_tab3_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 71 ) AS tab3_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE col0 < 71
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab3_326

statement ok
DROP VIEW view_2_tab3_326

statement ok
DROP VIEW view_3_tab3_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_326') DROP VIEW view_1_tab4_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_326') DROP VIEW view_2_tab4_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_326') DROP VIEW view_3_tab4_326

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_326

statement ok
CREATE VIEW view_1_tab4_326 AS SELECT pk, col0 FROM tab4 WHERE col0 < 71

statement ok
CREATE VIEW view_2_tab4_326 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 71)

statement ok
CREATE VIEW view_3_tab4_326 AS SELECT pk FROM view_1_tab4_326

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE col0 < 71
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 71)
----
8
75

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_326
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_326
----
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 71 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_326 UNION ALL SELECT pk, col0 FROM view_2_tab4_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 71 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 71)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_326 UNION SELECT pk, col0 FROM view_2_tab4_326
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 71 ) AS tab4_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_326
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE col0 < 71
----
9 values hashing to 0b2f3ce47428ebec5f2931eddc864093

statement ok
DROP VIEW view_1_tab4_326

statement ok
DROP VIEW view_2_tab4_326

statement ok
DROP VIEW view_3_tab4_326

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_327') DROP VIEW view_1_tab0_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_327') DROP VIEW view_2_tab0_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_327') DROP VIEW view_3_tab0_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_327

statement ok
CREATE VIEW view_1_tab0_327 AS SELECT pk, col0 FROM tab0 WHERE col3 = 40

statement ok
CREATE VIEW view_2_tab0_327 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 40)

statement ok
CREATE VIEW view_3_tab0_327 AS SELECT pk FROM view_1_tab0_327

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col3 = 40
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_327
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 40 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_327 UNION ALL SELECT pk, col0 FROM view_2_tab0_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 40 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_327 UNION SELECT pk, col0 FROM view_2_tab0_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 40 ) AS tab0_327
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_327
----

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col3 = 40
----

statement ok
DROP VIEW view_1_tab0_327

statement ok
DROP VIEW view_2_tab0_327

statement ok
DROP VIEW view_3_tab0_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_327') DROP VIEW view_1_tab1_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_327') DROP VIEW view_2_tab1_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_327') DROP VIEW view_3_tab1_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_327

statement ok
CREATE VIEW view_1_tab1_327 AS SELECT pk, col0 FROM tab1 WHERE col3 = 40

statement ok
CREATE VIEW view_2_tab1_327 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 40)

statement ok
CREATE VIEW view_3_tab1_327 AS SELECT pk FROM view_1_tab1_327

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col3 = 40
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_327
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 40 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_327 UNION ALL SELECT pk, col0 FROM view_2_tab1_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 40 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_327 UNION SELECT pk, col0 FROM view_2_tab1_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 40 ) AS tab1_327
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_327
----

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col3 = 40
----

statement ok
DROP VIEW view_1_tab1_327

statement ok
DROP VIEW view_2_tab1_327

statement ok
DROP VIEW view_3_tab1_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_327') DROP VIEW view_1_tab2_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_327') DROP VIEW view_2_tab2_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_327') DROP VIEW view_3_tab2_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_327

statement ok
CREATE VIEW view_1_tab2_327 AS SELECT pk, col0 FROM tab2 WHERE col3 = 40

statement ok
CREATE VIEW view_2_tab2_327 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 40)

statement ok
CREATE VIEW view_3_tab2_327 AS SELECT pk FROM view_1_tab2_327

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col3 = 40
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_327
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 40 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_327 UNION ALL SELECT pk, col0 FROM view_2_tab2_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 40 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_327 UNION SELECT pk, col0 FROM view_2_tab2_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 40 ) AS tab2_327
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_327
----

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col3 = 40
----

statement ok
DROP VIEW view_1_tab2_327

statement ok
DROP VIEW view_2_tab2_327

statement ok
DROP VIEW view_3_tab2_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_327') DROP VIEW view_1_tab3_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_327') DROP VIEW view_2_tab3_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_327') DROP VIEW view_3_tab3_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_327

statement ok
CREATE VIEW view_1_tab3_327 AS SELECT pk, col0 FROM tab3 WHERE col3 = 40

statement ok
CREATE VIEW view_2_tab3_327 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 40)

statement ok
CREATE VIEW view_3_tab3_327 AS SELECT pk FROM view_1_tab3_327

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col3 = 40
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_327
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 40 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_327 UNION ALL SELECT pk, col0 FROM view_2_tab3_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 40 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_327 UNION SELECT pk, col0 FROM view_2_tab3_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 40 ) AS tab3_327
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_327
----

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col3 = 40
----

statement ok
DROP VIEW view_1_tab3_327

statement ok
DROP VIEW view_2_tab3_327

statement ok
DROP VIEW view_3_tab3_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_327') DROP VIEW view_1_tab4_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_327') DROP VIEW view_2_tab4_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_327') DROP VIEW view_3_tab4_327

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_327

statement ok
CREATE VIEW view_1_tab4_327 AS SELECT pk, col0 FROM tab4 WHERE col3 = 40

statement ok
CREATE VIEW view_2_tab4_327 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 40)

statement ok
CREATE VIEW view_3_tab4_327 AS SELECT pk FROM view_1_tab4_327

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col3 = 40
----

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_327
----

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 40 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_327 UNION ALL SELECT pk, col0 FROM view_2_tab4_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 40 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_327 UNION SELECT pk, col0 FROM view_2_tab4_327
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 40 ) AS tab4_327
----

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_327
----

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col3 = 40
----

statement ok
DROP VIEW view_1_tab4_327

statement ok
DROP VIEW view_2_tab4_327

statement ok
DROP VIEW view_3_tab4_327

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_328') DROP VIEW view_1_tab0_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_328') DROP VIEW view_2_tab0_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_328') DROP VIEW view_3_tab0_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_328

statement ok
CREATE VIEW view_1_tab0_328 AS SELECT pk, col0 FROM tab0 WHERE col4 > 13.85

statement ok
CREATE VIEW view_2_tab0_328 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 13.85)

statement ok
CREATE VIEW view_3_tab0_328 AS SELECT pk FROM view_1_tab0_328

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE col4 > 13.85
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 13.85)
----
4
11

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_328
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_328
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 13.85 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_328 UNION ALL SELECT pk, col0 FROM view_2_tab0_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 13.85 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_328 UNION SELECT pk, col0 FROM view_2_tab0_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 13.85 ) AS tab0_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE col4 > 13.85
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab0_328

statement ok
DROP VIEW view_2_tab0_328

statement ok
DROP VIEW view_3_tab0_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_328') DROP VIEW view_1_tab1_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_328') DROP VIEW view_2_tab1_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_328') DROP VIEW view_3_tab1_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_328

statement ok
CREATE VIEW view_1_tab1_328 AS SELECT pk, col0 FROM tab1 WHERE col4 > 13.85

statement ok
CREATE VIEW view_2_tab1_328 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 13.85)

statement ok
CREATE VIEW view_3_tab1_328 AS SELECT pk FROM view_1_tab1_328

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE col4 > 13.85
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 13.85)
----
4
11

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_328
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_328
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 13.85 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_328 UNION ALL SELECT pk, col0 FROM view_2_tab1_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 13.85 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_328 UNION SELECT pk, col0 FROM view_2_tab1_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 13.85 ) AS tab1_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE col4 > 13.85
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab1_328

statement ok
DROP VIEW view_2_tab1_328

statement ok
DROP VIEW view_3_tab1_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_328') DROP VIEW view_1_tab2_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_328') DROP VIEW view_2_tab2_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_328') DROP VIEW view_3_tab2_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_328

statement ok
CREATE VIEW view_1_tab2_328 AS SELECT pk, col0 FROM tab2 WHERE col4 > 13.85

statement ok
CREATE VIEW view_2_tab2_328 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 13.85)

statement ok
CREATE VIEW view_3_tab2_328 AS SELECT pk FROM view_1_tab2_328

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE col4 > 13.85
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 13.85)
----
4
11

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_328
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_328
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 13.85 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_328 UNION ALL SELECT pk, col0 FROM view_2_tab2_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 13.85 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_328 UNION SELECT pk, col0 FROM view_2_tab2_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 13.85 ) AS tab2_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE col4 > 13.85
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab2_328

statement ok
DROP VIEW view_2_tab2_328

statement ok
DROP VIEW view_3_tab2_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_328') DROP VIEW view_1_tab3_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_328') DROP VIEW view_2_tab3_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_328') DROP VIEW view_3_tab3_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_328

statement ok
CREATE VIEW view_1_tab3_328 AS SELECT pk, col0 FROM tab3 WHERE col4 > 13.85

statement ok
CREATE VIEW view_2_tab3_328 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 13.85)

statement ok
CREATE VIEW view_3_tab3_328 AS SELECT pk FROM view_1_tab3_328

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE col4 > 13.85
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 13.85)
----
4
11

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_328
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_328
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 13.85 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_328 UNION ALL SELECT pk, col0 FROM view_2_tab3_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 13.85 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_328 UNION SELECT pk, col0 FROM view_2_tab3_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 13.85 ) AS tab3_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE col4 > 13.85
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab3_328

statement ok
DROP VIEW view_2_tab3_328

statement ok
DROP VIEW view_3_tab3_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_328') DROP VIEW view_1_tab4_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_328') DROP VIEW view_2_tab4_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_328') DROP VIEW view_3_tab4_328

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_328

statement ok
CREATE VIEW view_1_tab4_328 AS SELECT pk, col0 FROM tab4 WHERE col4 > 13.85

statement ok
CREATE VIEW view_2_tab4_328 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 13.85)

statement ok
CREATE VIEW view_3_tab4_328 AS SELECT pk FROM view_1_tab4_328

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE col4 > 13.85
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 13.85)
----
4
11

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_328
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_328
----
4
11

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 13.85 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_328 UNION ALL SELECT pk, col0 FROM view_2_tab4_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 13.85 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 13.85)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_328 UNION SELECT pk, col0 FROM view_2_tab4_328
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 13.85 ) AS tab4_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_328
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE col4 > 13.85
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab4_328

statement ok
DROP VIEW view_2_tab4_328

statement ok
DROP VIEW view_3_tab4_328

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_329') DROP VIEW view_1_tab0_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_329') DROP VIEW view_2_tab0_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_329') DROP VIEW view_3_tab0_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_329

statement ok
CREATE VIEW view_1_tab0_329 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))

statement ok
CREATE VIEW view_2_tab0_329 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))

statement ok
CREATE VIEW view_3_tab0_329 AS SELECT pk FROM view_1_tab0_329

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_329
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_329 UNION ALL SELECT pk, col0 FROM view_2_tab0_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_329 UNION SELECT pk, col0 FROM view_2_tab0_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) ) AS tab0_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_329

statement ok
DROP VIEW view_2_tab0_329

statement ok
DROP VIEW view_3_tab0_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_329') DROP VIEW view_1_tab1_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_329') DROP VIEW view_2_tab1_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_329') DROP VIEW view_3_tab1_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_329

statement ok
CREATE VIEW view_1_tab1_329 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))

statement ok
CREATE VIEW view_2_tab1_329 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))

statement ok
CREATE VIEW view_3_tab1_329 AS SELECT pk FROM view_1_tab1_329

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_329
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_329 UNION ALL SELECT pk, col0 FROM view_2_tab1_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_329 UNION SELECT pk, col0 FROM view_2_tab1_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) ) AS tab1_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_329

statement ok
DROP VIEW view_2_tab1_329

statement ok
DROP VIEW view_3_tab1_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_329') DROP VIEW view_1_tab2_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_329') DROP VIEW view_2_tab2_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_329') DROP VIEW view_3_tab2_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_329

statement ok
CREATE VIEW view_1_tab2_329 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))

statement ok
CREATE VIEW view_2_tab2_329 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))

statement ok
CREATE VIEW view_3_tab2_329 AS SELECT pk FROM view_1_tab2_329

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_329
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_329 UNION ALL SELECT pk, col0 FROM view_2_tab2_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_329 UNION SELECT pk, col0 FROM view_2_tab2_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) ) AS tab2_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_329

statement ok
DROP VIEW view_2_tab2_329

statement ok
DROP VIEW view_3_tab2_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_329') DROP VIEW view_1_tab3_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_329') DROP VIEW view_2_tab3_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_329') DROP VIEW view_3_tab3_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_329

statement ok
CREATE VIEW view_1_tab3_329 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))

statement ok
CREATE VIEW view_2_tab3_329 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))

statement ok
CREATE VIEW view_3_tab3_329 AS SELECT pk FROM view_1_tab3_329

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_329
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_329 UNION ALL SELECT pk, col0 FROM view_2_tab3_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_329 UNION SELECT pk, col0 FROM view_2_tab3_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) ) AS tab3_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_329

statement ok
DROP VIEW view_2_tab3_329

statement ok
DROP VIEW view_3_tab3_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_329') DROP VIEW view_1_tab4_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_329') DROP VIEW view_2_tab4_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_329') DROP VIEW view_3_tab4_329

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_329

statement ok
CREATE VIEW view_1_tab4_329 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))

statement ok
CREATE VIEW view_2_tab4_329 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))

statement ok
CREATE VIEW view_3_tab4_329 AS SELECT pk FROM view_1_tab4_329

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_329
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_329 UNION ALL SELECT pk, col0 FROM view_2_tab4_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_329 UNION SELECT pk, col0 FROM view_2_tab4_329
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64)) ) AS tab4_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_329
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE (col3 >= 23 OR ((col0 <= 30)) AND col1 < 20.12 AND ((col3 > 67 AND (((((col4 = 66.93) OR col3 < 18 AND col3 < 5 OR (col4 > 31.93) AND ((((col0 > 59)))))) OR col0 >= 45 AND col3 IN (16,66,97,74,45) AND col1 > 52.63)) AND ((((col3 < 47))) AND ((col0 > 95))) OR ((col0 >= 89)) AND col0 >= 77 AND (col4 IN (92.98,97.40,99.74,80.42)) OR col0 < 15)) OR (col0 < 64))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_329

statement ok
DROP VIEW view_2_tab4_329

statement ok
DROP VIEW view_3_tab4_329

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_330') DROP VIEW view_1_tab0_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_330') DROP VIEW view_2_tab0_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_330') DROP VIEW view_3_tab0_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_330

statement ok
CREATE VIEW view_1_tab0_330 AS SELECT pk, col0 FROM tab0 WHERE col0 = 51

statement ok
CREATE VIEW view_2_tab0_330 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 51)

statement ok
CREATE VIEW view_3_tab0_330 AS SELECT pk FROM view_1_tab0_330

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE col0 = 51
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_330
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 51 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_330 UNION ALL SELECT pk, col0 FROM view_2_tab0_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 51 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_330 UNION SELECT pk, col0 FROM view_2_tab0_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 51 ) AS tab0_330
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_330
----

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE col0 = 51
----

statement ok
DROP VIEW view_1_tab0_330

statement ok
DROP VIEW view_2_tab0_330

statement ok
DROP VIEW view_3_tab0_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_330') DROP VIEW view_1_tab1_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_330') DROP VIEW view_2_tab1_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_330') DROP VIEW view_3_tab1_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_330

statement ok
CREATE VIEW view_1_tab1_330 AS SELECT pk, col0 FROM tab1 WHERE col0 = 51

statement ok
CREATE VIEW view_2_tab1_330 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 51)

statement ok
CREATE VIEW view_3_tab1_330 AS SELECT pk FROM view_1_tab1_330

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE col0 = 51
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_330
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 51 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_330 UNION ALL SELECT pk, col0 FROM view_2_tab1_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 51 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_330 UNION SELECT pk, col0 FROM view_2_tab1_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 51 ) AS tab1_330
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_330
----

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE col0 = 51
----

statement ok
DROP VIEW view_1_tab1_330

statement ok
DROP VIEW view_2_tab1_330

statement ok
DROP VIEW view_3_tab1_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_330') DROP VIEW view_1_tab2_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_330') DROP VIEW view_2_tab2_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_330') DROP VIEW view_3_tab2_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_330

statement ok
CREATE VIEW view_1_tab2_330 AS SELECT pk, col0 FROM tab2 WHERE col0 = 51

statement ok
CREATE VIEW view_2_tab2_330 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 51)

statement ok
CREATE VIEW view_3_tab2_330 AS SELECT pk FROM view_1_tab2_330

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE col0 = 51
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_330
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 51 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_330 UNION ALL SELECT pk, col0 FROM view_2_tab2_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 51 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_330 UNION SELECT pk, col0 FROM view_2_tab2_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 51 ) AS tab2_330
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_330
----

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE col0 = 51
----

statement ok
DROP VIEW view_1_tab2_330

statement ok
DROP VIEW view_2_tab2_330

statement ok
DROP VIEW view_3_tab2_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_330') DROP VIEW view_1_tab3_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_330') DROP VIEW view_2_tab3_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_330') DROP VIEW view_3_tab3_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_330

statement ok
CREATE VIEW view_1_tab3_330 AS SELECT pk, col0 FROM tab3 WHERE col0 = 51

statement ok
CREATE VIEW view_2_tab3_330 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 51)

statement ok
CREATE VIEW view_3_tab3_330 AS SELECT pk FROM view_1_tab3_330

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE col0 = 51
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_330
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 51 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_330 UNION ALL SELECT pk, col0 FROM view_2_tab3_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 51 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_330 UNION SELECT pk, col0 FROM view_2_tab3_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 51 ) AS tab3_330
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_330
----

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE col0 = 51
----

statement ok
DROP VIEW view_1_tab3_330

statement ok
DROP VIEW view_2_tab3_330

statement ok
DROP VIEW view_3_tab3_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_330') DROP VIEW view_1_tab4_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_330') DROP VIEW view_2_tab4_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_330') DROP VIEW view_3_tab4_330

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_330

statement ok
CREATE VIEW view_1_tab4_330 AS SELECT pk, col0 FROM tab4 WHERE col0 = 51

statement ok
CREATE VIEW view_2_tab4_330 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 51)

statement ok
CREATE VIEW view_3_tab4_330 AS SELECT pk FROM view_1_tab4_330

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE col0 = 51
----

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_330
----

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 51 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_330 UNION ALL SELECT pk, col0 FROM view_2_tab4_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 51 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 51)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_330 UNION SELECT pk, col0 FROM view_2_tab4_330
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 51 ) AS tab4_330
----

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_330
----

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE col0 = 51
----

statement ok
DROP VIEW view_1_tab4_330

statement ok
DROP VIEW view_2_tab4_330

statement ok
DROP VIEW view_3_tab4_330

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_331') DROP VIEW view_1_tab0_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_331') DROP VIEW view_2_tab0_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_331') DROP VIEW view_3_tab0_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_331

statement ok
CREATE VIEW view_1_tab0_331 AS SELECT pk, col0 FROM tab0 WHERE col1 > 56.82

statement ok
CREATE VIEW view_2_tab0_331 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.82)

statement ok
CREATE VIEW view_3_tab0_331 AS SELECT pk FROM view_1_tab0_331

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE col1 > 56.82
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.82)
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_331
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_331
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 56.82 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_331 UNION ALL SELECT pk, col0 FROM view_2_tab0_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 56.82 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_331 UNION SELECT pk, col0 FROM view_2_tab0_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 56.82 ) AS tab0_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE col1 > 56.82
----
1
5
6
7

statement ok
DROP VIEW view_1_tab0_331

statement ok
DROP VIEW view_2_tab0_331

statement ok
DROP VIEW view_3_tab0_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_331') DROP VIEW view_1_tab1_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_331') DROP VIEW view_2_tab1_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_331') DROP VIEW view_3_tab1_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_331

statement ok
CREATE VIEW view_1_tab1_331 AS SELECT pk, col0 FROM tab1 WHERE col1 > 56.82

statement ok
CREATE VIEW view_2_tab1_331 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.82)

statement ok
CREATE VIEW view_3_tab1_331 AS SELECT pk FROM view_1_tab1_331

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE col1 > 56.82
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.82)
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_331
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_331
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 56.82 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_331 UNION ALL SELECT pk, col0 FROM view_2_tab1_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 56.82 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_331 UNION SELECT pk, col0 FROM view_2_tab1_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 56.82 ) AS tab1_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE col1 > 56.82
----
1
5
6
7

statement ok
DROP VIEW view_1_tab1_331

statement ok
DROP VIEW view_2_tab1_331

statement ok
DROP VIEW view_3_tab1_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_331') DROP VIEW view_1_tab2_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_331') DROP VIEW view_2_tab2_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_331') DROP VIEW view_3_tab2_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_331

statement ok
CREATE VIEW view_1_tab2_331 AS SELECT pk, col0 FROM tab2 WHERE col1 > 56.82

statement ok
CREATE VIEW view_2_tab2_331 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.82)

statement ok
CREATE VIEW view_3_tab2_331 AS SELECT pk FROM view_1_tab2_331

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE col1 > 56.82
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.82)
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_331
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_331
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 56.82 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_331 UNION ALL SELECT pk, col0 FROM view_2_tab2_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 56.82 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_331 UNION SELECT pk, col0 FROM view_2_tab2_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 56.82 ) AS tab2_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE col1 > 56.82
----
1
5
6
7

statement ok
DROP VIEW view_1_tab2_331

statement ok
DROP VIEW view_2_tab2_331

statement ok
DROP VIEW view_3_tab2_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_331') DROP VIEW view_1_tab3_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_331') DROP VIEW view_2_tab3_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_331') DROP VIEW view_3_tab3_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_331

statement ok
CREATE VIEW view_1_tab3_331 AS SELECT pk, col0 FROM tab3 WHERE col1 > 56.82

statement ok
CREATE VIEW view_2_tab3_331 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.82)

statement ok
CREATE VIEW view_3_tab3_331 AS SELECT pk FROM view_1_tab3_331

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE col1 > 56.82
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.82)
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_331
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_331
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 56.82 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_331 UNION ALL SELECT pk, col0 FROM view_2_tab3_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 56.82 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_331 UNION SELECT pk, col0 FROM view_2_tab3_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 56.82 ) AS tab3_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE col1 > 56.82
----
1
5
6
7

statement ok
DROP VIEW view_1_tab3_331

statement ok
DROP VIEW view_2_tab3_331

statement ok
DROP VIEW view_3_tab3_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_331') DROP VIEW view_1_tab4_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_331') DROP VIEW view_2_tab4_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_331') DROP VIEW view_3_tab4_331

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_331

statement ok
CREATE VIEW view_1_tab4_331 AS SELECT pk, col0 FROM tab4 WHERE col1 > 56.82

statement ok
CREATE VIEW view_2_tab4_331 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.82)

statement ok
CREATE VIEW view_3_tab4_331 AS SELECT pk FROM view_1_tab4_331

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE col1 > 56.82
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.82)
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_331
----
1
6
5
47
6
56
7
70

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_331
----
12 values hashing to 3847b548cb0c0f0807ea4796a0b90440

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 56.82 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_331 UNION ALL SELECT pk, col0 FROM view_2_tab4_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 56.82 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 56.82)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_331 UNION SELECT pk, col0 FROM view_2_tab4_331
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 56.82 ) AS tab4_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_331
----
1
5
6
7

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE col1 > 56.82
----
1
5
6
7

statement ok
DROP VIEW view_1_tab4_331

statement ok
DROP VIEW view_2_tab4_331

statement ok
DROP VIEW view_3_tab4_331

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_332') DROP VIEW view_1_tab0_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_332') DROP VIEW view_2_tab0_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_332') DROP VIEW view_3_tab0_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_332

statement ok
CREATE VIEW view_1_tab0_332 AS SELECT pk, col0 FROM tab0 WHERE col1 < 89.41

statement ok
CREATE VIEW view_2_tab0_332 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 89.41)

statement ok
CREATE VIEW view_3_tab0_332 AS SELECT pk FROM view_1_tab0_332

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE col1 < 89.41
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 89.41)
----

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_332
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 89.41 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_332 UNION ALL SELECT pk, col0 FROM view_2_tab0_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 89.41 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_332 UNION SELECT pk, col0 FROM view_2_tab0_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 89.41 ) AS tab0_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE col1 < 89.41
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_332

statement ok
DROP VIEW view_2_tab0_332

statement ok
DROP VIEW view_3_tab0_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_332') DROP VIEW view_1_tab1_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_332') DROP VIEW view_2_tab1_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_332') DROP VIEW view_3_tab1_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_332

statement ok
CREATE VIEW view_1_tab1_332 AS SELECT pk, col0 FROM tab1 WHERE col1 < 89.41

statement ok
CREATE VIEW view_2_tab1_332 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 89.41)

statement ok
CREATE VIEW view_3_tab1_332 AS SELECT pk FROM view_1_tab1_332

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE col1 < 89.41
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 89.41)
----

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_332
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 89.41 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_332 UNION ALL SELECT pk, col0 FROM view_2_tab1_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 89.41 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_332 UNION SELECT pk, col0 FROM view_2_tab1_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 89.41 ) AS tab1_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE col1 < 89.41
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_332

statement ok
DROP VIEW view_2_tab1_332

statement ok
DROP VIEW view_3_tab1_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_332') DROP VIEW view_1_tab2_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_332') DROP VIEW view_2_tab2_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_332') DROP VIEW view_3_tab2_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_332

statement ok
CREATE VIEW view_1_tab2_332 AS SELECT pk, col0 FROM tab2 WHERE col1 < 89.41

statement ok
CREATE VIEW view_2_tab2_332 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 89.41)

statement ok
CREATE VIEW view_3_tab2_332 AS SELECT pk FROM view_1_tab2_332

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE col1 < 89.41
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 89.41)
----

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_332
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 89.41 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_332 UNION ALL SELECT pk, col0 FROM view_2_tab2_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 89.41 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_332 UNION SELECT pk, col0 FROM view_2_tab2_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 89.41 ) AS tab2_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE col1 < 89.41
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_332

statement ok
DROP VIEW view_2_tab2_332

statement ok
DROP VIEW view_3_tab2_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_332') DROP VIEW view_1_tab3_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_332') DROP VIEW view_2_tab3_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_332') DROP VIEW view_3_tab3_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_332

statement ok
CREATE VIEW view_1_tab3_332 AS SELECT pk, col0 FROM tab3 WHERE col1 < 89.41

statement ok
CREATE VIEW view_2_tab3_332 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 89.41)

statement ok
CREATE VIEW view_3_tab3_332 AS SELECT pk FROM view_1_tab3_332

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE col1 < 89.41
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 89.41)
----

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_332
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 89.41 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_332 UNION ALL SELECT pk, col0 FROM view_2_tab3_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 89.41 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_332 UNION SELECT pk, col0 FROM view_2_tab3_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 89.41 ) AS tab3_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE col1 < 89.41
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_332

statement ok
DROP VIEW view_2_tab3_332

statement ok
DROP VIEW view_3_tab3_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_332') DROP VIEW view_1_tab4_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_332') DROP VIEW view_2_tab4_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_332') DROP VIEW view_3_tab4_332

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_332

statement ok
CREATE VIEW view_1_tab4_332 AS SELECT pk, col0 FROM tab4 WHERE col1 < 89.41

statement ok
CREATE VIEW view_2_tab4_332 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 89.41)

statement ok
CREATE VIEW view_3_tab4_332 AS SELECT pk FROM view_1_tab4_332

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE col1 < 89.41
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 89.41)
----

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_332
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 89.41 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_332 UNION ALL SELECT pk, col0 FROM view_2_tab4_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 89.41 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 89.41)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_332 UNION SELECT pk, col0 FROM view_2_tab4_332
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 89.41 ) AS tab4_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_332
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE col1 < 89.41
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_332

statement ok
DROP VIEW view_2_tab4_332

statement ok
DROP VIEW view_3_tab4_332

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_333') DROP VIEW view_1_tab0_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_333') DROP VIEW view_2_tab0_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_333') DROP VIEW view_3_tab0_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_333

statement ok
CREATE VIEW view_1_tab0_333 AS SELECT pk, col0 FROM tab0 WHERE col0 > 49

statement ok
CREATE VIEW view_2_tab0_333 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 49)

statement ok
CREATE VIEW view_3_tab0_333 AS SELECT pk FROM view_1_tab0_333

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE col0 > 49
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 49)
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_333
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_333
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 49 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_333 UNION ALL SELECT pk, col0 FROM view_2_tab0_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 49 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_333 UNION SELECT pk, col0 FROM view_2_tab0_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 49 ) AS tab0_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE col0 > 49
----
3
6
7
8

statement ok
DROP VIEW view_1_tab0_333

statement ok
DROP VIEW view_2_tab0_333

statement ok
DROP VIEW view_3_tab0_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_333') DROP VIEW view_1_tab1_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_333') DROP VIEW view_2_tab1_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_333') DROP VIEW view_3_tab1_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_333

statement ok
CREATE VIEW view_1_tab1_333 AS SELECT pk, col0 FROM tab1 WHERE col0 > 49

statement ok
CREATE VIEW view_2_tab1_333 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 49)

statement ok
CREATE VIEW view_3_tab1_333 AS SELECT pk FROM view_1_tab1_333

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE col0 > 49
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 49)
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_333
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_333
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 49 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_333 UNION ALL SELECT pk, col0 FROM view_2_tab1_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 49 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_333 UNION SELECT pk, col0 FROM view_2_tab1_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 49 ) AS tab1_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE col0 > 49
----
3
6
7
8

statement ok
DROP VIEW view_1_tab1_333

statement ok
DROP VIEW view_2_tab1_333

statement ok
DROP VIEW view_3_tab1_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_333') DROP VIEW view_1_tab2_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_333') DROP VIEW view_2_tab2_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_333') DROP VIEW view_3_tab2_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_333

statement ok
CREATE VIEW view_1_tab2_333 AS SELECT pk, col0 FROM tab2 WHERE col0 > 49

statement ok
CREATE VIEW view_2_tab2_333 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 49)

statement ok
CREATE VIEW view_3_tab2_333 AS SELECT pk FROM view_1_tab2_333

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE col0 > 49
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 49)
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_333
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_333
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 49 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_333 UNION ALL SELECT pk, col0 FROM view_2_tab2_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 49 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_333 UNION SELECT pk, col0 FROM view_2_tab2_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 49 ) AS tab2_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE col0 > 49
----
3
6
7
8

statement ok
DROP VIEW view_1_tab2_333

statement ok
DROP VIEW view_2_tab2_333

statement ok
DROP VIEW view_3_tab2_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_333') DROP VIEW view_1_tab3_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_333') DROP VIEW view_2_tab3_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_333') DROP VIEW view_3_tab3_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_333

statement ok
CREATE VIEW view_1_tab3_333 AS SELECT pk, col0 FROM tab3 WHERE col0 > 49

statement ok
CREATE VIEW view_2_tab3_333 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 49)

statement ok
CREATE VIEW view_3_tab3_333 AS SELECT pk FROM view_1_tab3_333

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE col0 > 49
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 49)
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_333
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_333
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 49 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_333 UNION ALL SELECT pk, col0 FROM view_2_tab3_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 49 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_333 UNION SELECT pk, col0 FROM view_2_tab3_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 49 ) AS tab3_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE col0 > 49
----
3
6
7
8

statement ok
DROP VIEW view_1_tab3_333

statement ok
DROP VIEW view_2_tab3_333

statement ok
DROP VIEW view_3_tab3_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_333') DROP VIEW view_1_tab4_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_333') DROP VIEW view_2_tab4_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_333') DROP VIEW view_3_tab4_333

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_333

statement ok
CREATE VIEW view_1_tab4_333 AS SELECT pk, col0 FROM tab4 WHERE col0 > 49

statement ok
CREATE VIEW view_2_tab4_333 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 49)

statement ok
CREATE VIEW view_3_tab4_333 AS SELECT pk FROM view_1_tab4_333

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE col0 > 49
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 49)
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_333
----
3
53
6
56
7
70
8
75

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_333
----
12 values hashing to 70db4eb4fbd98c2e87a0fc2e0121973a

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 49 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_333 UNION ALL SELECT pk, col0 FROM view_2_tab4_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 49 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 49)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_333 UNION SELECT pk, col0 FROM view_2_tab4_333
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 49 ) AS tab4_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_333
----
3
6
7
8

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE col0 > 49
----
3
6
7
8

statement ok
DROP VIEW view_1_tab4_333

statement ok
DROP VIEW view_2_tab4_333

statement ok
DROP VIEW view_3_tab4_333

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_334') DROP VIEW view_1_tab0_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_334') DROP VIEW view_2_tab0_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_334') DROP VIEW view_3_tab0_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_334

statement ok
CREATE VIEW view_1_tab0_334 AS SELECT pk, col0 FROM tab0 WHERE col4 < 62.6

statement ok
CREATE VIEW view_2_tab0_334 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 62.6)

statement ok
CREATE VIEW view_3_tab0_334 AS SELECT pk FROM view_1_tab0_334

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col4 < 62.6
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 62.6)
----
6
56
7
70
8
75

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_334
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_334
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 62.6 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_334 UNION ALL SELECT pk, col0 FROM view_2_tab0_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 < 62.6 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_334 UNION SELECT pk, col0 FROM view_2_tab0_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 < 62.6 ) AS tab0_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col4 < 62.6
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab0_334

statement ok
DROP VIEW view_2_tab0_334

statement ok
DROP VIEW view_3_tab0_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_334') DROP VIEW view_1_tab1_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_334') DROP VIEW view_2_tab1_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_334') DROP VIEW view_3_tab1_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_334

statement ok
CREATE VIEW view_1_tab1_334 AS SELECT pk, col0 FROM tab1 WHERE col4 < 62.6

statement ok
CREATE VIEW view_2_tab1_334 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 62.6)

statement ok
CREATE VIEW view_3_tab1_334 AS SELECT pk FROM view_1_tab1_334

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col4 < 62.6
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 62.6)
----
6
56
7
70
8
75

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_334
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_334
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 62.6 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_334 UNION ALL SELECT pk, col0 FROM view_2_tab1_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 < 62.6 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_334 UNION SELECT pk, col0 FROM view_2_tab1_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 < 62.6 ) AS tab1_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col4 < 62.6
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab1_334

statement ok
DROP VIEW view_2_tab1_334

statement ok
DROP VIEW view_3_tab1_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_334') DROP VIEW view_1_tab2_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_334') DROP VIEW view_2_tab2_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_334') DROP VIEW view_3_tab2_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_334

statement ok
CREATE VIEW view_1_tab2_334 AS SELECT pk, col0 FROM tab2 WHERE col4 < 62.6

statement ok
CREATE VIEW view_2_tab2_334 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 62.6)

statement ok
CREATE VIEW view_3_tab2_334 AS SELECT pk FROM view_1_tab2_334

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col4 < 62.6
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 62.6)
----
6
56
7
70
8
75

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_334
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_334
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 62.6 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_334 UNION ALL SELECT pk, col0 FROM view_2_tab2_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 < 62.6 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_334 UNION SELECT pk, col0 FROM view_2_tab2_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 < 62.6 ) AS tab2_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col4 < 62.6
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab2_334

statement ok
DROP VIEW view_2_tab2_334

statement ok
DROP VIEW view_3_tab2_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_334') DROP VIEW view_1_tab3_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_334') DROP VIEW view_2_tab3_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_334') DROP VIEW view_3_tab3_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_334

statement ok
CREATE VIEW view_1_tab3_334 AS SELECT pk, col0 FROM tab3 WHERE col4 < 62.6

statement ok
CREATE VIEW view_2_tab3_334 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 62.6)

statement ok
CREATE VIEW view_3_tab3_334 AS SELECT pk FROM view_1_tab3_334

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col4 < 62.6
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 62.6)
----
6
56
7
70
8
75

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_334
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_334
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 62.6 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_334 UNION ALL SELECT pk, col0 FROM view_2_tab3_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 < 62.6 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_334 UNION SELECT pk, col0 FROM view_2_tab3_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 < 62.6 ) AS tab3_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col4 < 62.6
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab3_334

statement ok
DROP VIEW view_2_tab3_334

statement ok
DROP VIEW view_3_tab3_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_334') DROP VIEW view_1_tab4_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_334') DROP VIEW view_2_tab4_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_334') DROP VIEW view_3_tab4_334

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_334

statement ok
CREATE VIEW view_1_tab4_334 AS SELECT pk, col0 FROM tab4 WHERE col4 < 62.6

statement ok
CREATE VIEW view_2_tab4_334 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 62.6)

statement ok
CREATE VIEW view_3_tab4_334 AS SELECT pk FROM view_1_tab4_334

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col4 < 62.6
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 62.6)
----
6
56
7
70
8
75

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_334
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_334
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 62.6 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_334 UNION ALL SELECT pk, col0 FROM view_2_tab4_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 < 62.6 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 < 62.6)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_334 UNION SELECT pk, col0 FROM view_2_tab4_334
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 < 62.6 ) AS tab4_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_334
----
0
1
2
3
4
5
9

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col4 < 62.6
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab4_334

statement ok
DROP VIEW view_2_tab4_334

statement ok
DROP VIEW view_3_tab4_334

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_335') DROP VIEW view_1_tab0_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_335') DROP VIEW view_2_tab0_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_335') DROP VIEW view_3_tab0_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_335

statement ok
CREATE VIEW view_1_tab0_335 AS SELECT pk, col0 FROM tab0 WHERE col3 > 40

statement ok
CREATE VIEW view_2_tab0_335 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 40)

statement ok
CREATE VIEW view_3_tab0_335 AS SELECT pk FROM view_1_tab0_335

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE col3 > 40
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 40)
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_335
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_335
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 40 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_335 UNION ALL SELECT pk, col0 FROM view_2_tab0_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 40 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_335 UNION SELECT pk, col0 FROM view_2_tab0_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 40 ) AS tab0_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE col3 > 40
----
1
4
6
7

statement ok
DROP VIEW view_1_tab0_335

statement ok
DROP VIEW view_2_tab0_335

statement ok
DROP VIEW view_3_tab0_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_335') DROP VIEW view_1_tab1_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_335') DROP VIEW view_2_tab1_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_335') DROP VIEW view_3_tab1_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_335

statement ok
CREATE VIEW view_1_tab1_335 AS SELECT pk, col0 FROM tab1 WHERE col3 > 40

statement ok
CREATE VIEW view_2_tab1_335 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 40)

statement ok
CREATE VIEW view_3_tab1_335 AS SELECT pk FROM view_1_tab1_335

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE col3 > 40
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 40)
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_335
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_335
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 40 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_335 UNION ALL SELECT pk, col0 FROM view_2_tab1_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 40 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_335 UNION SELECT pk, col0 FROM view_2_tab1_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 40 ) AS tab1_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE col3 > 40
----
1
4
6
7

statement ok
DROP VIEW view_1_tab1_335

statement ok
DROP VIEW view_2_tab1_335

statement ok
DROP VIEW view_3_tab1_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_335') DROP VIEW view_1_tab2_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_335') DROP VIEW view_2_tab2_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_335') DROP VIEW view_3_tab2_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_335

statement ok
CREATE VIEW view_1_tab2_335 AS SELECT pk, col0 FROM tab2 WHERE col3 > 40

statement ok
CREATE VIEW view_2_tab2_335 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 40)

statement ok
CREATE VIEW view_3_tab2_335 AS SELECT pk FROM view_1_tab2_335

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE col3 > 40
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 40)
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_335
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_335
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 40 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_335 UNION ALL SELECT pk, col0 FROM view_2_tab2_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 40 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_335 UNION SELECT pk, col0 FROM view_2_tab2_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 40 ) AS tab2_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE col3 > 40
----
1
4
6
7

statement ok
DROP VIEW view_1_tab2_335

statement ok
DROP VIEW view_2_tab2_335

statement ok
DROP VIEW view_3_tab2_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_335') DROP VIEW view_1_tab3_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_335') DROP VIEW view_2_tab3_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_335') DROP VIEW view_3_tab3_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_335

statement ok
CREATE VIEW view_1_tab3_335 AS SELECT pk, col0 FROM tab3 WHERE col3 > 40

statement ok
CREATE VIEW view_2_tab3_335 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 40)

statement ok
CREATE VIEW view_3_tab3_335 AS SELECT pk FROM view_1_tab3_335

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE col3 > 40
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 40)
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_335
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_335
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 40 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_335 UNION ALL SELECT pk, col0 FROM view_2_tab3_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 40 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_335 UNION SELECT pk, col0 FROM view_2_tab3_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 40 ) AS tab3_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE col3 > 40
----
1
4
6
7

statement ok
DROP VIEW view_1_tab3_335

statement ok
DROP VIEW view_2_tab3_335

statement ok
DROP VIEW view_3_tab3_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_335') DROP VIEW view_1_tab4_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_335') DROP VIEW view_2_tab4_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_335') DROP VIEW view_3_tab4_335

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_335

statement ok
CREATE VIEW view_1_tab4_335 AS SELECT pk, col0 FROM tab4 WHERE col3 > 40

statement ok
CREATE VIEW view_2_tab4_335 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 40)

statement ok
CREATE VIEW view_3_tab4_335 AS SELECT pk FROM view_1_tab4_335

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE col3 > 40
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 40)
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_335
----
1
6
4
11
6
56
7
70

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_335
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 40 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_335 UNION ALL SELECT pk, col0 FROM view_2_tab4_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 40 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 40)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_335 UNION SELECT pk, col0 FROM view_2_tab4_335
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 40 ) AS tab4_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_335
----
1
4
6
7

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE col3 > 40
----
1
4
6
7

statement ok
DROP VIEW view_1_tab4_335

statement ok
DROP VIEW view_2_tab4_335

statement ok
DROP VIEW view_3_tab4_335

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_336') DROP VIEW view_1_tab0_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_336') DROP VIEW view_2_tab0_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_336') DROP VIEW view_3_tab0_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_336

statement ok
CREATE VIEW view_1_tab0_336 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 87

statement ok
CREATE VIEW view_2_tab0_336 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 87)

statement ok
CREATE VIEW view_3_tab0_336 AS SELECT pk FROM view_1_tab0_336

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 87
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_336
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 87 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_336 UNION ALL SELECT pk, col0 FROM view_2_tab0_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 87 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_336 UNION SELECT pk, col0 FROM view_2_tab0_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 87 ) AS tab0_336
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_336
----

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col0 >= 87
----

statement ok
DROP VIEW view_1_tab0_336

statement ok
DROP VIEW view_2_tab0_336

statement ok
DROP VIEW view_3_tab0_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_336') DROP VIEW view_1_tab1_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_336') DROP VIEW view_2_tab1_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_336') DROP VIEW view_3_tab1_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_336

statement ok
CREATE VIEW view_1_tab1_336 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 87

statement ok
CREATE VIEW view_2_tab1_336 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 87)

statement ok
CREATE VIEW view_3_tab1_336 AS SELECT pk FROM view_1_tab1_336

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 87
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_336
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 87 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_336 UNION ALL SELECT pk, col0 FROM view_2_tab1_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 87 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_336 UNION SELECT pk, col0 FROM view_2_tab1_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 87 ) AS tab1_336
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_336
----

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col0 >= 87
----

statement ok
DROP VIEW view_1_tab1_336

statement ok
DROP VIEW view_2_tab1_336

statement ok
DROP VIEW view_3_tab1_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_336') DROP VIEW view_1_tab2_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_336') DROP VIEW view_2_tab2_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_336') DROP VIEW view_3_tab2_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_336

statement ok
CREATE VIEW view_1_tab2_336 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 87

statement ok
CREATE VIEW view_2_tab2_336 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 87)

statement ok
CREATE VIEW view_3_tab2_336 AS SELECT pk FROM view_1_tab2_336

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 87
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_336
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 87 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_336 UNION ALL SELECT pk, col0 FROM view_2_tab2_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 87 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_336 UNION SELECT pk, col0 FROM view_2_tab2_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 87 ) AS tab2_336
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_336
----

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col0 >= 87
----

statement ok
DROP VIEW view_1_tab2_336

statement ok
DROP VIEW view_2_tab2_336

statement ok
DROP VIEW view_3_tab2_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_336') DROP VIEW view_1_tab3_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_336') DROP VIEW view_2_tab3_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_336') DROP VIEW view_3_tab3_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_336

statement ok
CREATE VIEW view_1_tab3_336 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 87

statement ok
CREATE VIEW view_2_tab3_336 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 87)

statement ok
CREATE VIEW view_3_tab3_336 AS SELECT pk FROM view_1_tab3_336

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 87
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_336
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 87 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_336 UNION ALL SELECT pk, col0 FROM view_2_tab3_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 87 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_336 UNION SELECT pk, col0 FROM view_2_tab3_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 87 ) AS tab3_336
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_336
----

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col0 >= 87
----

statement ok
DROP VIEW view_1_tab3_336

statement ok
DROP VIEW view_2_tab3_336

statement ok
DROP VIEW view_3_tab3_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_336') DROP VIEW view_1_tab4_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_336') DROP VIEW view_2_tab4_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_336') DROP VIEW view_3_tab4_336

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_336

statement ok
CREATE VIEW view_1_tab4_336 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 87

statement ok
CREATE VIEW view_2_tab4_336 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 87)

statement ok
CREATE VIEW view_3_tab4_336 AS SELECT pk FROM view_1_tab4_336

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 87
----

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_336
----

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 87 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_336 UNION ALL SELECT pk, col0 FROM view_2_tab4_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 87 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 87)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_336 UNION SELECT pk, col0 FROM view_2_tab4_336
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 87 ) AS tab4_336
----

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_336
----

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col0 >= 87
----

statement ok
DROP VIEW view_1_tab4_336

statement ok
DROP VIEW view_2_tab4_336

statement ok
DROP VIEW view_3_tab4_336

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_337') DROP VIEW view_1_tab0_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_337') DROP VIEW view_2_tab0_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_337') DROP VIEW view_3_tab0_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_337

statement ok
CREATE VIEW view_1_tab0_337 AS SELECT pk, col0 FROM tab0 WHERE col4 > 42.91

statement ok
CREATE VIEW view_2_tab0_337 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 42.91)

statement ok
CREATE VIEW view_3_tab0_337 AS SELECT pk FROM view_1_tab0_337

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE col4 > 42.91
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 42.91)
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_337
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_337
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 42.91 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_337 UNION ALL SELECT pk, col0 FROM view_2_tab0_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 42.91 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_337 UNION SELECT pk, col0 FROM view_2_tab0_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 42.91 ) AS tab0_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE col4 > 42.91
----
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_337

statement ok
DROP VIEW view_2_tab0_337

statement ok
DROP VIEW view_3_tab0_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_337') DROP VIEW view_1_tab1_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_337') DROP VIEW view_2_tab1_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_337') DROP VIEW view_3_tab1_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_337

statement ok
CREATE VIEW view_1_tab1_337 AS SELECT pk, col0 FROM tab1 WHERE col4 > 42.91

statement ok
CREATE VIEW view_2_tab1_337 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 42.91)

statement ok
CREATE VIEW view_3_tab1_337 AS SELECT pk FROM view_1_tab1_337

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE col4 > 42.91
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 42.91)
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_337
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_337
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 42.91 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_337 UNION ALL SELECT pk, col0 FROM view_2_tab1_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 42.91 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_337 UNION SELECT pk, col0 FROM view_2_tab1_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 42.91 ) AS tab1_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE col4 > 42.91
----
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_337

statement ok
DROP VIEW view_2_tab1_337

statement ok
DROP VIEW view_3_tab1_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_337') DROP VIEW view_1_tab2_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_337') DROP VIEW view_2_tab2_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_337') DROP VIEW view_3_tab2_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_337

statement ok
CREATE VIEW view_1_tab2_337 AS SELECT pk, col0 FROM tab2 WHERE col4 > 42.91

statement ok
CREATE VIEW view_2_tab2_337 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 42.91)

statement ok
CREATE VIEW view_3_tab2_337 AS SELECT pk FROM view_1_tab2_337

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE col4 > 42.91
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 42.91)
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_337
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_337
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 42.91 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_337 UNION ALL SELECT pk, col0 FROM view_2_tab2_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 42.91 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_337 UNION SELECT pk, col0 FROM view_2_tab2_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 42.91 ) AS tab2_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE col4 > 42.91
----
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_337

statement ok
DROP VIEW view_2_tab2_337

statement ok
DROP VIEW view_3_tab2_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_337') DROP VIEW view_1_tab3_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_337') DROP VIEW view_2_tab3_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_337') DROP VIEW view_3_tab3_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_337

statement ok
CREATE VIEW view_1_tab3_337 AS SELECT pk, col0 FROM tab3 WHERE col4 > 42.91

statement ok
CREATE VIEW view_2_tab3_337 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 42.91)

statement ok
CREATE VIEW view_3_tab3_337 AS SELECT pk FROM view_1_tab3_337

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE col4 > 42.91
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 42.91)
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_337
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_337
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 42.91 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_337 UNION ALL SELECT pk, col0 FROM view_2_tab3_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 42.91 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_337 UNION SELECT pk, col0 FROM view_2_tab3_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 42.91 ) AS tab3_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE col4 > 42.91
----
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_337

statement ok
DROP VIEW view_2_tab3_337

statement ok
DROP VIEW view_3_tab3_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_337') DROP VIEW view_1_tab4_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_337') DROP VIEW view_2_tab4_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_337') DROP VIEW view_3_tab4_337

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_337

statement ok
CREATE VIEW view_1_tab4_337 AS SELECT pk, col0 FROM tab4 WHERE col4 > 42.91

statement ok
CREATE VIEW view_2_tab4_337 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 42.91)

statement ok
CREATE VIEW view_3_tab4_337 AS SELECT pk FROM view_1_tab4_337

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE col4 > 42.91
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 42.91)
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_337
----
10 values hashing to 99d052e0247aee5155f9bcb6911798d9

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_337
----
10 values hashing to 49e80e32bff46be2d1e862733446aae0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 42.91 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_337 UNION ALL SELECT pk, col0 FROM view_2_tab4_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 42.91 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 42.91)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_337 UNION SELECT pk, col0 FROM view_2_tab4_337
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 42.91 ) AS tab4_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_337
----
5
6
7
8
9

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE col4 > 42.91
----
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_337

statement ok
DROP VIEW view_2_tab4_337

statement ok
DROP VIEW view_3_tab4_337

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_338') DROP VIEW view_1_tab0_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_338') DROP VIEW view_2_tab0_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_338') DROP VIEW view_3_tab0_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_338

statement ok
CREATE VIEW view_1_tab0_338 AS SELECT pk, col0 FROM tab0 WHERE (col3 > 69)

statement ok
CREATE VIEW view_2_tab0_338 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 69))

statement ok
CREATE VIEW view_3_tab0_338 AS SELECT pk FROM view_1_tab0_338

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE (col3 > 69)
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 69))
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_338
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_338
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 69) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_338 UNION ALL SELECT pk, col0 FROM view_2_tab0_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 > 69) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_338 UNION SELECT pk, col0 FROM view_2_tab0_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 > 69) ) AS tab0_338
----
1
4
7

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_338
----
1
4
7

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE (col3 > 69)
----
1
4
7

statement ok
DROP VIEW view_1_tab0_338

statement ok
DROP VIEW view_2_tab0_338

statement ok
DROP VIEW view_3_tab0_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_338') DROP VIEW view_1_tab1_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_338') DROP VIEW view_2_tab1_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_338') DROP VIEW view_3_tab1_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_338

statement ok
CREATE VIEW view_1_tab1_338 AS SELECT pk, col0 FROM tab1 WHERE (col3 > 69)

statement ok
CREATE VIEW view_2_tab1_338 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 69))

statement ok
CREATE VIEW view_3_tab1_338 AS SELECT pk FROM view_1_tab1_338

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE (col3 > 69)
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 69))
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_338
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_338
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 69) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_338 UNION ALL SELECT pk, col0 FROM view_2_tab1_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 > 69) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_338 UNION SELECT pk, col0 FROM view_2_tab1_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 > 69) ) AS tab1_338
----
1
4
7

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_338
----
1
4
7

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE (col3 > 69)
----
1
4
7

statement ok
DROP VIEW view_1_tab1_338

statement ok
DROP VIEW view_2_tab1_338

statement ok
DROP VIEW view_3_tab1_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_338') DROP VIEW view_1_tab2_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_338') DROP VIEW view_2_tab2_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_338') DROP VIEW view_3_tab2_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_338

statement ok
CREATE VIEW view_1_tab2_338 AS SELECT pk, col0 FROM tab2 WHERE (col3 > 69)

statement ok
CREATE VIEW view_2_tab2_338 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 69))

statement ok
CREATE VIEW view_3_tab2_338 AS SELECT pk FROM view_1_tab2_338

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE (col3 > 69)
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 69))
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_338
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_338
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 69) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_338 UNION ALL SELECT pk, col0 FROM view_2_tab2_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 > 69) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_338 UNION SELECT pk, col0 FROM view_2_tab2_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 > 69) ) AS tab2_338
----
1
4
7

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_338
----
1
4
7

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE (col3 > 69)
----
1
4
7

statement ok
DROP VIEW view_1_tab2_338

statement ok
DROP VIEW view_2_tab2_338

statement ok
DROP VIEW view_3_tab2_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_338') DROP VIEW view_1_tab3_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_338') DROP VIEW view_2_tab3_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_338') DROP VIEW view_3_tab3_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_338

statement ok
CREATE VIEW view_1_tab3_338 AS SELECT pk, col0 FROM tab3 WHERE (col3 > 69)

statement ok
CREATE VIEW view_2_tab3_338 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 69))

statement ok
CREATE VIEW view_3_tab3_338 AS SELECT pk FROM view_1_tab3_338

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE (col3 > 69)
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 69))
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_338
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_338
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 69) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_338 UNION ALL SELECT pk, col0 FROM view_2_tab3_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 > 69) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_338 UNION SELECT pk, col0 FROM view_2_tab3_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 > 69) ) AS tab3_338
----
1
4
7

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_338
----
1
4
7

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE (col3 > 69)
----
1
4
7

statement ok
DROP VIEW view_1_tab3_338

statement ok
DROP VIEW view_2_tab3_338

statement ok
DROP VIEW view_3_tab3_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_338') DROP VIEW view_1_tab4_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_338') DROP VIEW view_2_tab4_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_338') DROP VIEW view_3_tab4_338

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_338

statement ok
CREATE VIEW view_1_tab4_338 AS SELECT pk, col0 FROM tab4 WHERE (col3 > 69)

statement ok
CREATE VIEW view_2_tab4_338 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 69))

statement ok
CREATE VIEW view_3_tab4_338 AS SELECT pk FROM view_1_tab4_338

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE (col3 > 69)
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 69))
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_338
----
1
6
4
11
7
70

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_338
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 69) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_338 UNION ALL SELECT pk, col0 FROM view_2_tab4_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 > 69) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 > 69))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_338 UNION SELECT pk, col0 FROM view_2_tab4_338
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 > 69) ) AS tab4_338
----
1
4
7

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_338
----
1
4
7

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE (col3 > 69)
----
1
4
7

statement ok
DROP VIEW view_1_tab4_338

statement ok
DROP VIEW view_2_tab4_338

statement ok
DROP VIEW view_3_tab4_338

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_339') DROP VIEW view_1_tab0_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_339') DROP VIEW view_2_tab0_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_339') DROP VIEW view_3_tab0_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_339

statement ok
CREATE VIEW view_1_tab0_339 AS SELECT pk, col0 FROM tab0 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)

statement ok
CREATE VIEW view_2_tab0_339 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))

statement ok
CREATE VIEW view_3_tab0_339 AS SELECT pk FROM view_1_tab0_339

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_339
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_339 UNION ALL SELECT pk, col0 FROM view_2_tab0_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_339 UNION SELECT pk, col0 FROM view_2_tab0_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) ) AS tab0_339
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_339
----

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

statement ok
DROP VIEW view_1_tab0_339

statement ok
DROP VIEW view_2_tab0_339

statement ok
DROP VIEW view_3_tab0_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_339') DROP VIEW view_1_tab1_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_339') DROP VIEW view_2_tab1_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_339') DROP VIEW view_3_tab1_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_339

statement ok
CREATE VIEW view_1_tab1_339 AS SELECT pk, col0 FROM tab1 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)

statement ok
CREATE VIEW view_2_tab1_339 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))

statement ok
CREATE VIEW view_3_tab1_339 AS SELECT pk FROM view_1_tab1_339

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_339
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_339 UNION ALL SELECT pk, col0 FROM view_2_tab1_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_339 UNION SELECT pk, col0 FROM view_2_tab1_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) ) AS tab1_339
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_339
----

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

statement ok
DROP VIEW view_1_tab1_339

statement ok
DROP VIEW view_2_tab1_339

statement ok
DROP VIEW view_3_tab1_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_339') DROP VIEW view_1_tab2_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_339') DROP VIEW view_2_tab2_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_339') DROP VIEW view_3_tab2_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_339

statement ok
CREATE VIEW view_1_tab2_339 AS SELECT pk, col0 FROM tab2 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)

statement ok
CREATE VIEW view_2_tab2_339 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))

statement ok
CREATE VIEW view_3_tab2_339 AS SELECT pk FROM view_1_tab2_339

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_339
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_339 UNION ALL SELECT pk, col0 FROM view_2_tab2_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_339 UNION SELECT pk, col0 FROM view_2_tab2_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) ) AS tab2_339
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_339
----

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

statement ok
DROP VIEW view_1_tab2_339

statement ok
DROP VIEW view_2_tab2_339

statement ok
DROP VIEW view_3_tab2_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_339') DROP VIEW view_1_tab3_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_339') DROP VIEW view_2_tab3_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_339') DROP VIEW view_3_tab3_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_339

statement ok
CREATE VIEW view_1_tab3_339 AS SELECT pk, col0 FROM tab3 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)

statement ok
CREATE VIEW view_2_tab3_339 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))

statement ok
CREATE VIEW view_3_tab3_339 AS SELECT pk FROM view_1_tab3_339

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_339
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_339 UNION ALL SELECT pk, col0 FROM view_2_tab3_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_339 UNION SELECT pk, col0 FROM view_2_tab3_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) ) AS tab3_339
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_339
----

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

statement ok
DROP VIEW view_1_tab3_339

statement ok
DROP VIEW view_2_tab3_339

statement ok
DROP VIEW view_3_tab3_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_339') DROP VIEW view_1_tab4_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_339') DROP VIEW view_2_tab4_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_339') DROP VIEW view_3_tab4_339

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_339

statement ok
CREATE VIEW view_1_tab4_339 AS SELECT pk, col0 FROM tab4 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)

statement ok
CREATE VIEW view_2_tab4_339 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))

statement ok
CREATE VIEW view_3_tab4_339 AS SELECT pk FROM view_1_tab4_339

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_339
----

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_339 UNION ALL SELECT pk, col0 FROM view_2_tab4_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 67.67 AND col3 IN (52,47,10,34,16,83))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_339 UNION SELECT pk, col0 FROM view_2_tab4_339
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83) ) AS tab4_339
----

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_339
----

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE col4 > 67.67 AND col3 IN (52,47,10,34,16,83)
----

statement ok
DROP VIEW view_1_tab4_339

statement ok
DROP VIEW view_2_tab4_339

statement ok
DROP VIEW view_3_tab4_339

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_340') DROP VIEW view_1_tab0_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_340') DROP VIEW view_2_tab0_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_340') DROP VIEW view_3_tab0_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_340

statement ok
CREATE VIEW view_1_tab0_340 AS SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8

statement ok
CREATE VIEW view_2_tab0_340 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)

statement ok
CREATE VIEW view_3_tab0_340 AS SELECT pk FROM view_1_tab0_340

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
6
56
7
70
8
75

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_340
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_340
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_340 UNION ALL SELECT pk, col0 FROM view_2_tab0_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_340 UNION SELECT pk, col0 FROM view_2_tab0_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 ) AS tab0_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab0_340

statement ok
DROP VIEW view_2_tab0_340

statement ok
DROP VIEW view_3_tab0_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_340') DROP VIEW view_1_tab1_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_340') DROP VIEW view_2_tab1_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_340') DROP VIEW view_3_tab1_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_340

statement ok
CREATE VIEW view_1_tab1_340 AS SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8

statement ok
CREATE VIEW view_2_tab1_340 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)

statement ok
CREATE VIEW view_3_tab1_340 AS SELECT pk FROM view_1_tab1_340

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
6
56
7
70
8
75

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_340
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_340
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_340 UNION ALL SELECT pk, col0 FROM view_2_tab1_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_340 UNION SELECT pk, col0 FROM view_2_tab1_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 ) AS tab1_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab1_340

statement ok
DROP VIEW view_2_tab1_340

statement ok
DROP VIEW view_3_tab1_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_340') DROP VIEW view_1_tab2_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_340') DROP VIEW view_2_tab2_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_340') DROP VIEW view_3_tab2_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_340

statement ok
CREATE VIEW view_1_tab2_340 AS SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8

statement ok
CREATE VIEW view_2_tab2_340 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)

statement ok
CREATE VIEW view_3_tab2_340 AS SELECT pk FROM view_1_tab2_340

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
6
56
7
70
8
75

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_340
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_340
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_340 UNION ALL SELECT pk, col0 FROM view_2_tab2_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_340 UNION SELECT pk, col0 FROM view_2_tab2_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 ) AS tab2_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab2_340

statement ok
DROP VIEW view_2_tab2_340

statement ok
DROP VIEW view_3_tab2_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_340') DROP VIEW view_1_tab3_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_340') DROP VIEW view_2_tab3_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_340') DROP VIEW view_3_tab3_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_340

statement ok
CREATE VIEW view_1_tab3_340 AS SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8

statement ok
CREATE VIEW view_2_tab3_340 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)

statement ok
CREATE VIEW view_3_tab3_340 AS SELECT pk FROM view_1_tab3_340

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
6
56
7
70
8
75

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_340
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_340
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_340 UNION ALL SELECT pk, col0 FROM view_2_tab3_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_340 UNION SELECT pk, col0 FROM view_2_tab3_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 ) AS tab3_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab3_340

statement ok
DROP VIEW view_2_tab3_340

statement ok
DROP VIEW view_3_tab3_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_340') DROP VIEW view_1_tab4_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_340') DROP VIEW view_2_tab4_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_340') DROP VIEW view_3_tab4_340

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_340

statement ok
CREATE VIEW view_1_tab4_340 AS SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8

statement ok
CREATE VIEW view_2_tab4_340 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)

statement ok
CREATE VIEW view_3_tab4_340 AS SELECT pk FROM view_1_tab4_340

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
6
56
7
70
8
75

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_340
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_340
----
6
56
7
70
8
75

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_340 UNION ALL SELECT pk, col0 FROM view_2_tab4_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_340 UNION SELECT pk, col0 FROM view_2_tab4_340
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8 ) AS tab4_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_340
----
0
1
2
3
4
5
9

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE (col3 IS NULL) OR col0 IS NULL AND col1 > 45.14 OR col4 <= 70.8
----
0
1
2
3
4
5
9

statement ok
DROP VIEW view_1_tab4_340

statement ok
DROP VIEW view_2_tab4_340

statement ok
DROP VIEW view_3_tab4_340

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_341') DROP VIEW view_1_tab0_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_341') DROP VIEW view_2_tab0_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_341') DROP VIEW view_3_tab0_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_341

statement ok
CREATE VIEW view_1_tab0_341 AS SELECT pk, col0 FROM tab0 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68

statement ok
CREATE VIEW view_2_tab0_341 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)

statement ok
CREATE VIEW view_3_tab0_341 AS SELECT pk FROM view_1_tab0_341

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_341
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_341
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_341 UNION ALL SELECT pk, col0 FROM view_2_tab0_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_341 UNION SELECT pk, col0 FROM view_2_tab0_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 ) AS tab0_341
----
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_341
----
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
7
8

statement ok
DROP VIEW view_1_tab0_341

statement ok
DROP VIEW view_2_tab0_341

statement ok
DROP VIEW view_3_tab0_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_341') DROP VIEW view_1_tab1_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_341') DROP VIEW view_2_tab1_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_341') DROP VIEW view_3_tab1_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_341

statement ok
CREATE VIEW view_1_tab1_341 AS SELECT pk, col0 FROM tab1 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68

statement ok
CREATE VIEW view_2_tab1_341 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)

statement ok
CREATE VIEW view_3_tab1_341 AS SELECT pk FROM view_1_tab1_341

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_341
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_341
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_341 UNION ALL SELECT pk, col0 FROM view_2_tab1_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_341 UNION SELECT pk, col0 FROM view_2_tab1_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 ) AS tab1_341
----
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_341
----
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
7
8

statement ok
DROP VIEW view_1_tab1_341

statement ok
DROP VIEW view_2_tab1_341

statement ok
DROP VIEW view_3_tab1_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_341') DROP VIEW view_1_tab2_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_341') DROP VIEW view_2_tab2_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_341') DROP VIEW view_3_tab2_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_341

statement ok
CREATE VIEW view_1_tab2_341 AS SELECT pk, col0 FROM tab2 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68

statement ok
CREATE VIEW view_2_tab2_341 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)

statement ok
CREATE VIEW view_3_tab2_341 AS SELECT pk FROM view_1_tab2_341

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_341
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_341
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_341 UNION ALL SELECT pk, col0 FROM view_2_tab2_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_341 UNION SELECT pk, col0 FROM view_2_tab2_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 ) AS tab2_341
----
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_341
----
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
7
8

statement ok
DROP VIEW view_1_tab2_341

statement ok
DROP VIEW view_2_tab2_341

statement ok
DROP VIEW view_3_tab2_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_341') DROP VIEW view_1_tab3_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_341') DROP VIEW view_2_tab3_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_341') DROP VIEW view_3_tab3_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_341

statement ok
CREATE VIEW view_1_tab3_341 AS SELECT pk, col0 FROM tab3 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68

statement ok
CREATE VIEW view_2_tab3_341 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)

statement ok
CREATE VIEW view_3_tab3_341 AS SELECT pk FROM view_1_tab3_341

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_341
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_341
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_341 UNION ALL SELECT pk, col0 FROM view_2_tab3_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_341 UNION SELECT pk, col0 FROM view_2_tab3_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 ) AS tab3_341
----
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_341
----
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
7
8

statement ok
DROP VIEW view_1_tab3_341

statement ok
DROP VIEW view_2_tab3_341

statement ok
DROP VIEW view_3_tab3_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_341') DROP VIEW view_1_tab4_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_341') DROP VIEW view_2_tab4_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_341') DROP VIEW view_3_tab4_341

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_341

statement ok
CREATE VIEW view_1_tab4_341 AS SELECT pk, col0 FROM tab4 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68

statement ok
CREATE VIEW view_2_tab4_341 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)

statement ok
CREATE VIEW view_3_tab4_341 AS SELECT pk FROM view_1_tab4_341

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_341
----
6
56
7
70
8
75

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_341
----
14 values hashing to d4c837def36a175001026f55e6d5ddc1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_341 UNION ALL SELECT pk, col0 FROM view_2_tab4_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_341 UNION SELECT pk, col0 FROM view_2_tab4_341
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68 ) AS tab4_341
----
6
7
8

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_341
----
6
7
8

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE (col0 IN (99,27,88,27,16,64)) AND col4 > 10.42 OR col4 > 72.68
----
6
7
8

statement ok
DROP VIEW view_1_tab4_341

statement ok
DROP VIEW view_2_tab4_341

statement ok
DROP VIEW view_3_tab4_341

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_342') DROP VIEW view_1_tab0_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_342') DROP VIEW view_2_tab0_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_342') DROP VIEW view_3_tab0_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_342

statement ok
CREATE VIEW view_1_tab0_342 AS SELECT pk, col0 FROM tab0 WHERE ((col1 = 56.5)) OR col0 >= 5

statement ok
CREATE VIEW view_2_tab0_342 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)

statement ok
CREATE VIEW view_3_tab0_342 AS SELECT pk FROM view_1_tab0_342

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE ((col1 = 56.5)) OR col0 >= 5
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
2
3

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_342
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_342
----
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_342 UNION ALL SELECT pk, col0 FROM view_2_tab0_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_342 UNION SELECT pk, col0 FROM view_2_tab0_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 = 56.5)) OR col0 >= 5 ) AS tab0_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE ((col1 = 56.5)) OR col0 >= 5
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab0_342

statement ok
DROP VIEW view_2_tab0_342

statement ok
DROP VIEW view_3_tab0_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_342') DROP VIEW view_1_tab1_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_342') DROP VIEW view_2_tab1_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_342') DROP VIEW view_3_tab1_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_342

statement ok
CREATE VIEW view_1_tab1_342 AS SELECT pk, col0 FROM tab1 WHERE ((col1 = 56.5)) OR col0 >= 5

statement ok
CREATE VIEW view_2_tab1_342 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)

statement ok
CREATE VIEW view_3_tab1_342 AS SELECT pk FROM view_1_tab1_342

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE ((col1 = 56.5)) OR col0 >= 5
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
2
3

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_342
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_342
----
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_342 UNION ALL SELECT pk, col0 FROM view_2_tab1_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_342 UNION SELECT pk, col0 FROM view_2_tab1_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 = 56.5)) OR col0 >= 5 ) AS tab1_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE ((col1 = 56.5)) OR col0 >= 5
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab1_342

statement ok
DROP VIEW view_2_tab1_342

statement ok
DROP VIEW view_3_tab1_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_342') DROP VIEW view_1_tab2_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_342') DROP VIEW view_2_tab2_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_342') DROP VIEW view_3_tab2_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_342

statement ok
CREATE VIEW view_1_tab2_342 AS SELECT pk, col0 FROM tab2 WHERE ((col1 = 56.5)) OR col0 >= 5

statement ok
CREATE VIEW view_2_tab2_342 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)

statement ok
CREATE VIEW view_3_tab2_342 AS SELECT pk FROM view_1_tab2_342

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE ((col1 = 56.5)) OR col0 >= 5
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
2
3

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_342
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_342
----
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_342 UNION ALL SELECT pk, col0 FROM view_2_tab2_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_342 UNION SELECT pk, col0 FROM view_2_tab2_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 = 56.5)) OR col0 >= 5 ) AS tab2_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE ((col1 = 56.5)) OR col0 >= 5
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab2_342

statement ok
DROP VIEW view_2_tab2_342

statement ok
DROP VIEW view_3_tab2_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_342') DROP VIEW view_1_tab3_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_342') DROP VIEW view_2_tab3_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_342') DROP VIEW view_3_tab3_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_342

statement ok
CREATE VIEW view_1_tab3_342 AS SELECT pk, col0 FROM tab3 WHERE ((col1 = 56.5)) OR col0 >= 5

statement ok
CREATE VIEW view_2_tab3_342 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)

statement ok
CREATE VIEW view_3_tab3_342 AS SELECT pk FROM view_1_tab3_342

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE ((col1 = 56.5)) OR col0 >= 5
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
2
3

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_342
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_342
----
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_342 UNION ALL SELECT pk, col0 FROM view_2_tab3_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_342 UNION SELECT pk, col0 FROM view_2_tab3_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 = 56.5)) OR col0 >= 5 ) AS tab3_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE ((col1 = 56.5)) OR col0 >= 5
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab3_342

statement ok
DROP VIEW view_2_tab3_342

statement ok
DROP VIEW view_3_tab3_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_342') DROP VIEW view_1_tab4_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_342') DROP VIEW view_2_tab4_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_342') DROP VIEW view_3_tab4_342

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_342

statement ok
CREATE VIEW view_1_tab4_342 AS SELECT pk, col0 FROM tab4 WHERE ((col1 = 56.5)) OR col0 >= 5

statement ok
CREATE VIEW view_2_tab4_342 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)

statement ok
CREATE VIEW view_3_tab4_342 AS SELECT pk FROM view_1_tab4_342

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE ((col1 = 56.5)) OR col0 >= 5
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
2
3

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_342
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_342
----
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_342 UNION ALL SELECT pk, col0 FROM view_2_tab4_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 = 56.5)) OR col0 >= 5 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 56.5)) OR col0 >= 5)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_342 UNION SELECT pk, col0 FROM view_2_tab4_342
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 = 56.5)) OR col0 >= 5 ) AS tab4_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_342
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE ((col1 = 56.5)) OR col0 >= 5
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab4_342

statement ok
DROP VIEW view_2_tab4_342

statement ok
DROP VIEW view_3_tab4_342

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_343') DROP VIEW view_1_tab0_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_343') DROP VIEW view_2_tab0_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_343') DROP VIEW view_3_tab0_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_343

statement ok
CREATE VIEW view_1_tab0_343 AS SELECT pk, col0 FROM tab0 WHERE col0 < 38

statement ok
CREATE VIEW view_2_tab0_343 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 38)

statement ok
CREATE VIEW view_3_tab0_343 AS SELECT pk FROM view_1_tab0_343

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE col0 < 38
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 38)
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_343
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_343
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 38 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_343 UNION ALL SELECT pk, col0 FROM view_2_tab0_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 38 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_343 UNION SELECT pk, col0 FROM view_2_tab0_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 38 ) AS tab0_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE col0 < 38
----
0
1
2
4
9

statement ok
DROP VIEW view_1_tab0_343

statement ok
DROP VIEW view_2_tab0_343

statement ok
DROP VIEW view_3_tab0_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_343') DROP VIEW view_1_tab1_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_343') DROP VIEW view_2_tab1_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_343') DROP VIEW view_3_tab1_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_343

statement ok
CREATE VIEW view_1_tab1_343 AS SELECT pk, col0 FROM tab1 WHERE col0 < 38

statement ok
CREATE VIEW view_2_tab1_343 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 38)

statement ok
CREATE VIEW view_3_tab1_343 AS SELECT pk FROM view_1_tab1_343

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE col0 < 38
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 38)
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_343
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_343
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 38 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_343 UNION ALL SELECT pk, col0 FROM view_2_tab1_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 38 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_343 UNION SELECT pk, col0 FROM view_2_tab1_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 38 ) AS tab1_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE col0 < 38
----
0
1
2
4
9

statement ok
DROP VIEW view_1_tab1_343

statement ok
DROP VIEW view_2_tab1_343

statement ok
DROP VIEW view_3_tab1_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_343') DROP VIEW view_1_tab2_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_343') DROP VIEW view_2_tab2_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_343') DROP VIEW view_3_tab2_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_343

statement ok
CREATE VIEW view_1_tab2_343 AS SELECT pk, col0 FROM tab2 WHERE col0 < 38

statement ok
CREATE VIEW view_2_tab2_343 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 38)

statement ok
CREATE VIEW view_3_tab2_343 AS SELECT pk FROM view_1_tab2_343

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE col0 < 38
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 38)
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_343
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_343
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 38 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_343 UNION ALL SELECT pk, col0 FROM view_2_tab2_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 38 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_343 UNION SELECT pk, col0 FROM view_2_tab2_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 38 ) AS tab2_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE col0 < 38
----
0
1
2
4
9

statement ok
DROP VIEW view_1_tab2_343

statement ok
DROP VIEW view_2_tab2_343

statement ok
DROP VIEW view_3_tab2_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_343') DROP VIEW view_1_tab3_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_343') DROP VIEW view_2_tab3_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_343') DROP VIEW view_3_tab3_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_343

statement ok
CREATE VIEW view_1_tab3_343 AS SELECT pk, col0 FROM tab3 WHERE col0 < 38

statement ok
CREATE VIEW view_2_tab3_343 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 38)

statement ok
CREATE VIEW view_3_tab3_343 AS SELECT pk FROM view_1_tab3_343

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE col0 < 38
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 38)
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_343
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_343
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 38 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_343 UNION ALL SELECT pk, col0 FROM view_2_tab3_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 38 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_343 UNION SELECT pk, col0 FROM view_2_tab3_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 38 ) AS tab3_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE col0 < 38
----
0
1
2
4
9

statement ok
DROP VIEW view_1_tab3_343

statement ok
DROP VIEW view_2_tab3_343

statement ok
DROP VIEW view_3_tab3_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_343') DROP VIEW view_1_tab4_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_343') DROP VIEW view_2_tab4_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_343') DROP VIEW view_3_tab4_343

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_343

statement ok
CREATE VIEW view_1_tab4_343 AS SELECT pk, col0 FROM tab4 WHERE col0 < 38

statement ok
CREATE VIEW view_2_tab4_343 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 38)

statement ok
CREATE VIEW view_3_tab4_343 AS SELECT pk FROM view_1_tab4_343

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE col0 < 38
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 38)
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_343
----
10 values hashing to 2b3503e9fc8aa061dffed04974a10146

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_343
----
10 values hashing to 8111a7b03517c1ec2cdc290ec8085b7e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 38 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_343 UNION ALL SELECT pk, col0 FROM view_2_tab4_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 38 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 38)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_343 UNION SELECT pk, col0 FROM view_2_tab4_343
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 38 ) AS tab4_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_343
----
0
1
2
4
9

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE col0 < 38
----
0
1
2
4
9

statement ok
DROP VIEW view_1_tab4_343

statement ok
DROP VIEW view_2_tab4_343

statement ok
DROP VIEW view_3_tab4_343

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_344') DROP VIEW view_1_tab0_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_344') DROP VIEW view_2_tab0_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_344') DROP VIEW view_3_tab0_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_344

statement ok
CREATE VIEW view_1_tab0_344 AS SELECT pk, col0 FROM tab0 WHERE (col4 = 78.55 AND (col0 > 61))

statement ok
CREATE VIEW view_2_tab0_344 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))

statement ok
CREATE VIEW view_3_tab0_344 AS SELECT pk FROM view_1_tab0_344

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE (col4 = 78.55 AND (col0 > 61))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_344
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 78.55 AND (col0 > 61)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_344 UNION ALL SELECT pk, col0 FROM view_2_tab0_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 78.55 AND (col0 > 61)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_344 UNION SELECT pk, col0 FROM view_2_tab0_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 = 78.55 AND (col0 > 61)) ) AS tab0_344
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_344
----

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE (col4 = 78.55 AND (col0 > 61))
----

statement ok
DROP VIEW view_1_tab0_344

statement ok
DROP VIEW view_2_tab0_344

statement ok
DROP VIEW view_3_tab0_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_344') DROP VIEW view_1_tab1_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_344') DROP VIEW view_2_tab1_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_344') DROP VIEW view_3_tab1_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_344

statement ok
CREATE VIEW view_1_tab1_344 AS SELECT pk, col0 FROM tab1 WHERE (col4 = 78.55 AND (col0 > 61))

statement ok
CREATE VIEW view_2_tab1_344 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))

statement ok
CREATE VIEW view_3_tab1_344 AS SELECT pk FROM view_1_tab1_344

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE (col4 = 78.55 AND (col0 > 61))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_344
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 78.55 AND (col0 > 61)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_344 UNION ALL SELECT pk, col0 FROM view_2_tab1_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 78.55 AND (col0 > 61)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_344 UNION SELECT pk, col0 FROM view_2_tab1_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 = 78.55 AND (col0 > 61)) ) AS tab1_344
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_344
----

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE (col4 = 78.55 AND (col0 > 61))
----

statement ok
DROP VIEW view_1_tab1_344

statement ok
DROP VIEW view_2_tab1_344

statement ok
DROP VIEW view_3_tab1_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_344') DROP VIEW view_1_tab2_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_344') DROP VIEW view_2_tab2_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_344') DROP VIEW view_3_tab2_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_344

statement ok
CREATE VIEW view_1_tab2_344 AS SELECT pk, col0 FROM tab2 WHERE (col4 = 78.55 AND (col0 > 61))

statement ok
CREATE VIEW view_2_tab2_344 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))

statement ok
CREATE VIEW view_3_tab2_344 AS SELECT pk FROM view_1_tab2_344

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE (col4 = 78.55 AND (col0 > 61))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_344
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 78.55 AND (col0 > 61)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_344 UNION ALL SELECT pk, col0 FROM view_2_tab2_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 78.55 AND (col0 > 61)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_344 UNION SELECT pk, col0 FROM view_2_tab2_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 = 78.55 AND (col0 > 61)) ) AS tab2_344
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_344
----

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE (col4 = 78.55 AND (col0 > 61))
----

statement ok
DROP VIEW view_1_tab2_344

statement ok
DROP VIEW view_2_tab2_344

statement ok
DROP VIEW view_3_tab2_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_344') DROP VIEW view_1_tab3_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_344') DROP VIEW view_2_tab3_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_344') DROP VIEW view_3_tab3_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_344

statement ok
CREATE VIEW view_1_tab3_344 AS SELECT pk, col0 FROM tab3 WHERE (col4 = 78.55 AND (col0 > 61))

statement ok
CREATE VIEW view_2_tab3_344 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))

statement ok
CREATE VIEW view_3_tab3_344 AS SELECT pk FROM view_1_tab3_344

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE (col4 = 78.55 AND (col0 > 61))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_344
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 78.55 AND (col0 > 61)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_344 UNION ALL SELECT pk, col0 FROM view_2_tab3_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 78.55 AND (col0 > 61)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_344 UNION SELECT pk, col0 FROM view_2_tab3_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 = 78.55 AND (col0 > 61)) ) AS tab3_344
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_344
----

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE (col4 = 78.55 AND (col0 > 61))
----

statement ok
DROP VIEW view_1_tab3_344

statement ok
DROP VIEW view_2_tab3_344

statement ok
DROP VIEW view_3_tab3_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_344') DROP VIEW view_1_tab4_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_344') DROP VIEW view_2_tab4_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_344') DROP VIEW view_3_tab4_344

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_344

statement ok
CREATE VIEW view_1_tab4_344 AS SELECT pk, col0 FROM tab4 WHERE (col4 = 78.55 AND (col0 > 61))

statement ok
CREATE VIEW view_2_tab4_344 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))

statement ok
CREATE VIEW view_3_tab4_344 AS SELECT pk FROM view_1_tab4_344

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE (col4 = 78.55 AND (col0 > 61))
----

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_344
----

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 78.55 AND (col0 > 61)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_344 UNION ALL SELECT pk, col0 FROM view_2_tab4_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 78.55 AND (col0 > 61)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 78.55 AND (col0 > 61)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_344 UNION SELECT pk, col0 FROM view_2_tab4_344
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 = 78.55 AND (col0 > 61)) ) AS tab4_344
----

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_344
----

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE (col4 = 78.55 AND (col0 > 61))
----

statement ok
DROP VIEW view_1_tab4_344

statement ok
DROP VIEW view_2_tab4_344

statement ok
DROP VIEW view_3_tab4_344

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_345') DROP VIEW view_1_tab0_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_345') DROP VIEW view_2_tab0_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_345') DROP VIEW view_3_tab0_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_345

statement ok
CREATE VIEW view_1_tab0_345 AS SELECT pk, col0 FROM tab0 WHERE col1 > 22.55

statement ok
CREATE VIEW view_2_tab0_345 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 22.55)

statement ok
CREATE VIEW view_3_tab0_345 AS SELECT pk FROM view_1_tab0_345

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE col1 > 22.55
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 22.55)
----
0
8

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_345
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_345
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 22.55 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_345 UNION ALL SELECT pk, col0 FROM view_2_tab0_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 22.55 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_345 UNION SELECT pk, col0 FROM view_2_tab0_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 22.55 ) AS tab0_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE col1 > 22.55
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab0_345

statement ok
DROP VIEW view_2_tab0_345

statement ok
DROP VIEW view_3_tab0_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_345') DROP VIEW view_1_tab1_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_345') DROP VIEW view_2_tab1_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_345') DROP VIEW view_3_tab1_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_345

statement ok
CREATE VIEW view_1_tab1_345 AS SELECT pk, col0 FROM tab1 WHERE col1 > 22.55

statement ok
CREATE VIEW view_2_tab1_345 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 22.55)

statement ok
CREATE VIEW view_3_tab1_345 AS SELECT pk FROM view_1_tab1_345

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE col1 > 22.55
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 22.55)
----
0
8

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_345
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_345
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 22.55 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_345 UNION ALL SELECT pk, col0 FROM view_2_tab1_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 22.55 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_345 UNION SELECT pk, col0 FROM view_2_tab1_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 22.55 ) AS tab1_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE col1 > 22.55
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab1_345

statement ok
DROP VIEW view_2_tab1_345

statement ok
DROP VIEW view_3_tab1_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_345') DROP VIEW view_1_tab2_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_345') DROP VIEW view_2_tab2_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_345') DROP VIEW view_3_tab2_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_345

statement ok
CREATE VIEW view_1_tab2_345 AS SELECT pk, col0 FROM tab2 WHERE col1 > 22.55

statement ok
CREATE VIEW view_2_tab2_345 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 22.55)

statement ok
CREATE VIEW view_3_tab2_345 AS SELECT pk FROM view_1_tab2_345

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE col1 > 22.55
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 22.55)
----
0
8

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_345
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_345
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 22.55 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_345 UNION ALL SELECT pk, col0 FROM view_2_tab2_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 22.55 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_345 UNION SELECT pk, col0 FROM view_2_tab2_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 22.55 ) AS tab2_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE col1 > 22.55
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab2_345

statement ok
DROP VIEW view_2_tab2_345

statement ok
DROP VIEW view_3_tab2_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_345') DROP VIEW view_1_tab3_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_345') DROP VIEW view_2_tab3_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_345') DROP VIEW view_3_tab3_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_345

statement ok
CREATE VIEW view_1_tab3_345 AS SELECT pk, col0 FROM tab3 WHERE col1 > 22.55

statement ok
CREATE VIEW view_2_tab3_345 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 22.55)

statement ok
CREATE VIEW view_3_tab3_345 AS SELECT pk FROM view_1_tab3_345

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE col1 > 22.55
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 22.55)
----
0
8

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_345
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_345
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 22.55 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_345 UNION ALL SELECT pk, col0 FROM view_2_tab3_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 22.55 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_345 UNION SELECT pk, col0 FROM view_2_tab3_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 22.55 ) AS tab3_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE col1 > 22.55
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab3_345

statement ok
DROP VIEW view_2_tab3_345

statement ok
DROP VIEW view_3_tab3_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_345') DROP VIEW view_1_tab4_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_345') DROP VIEW view_2_tab4_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_345') DROP VIEW view_3_tab4_345

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_345

statement ok
CREATE VIEW view_1_tab4_345 AS SELECT pk, col0 FROM tab4 WHERE col1 > 22.55

statement ok
CREATE VIEW view_2_tab4_345 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 22.55)

statement ok
CREATE VIEW view_3_tab4_345 AS SELECT pk FROM view_1_tab4_345

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE col1 > 22.55
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 22.55)
----
0
8

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_345
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_345
----
0
8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 22.55 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_345 UNION ALL SELECT pk, col0 FROM view_2_tab4_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 22.55 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 22.55)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_345 UNION SELECT pk, col0 FROM view_2_tab4_345
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 22.55 ) AS tab4_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_345
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE col1 > 22.55
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab4_345

statement ok
DROP VIEW view_2_tab4_345

statement ok
DROP VIEW view_3_tab4_345

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_346') DROP VIEW view_1_tab0_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_346') DROP VIEW view_2_tab0_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_346') DROP VIEW view_3_tab0_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_346

statement ok
CREATE VIEW view_1_tab0_346 AS SELECT pk, col0 FROM tab0 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))

statement ok
CREATE VIEW view_2_tab0_346 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))

statement ok
CREATE VIEW view_3_tab0_346 AS SELECT pk FROM view_1_tab0_346

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_346
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_346 UNION ALL SELECT pk, col0 FROM view_2_tab0_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_346 UNION SELECT pk, col0 FROM view_2_tab0_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) ) AS tab0_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_346

statement ok
DROP VIEW view_2_tab0_346

statement ok
DROP VIEW view_3_tab0_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_346') DROP VIEW view_1_tab1_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_346') DROP VIEW view_2_tab1_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_346') DROP VIEW view_3_tab1_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_346

statement ok
CREATE VIEW view_1_tab1_346 AS SELECT pk, col0 FROM tab1 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))

statement ok
CREATE VIEW view_2_tab1_346 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))

statement ok
CREATE VIEW view_3_tab1_346 AS SELECT pk FROM view_1_tab1_346

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_346
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_346 UNION ALL SELECT pk, col0 FROM view_2_tab1_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_346 UNION SELECT pk, col0 FROM view_2_tab1_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) ) AS tab1_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_346

statement ok
DROP VIEW view_2_tab1_346

statement ok
DROP VIEW view_3_tab1_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_346') DROP VIEW view_1_tab2_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_346') DROP VIEW view_2_tab2_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_346') DROP VIEW view_3_tab2_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_346

statement ok
CREATE VIEW view_1_tab2_346 AS SELECT pk, col0 FROM tab2 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))

statement ok
CREATE VIEW view_2_tab2_346 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))

statement ok
CREATE VIEW view_3_tab2_346 AS SELECT pk FROM view_1_tab2_346

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_346
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_346 UNION ALL SELECT pk, col0 FROM view_2_tab2_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_346 UNION SELECT pk, col0 FROM view_2_tab2_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) ) AS tab2_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_346

statement ok
DROP VIEW view_2_tab2_346

statement ok
DROP VIEW view_3_tab2_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_346') DROP VIEW view_1_tab3_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_346') DROP VIEW view_2_tab3_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_346') DROP VIEW view_3_tab3_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_346

statement ok
CREATE VIEW view_1_tab3_346 AS SELECT pk, col0 FROM tab3 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))

statement ok
CREATE VIEW view_2_tab3_346 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))

statement ok
CREATE VIEW view_3_tab3_346 AS SELECT pk FROM view_1_tab3_346

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_346
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_346 UNION ALL SELECT pk, col0 FROM view_2_tab3_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_346 UNION SELECT pk, col0 FROM view_2_tab3_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) ) AS tab3_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_346

statement ok
DROP VIEW view_2_tab3_346

statement ok
DROP VIEW view_3_tab3_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_346') DROP VIEW view_1_tab4_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_346') DROP VIEW view_2_tab4_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_346') DROP VIEW view_3_tab4_346

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_346

statement ok
CREATE VIEW view_1_tab4_346 AS SELECT pk, col0 FROM tab4 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))

statement ok
CREATE VIEW view_2_tab4_346 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))

statement ok
CREATE VIEW view_3_tab4_346 AS SELECT pk FROM view_1_tab4_346

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_346
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_346 UNION ALL SELECT pk, col0 FROM view_2_tab4_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_346 UNION SELECT pk, col0 FROM view_2_tab4_346
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55)) ) AS tab4_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_346
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col1 IS NULL OR col4 < 0.19 OR col0 IS NULL OR (col0 > 0 OR (col3 > 5 AND col3 >= 45 AND (col3 = 12) OR (col1 < 24.59 OR ((col3 < 58))) OR (col0 <= 61 AND col0 > 90 OR col0 >= 10 AND col3 IS NULL) AND ((col3 < 65) OR col0 = 77 AND (col1 > 79.51 AND col0 IS NULL OR (col3 < 68) AND col1 IN (53.72,23.28,18.20,47.87) AND col1 >= 40.51 OR col4 >= 63.27 AND (col3 >= 54) OR (col0 > 4) AND col3 BETWEEN 74 AND 96 OR col0 > 85 AND col0 = 96 OR (col0 >= 18 AND col3 > 19 OR col0 <= 30 OR col0 >= 88) OR col0 < 12 AND col0 = 26 OR (((col3 > 29))) AND col0 BETWEEN 46 AND 85 AND col3 > 92 AND col1 < 72.30 AND col1 > 19.47))) AND ((col0 > 6)) OR (col4 > 75.55))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_346

statement ok
DROP VIEW view_2_tab4_346

statement ok
DROP VIEW view_3_tab4_346

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_347') DROP VIEW view_1_tab0_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_347') DROP VIEW view_2_tab0_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_347') DROP VIEW view_3_tab0_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_347

statement ok
CREATE VIEW view_1_tab0_347 AS SELECT pk, col0 FROM tab0 WHERE col0 < 4 AND col3 > 37 AND col3 < 53

statement ok
CREATE VIEW view_2_tab0_347 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)

statement ok
CREATE VIEW view_3_tab0_347 AS SELECT pk FROM view_1_tab0_347

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_347
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_347 UNION ALL SELECT pk, col0 FROM view_2_tab0_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_347 UNION SELECT pk, col0 FROM view_2_tab0_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 ) AS tab0_347
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_347
----

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

statement ok
DROP VIEW view_1_tab0_347

statement ok
DROP VIEW view_2_tab0_347

statement ok
DROP VIEW view_3_tab0_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_347') DROP VIEW view_1_tab1_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_347') DROP VIEW view_2_tab1_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_347') DROP VIEW view_3_tab1_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_347

statement ok
CREATE VIEW view_1_tab1_347 AS SELECT pk, col0 FROM tab1 WHERE col0 < 4 AND col3 > 37 AND col3 < 53

statement ok
CREATE VIEW view_2_tab1_347 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)

statement ok
CREATE VIEW view_3_tab1_347 AS SELECT pk FROM view_1_tab1_347

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_347
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_347 UNION ALL SELECT pk, col0 FROM view_2_tab1_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_347 UNION SELECT pk, col0 FROM view_2_tab1_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 ) AS tab1_347
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_347
----

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

statement ok
DROP VIEW view_1_tab1_347

statement ok
DROP VIEW view_2_tab1_347

statement ok
DROP VIEW view_3_tab1_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_347') DROP VIEW view_1_tab2_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_347') DROP VIEW view_2_tab2_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_347') DROP VIEW view_3_tab2_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_347

statement ok
CREATE VIEW view_1_tab2_347 AS SELECT pk, col0 FROM tab2 WHERE col0 < 4 AND col3 > 37 AND col3 < 53

statement ok
CREATE VIEW view_2_tab2_347 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)

statement ok
CREATE VIEW view_3_tab2_347 AS SELECT pk FROM view_1_tab2_347

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_347
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_347 UNION ALL SELECT pk, col0 FROM view_2_tab2_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_347 UNION SELECT pk, col0 FROM view_2_tab2_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 ) AS tab2_347
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_347
----

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

statement ok
DROP VIEW view_1_tab2_347

statement ok
DROP VIEW view_2_tab2_347

statement ok
DROP VIEW view_3_tab2_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_347') DROP VIEW view_1_tab3_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_347') DROP VIEW view_2_tab3_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_347') DROP VIEW view_3_tab3_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_347

statement ok
CREATE VIEW view_1_tab3_347 AS SELECT pk, col0 FROM tab3 WHERE col0 < 4 AND col3 > 37 AND col3 < 53

statement ok
CREATE VIEW view_2_tab3_347 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)

statement ok
CREATE VIEW view_3_tab3_347 AS SELECT pk FROM view_1_tab3_347

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_347
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_347 UNION ALL SELECT pk, col0 FROM view_2_tab3_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_347 UNION SELECT pk, col0 FROM view_2_tab3_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 ) AS tab3_347
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_347
----

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

statement ok
DROP VIEW view_1_tab3_347

statement ok
DROP VIEW view_2_tab3_347

statement ok
DROP VIEW view_3_tab3_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_347') DROP VIEW view_1_tab4_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_347') DROP VIEW view_2_tab4_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_347') DROP VIEW view_3_tab4_347

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_347

statement ok
CREATE VIEW view_1_tab4_347 AS SELECT pk, col0 FROM tab4 WHERE col0 < 4 AND col3 > 37 AND col3 < 53

statement ok
CREATE VIEW view_2_tab4_347 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)

statement ok
CREATE VIEW view_3_tab4_347 AS SELECT pk FROM view_1_tab4_347

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_347
----

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_347 UNION ALL SELECT pk, col0 FROM view_2_tab4_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 4 AND col3 > 37 AND col3 < 53)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_347 UNION SELECT pk, col0 FROM view_2_tab4_347
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 4 AND col3 > 37 AND col3 < 53 ) AS tab4_347
----

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_347
----

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col0 < 4 AND col3 > 37 AND col3 < 53
----

statement ok
DROP VIEW view_1_tab4_347

statement ok
DROP VIEW view_2_tab4_347

statement ok
DROP VIEW view_3_tab4_347

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_348') DROP VIEW view_1_tab0_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_348') DROP VIEW view_2_tab0_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_348') DROP VIEW view_3_tab0_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_348

statement ok
CREATE VIEW view_1_tab0_348 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 8

statement ok
CREATE VIEW view_2_tab0_348 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 8)

statement ok
CREATE VIEW view_3_tab0_348 AS SELECT pk FROM view_1_tab0_348

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 8
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 8)
----
1
6
2
3

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_348
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_348
----
1
6
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 8 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_348 UNION ALL SELECT pk, col0 FROM view_2_tab0_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 8 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_348 UNION SELECT pk, col0 FROM view_2_tab0_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 8 ) AS tab0_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE col0 >= 8
----
0
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab0_348

statement ok
DROP VIEW view_2_tab0_348

statement ok
DROP VIEW view_3_tab0_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_348') DROP VIEW view_1_tab1_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_348') DROP VIEW view_2_tab1_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_348') DROP VIEW view_3_tab1_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_348

statement ok
CREATE VIEW view_1_tab1_348 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 8

statement ok
CREATE VIEW view_2_tab1_348 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 8)

statement ok
CREATE VIEW view_3_tab1_348 AS SELECT pk FROM view_1_tab1_348

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 8
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 8)
----
1
6
2
3

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_348
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_348
----
1
6
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 8 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_348 UNION ALL SELECT pk, col0 FROM view_2_tab1_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 8 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_348 UNION SELECT pk, col0 FROM view_2_tab1_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 8 ) AS tab1_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE col0 >= 8
----
0
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab1_348

statement ok
DROP VIEW view_2_tab1_348

statement ok
DROP VIEW view_3_tab1_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_348') DROP VIEW view_1_tab2_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_348') DROP VIEW view_2_tab2_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_348') DROP VIEW view_3_tab2_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_348

statement ok
CREATE VIEW view_1_tab2_348 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 8

statement ok
CREATE VIEW view_2_tab2_348 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 8)

statement ok
CREATE VIEW view_3_tab2_348 AS SELECT pk FROM view_1_tab2_348

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 8
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 8)
----
1
6
2
3

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_348
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_348
----
1
6
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 8 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_348 UNION ALL SELECT pk, col0 FROM view_2_tab2_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 8 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_348 UNION SELECT pk, col0 FROM view_2_tab2_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 8 ) AS tab2_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE col0 >= 8
----
0
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab2_348

statement ok
DROP VIEW view_2_tab2_348

statement ok
DROP VIEW view_3_tab2_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_348') DROP VIEW view_1_tab3_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_348') DROP VIEW view_2_tab3_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_348') DROP VIEW view_3_tab3_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_348

statement ok
CREATE VIEW view_1_tab3_348 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 8

statement ok
CREATE VIEW view_2_tab3_348 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 8)

statement ok
CREATE VIEW view_3_tab3_348 AS SELECT pk FROM view_1_tab3_348

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 8
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 8)
----
1
6
2
3

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_348
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_348
----
1
6
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 8 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_348 UNION ALL SELECT pk, col0 FROM view_2_tab3_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 8 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_348 UNION SELECT pk, col0 FROM view_2_tab3_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 8 ) AS tab3_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE col0 >= 8
----
0
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab3_348

statement ok
DROP VIEW view_2_tab3_348

statement ok
DROP VIEW view_3_tab3_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_348') DROP VIEW view_1_tab4_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_348') DROP VIEW view_2_tab4_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_348') DROP VIEW view_3_tab4_348

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_348

statement ok
CREATE VIEW view_1_tab4_348 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 8

statement ok
CREATE VIEW view_2_tab4_348 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 8)

statement ok
CREATE VIEW view_3_tab4_348 AS SELECT pk FROM view_1_tab4_348

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 8
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 8)
----
1
6
2
3

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_348
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_348
----
1
6
2
3

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 8 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_348 UNION ALL SELECT pk, col0 FROM view_2_tab4_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 8 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_348 UNION SELECT pk, col0 FROM view_2_tab4_348
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 8 ) AS tab4_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_348
----
0
3
4
5
6
7
8
9

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE col0 >= 8
----
0
3
4
5
6
7
8
9

statement ok
DROP VIEW view_1_tab4_348

statement ok
DROP VIEW view_2_tab4_348

statement ok
DROP VIEW view_3_tab4_348

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_349') DROP VIEW view_1_tab0_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_349') DROP VIEW view_2_tab0_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_349') DROP VIEW view_3_tab0_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_349

statement ok
CREATE VIEW view_1_tab0_349 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 94)

statement ok
CREATE VIEW view_2_tab0_349 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 94))

statement ok
CREATE VIEW view_3_tab0_349 AS SELECT pk FROM view_1_tab0_349

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 94)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 94))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_349
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_349 UNION ALL SELECT pk, col0 FROM view_2_tab0_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_349 UNION SELECT pk, col0 FROM view_2_tab0_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 94) ) AS tab0_349
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_349
----

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE (col0 > 94)
----

statement ok
DROP VIEW view_1_tab0_349

statement ok
DROP VIEW view_2_tab0_349

statement ok
DROP VIEW view_3_tab0_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_349') DROP VIEW view_1_tab1_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_349') DROP VIEW view_2_tab1_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_349') DROP VIEW view_3_tab1_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_349

statement ok
CREATE VIEW view_1_tab1_349 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 94)

statement ok
CREATE VIEW view_2_tab1_349 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 94))

statement ok
CREATE VIEW view_3_tab1_349 AS SELECT pk FROM view_1_tab1_349

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 94)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 94))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_349
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_349 UNION ALL SELECT pk, col0 FROM view_2_tab1_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_349 UNION SELECT pk, col0 FROM view_2_tab1_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 94) ) AS tab1_349
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_349
----

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE (col0 > 94)
----

statement ok
DROP VIEW view_1_tab1_349

statement ok
DROP VIEW view_2_tab1_349

statement ok
DROP VIEW view_3_tab1_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_349') DROP VIEW view_1_tab2_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_349') DROP VIEW view_2_tab2_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_349') DROP VIEW view_3_tab2_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_349

statement ok
CREATE VIEW view_1_tab2_349 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 94)

statement ok
CREATE VIEW view_2_tab2_349 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 94))

statement ok
CREATE VIEW view_3_tab2_349 AS SELECT pk FROM view_1_tab2_349

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 94)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 94))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_349
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_349 UNION ALL SELECT pk, col0 FROM view_2_tab2_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_349 UNION SELECT pk, col0 FROM view_2_tab2_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 94) ) AS tab2_349
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_349
----

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE (col0 > 94)
----

statement ok
DROP VIEW view_1_tab2_349

statement ok
DROP VIEW view_2_tab2_349

statement ok
DROP VIEW view_3_tab2_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_349') DROP VIEW view_1_tab3_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_349') DROP VIEW view_2_tab3_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_349') DROP VIEW view_3_tab3_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_349

statement ok
CREATE VIEW view_1_tab3_349 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 94)

statement ok
CREATE VIEW view_2_tab3_349 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 94))

statement ok
CREATE VIEW view_3_tab3_349 AS SELECT pk FROM view_1_tab3_349

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 94)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 94))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_349
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_349 UNION ALL SELECT pk, col0 FROM view_2_tab3_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_349 UNION SELECT pk, col0 FROM view_2_tab3_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 94) ) AS tab3_349
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_349
----

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE (col0 > 94)
----

statement ok
DROP VIEW view_1_tab3_349

statement ok
DROP VIEW view_2_tab3_349

statement ok
DROP VIEW view_3_tab3_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_349') DROP VIEW view_1_tab4_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_349') DROP VIEW view_2_tab4_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_349') DROP VIEW view_3_tab4_349

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_349

statement ok
CREATE VIEW view_1_tab4_349 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 94)

statement ok
CREATE VIEW view_2_tab4_349 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 94))

statement ok
CREATE VIEW view_3_tab4_349 AS SELECT pk FROM view_1_tab4_349

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 94)
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 94))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_349
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_349 UNION ALL SELECT pk, col0 FROM view_2_tab4_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_349 UNION SELECT pk, col0 FROM view_2_tab4_349
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 94) ) AS tab4_349
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_349
----

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE (col0 > 94)
----

statement ok
DROP VIEW view_1_tab4_349

statement ok
DROP VIEW view_2_tab4_349

statement ok
DROP VIEW view_3_tab4_349

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_350') DROP VIEW view_1_tab0_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_350') DROP VIEW view_2_tab0_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_350') DROP VIEW view_3_tab0_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_350

statement ok
CREATE VIEW view_1_tab0_350 AS SELECT pk, col0 FROM tab0 WHERE col0 > 18 AND col0 > 78

statement ok
CREATE VIEW view_2_tab0_350 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18 AND col0 > 78)

statement ok
CREATE VIEW view_3_tab0_350 AS SELECT pk FROM view_1_tab0_350

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE col0 > 18 AND col0 > 78
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_350
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 18 AND col0 > 78 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_350 UNION ALL SELECT pk, col0 FROM view_2_tab0_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 > 18 AND col0 > 78 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_350 UNION SELECT pk, col0 FROM view_2_tab0_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 18 AND col0 > 78 ) AS tab0_350
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_350
----

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE col0 > 18 AND col0 > 78
----

statement ok
DROP VIEW view_1_tab0_350

statement ok
DROP VIEW view_2_tab0_350

statement ok
DROP VIEW view_3_tab0_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_350') DROP VIEW view_1_tab1_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_350') DROP VIEW view_2_tab1_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_350') DROP VIEW view_3_tab1_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_350

statement ok
CREATE VIEW view_1_tab1_350 AS SELECT pk, col0 FROM tab1 WHERE col0 > 18 AND col0 > 78

statement ok
CREATE VIEW view_2_tab1_350 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18 AND col0 > 78)

statement ok
CREATE VIEW view_3_tab1_350 AS SELECT pk FROM view_1_tab1_350

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE col0 > 18 AND col0 > 78
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_350
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 18 AND col0 > 78 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_350 UNION ALL SELECT pk, col0 FROM view_2_tab1_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 > 18 AND col0 > 78 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_350 UNION SELECT pk, col0 FROM view_2_tab1_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 18 AND col0 > 78 ) AS tab1_350
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_350
----

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE col0 > 18 AND col0 > 78
----

statement ok
DROP VIEW view_1_tab1_350

statement ok
DROP VIEW view_2_tab1_350

statement ok
DROP VIEW view_3_tab1_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_350') DROP VIEW view_1_tab2_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_350') DROP VIEW view_2_tab2_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_350') DROP VIEW view_3_tab2_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_350

statement ok
CREATE VIEW view_1_tab2_350 AS SELECT pk, col0 FROM tab2 WHERE col0 > 18 AND col0 > 78

statement ok
CREATE VIEW view_2_tab2_350 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18 AND col0 > 78)

statement ok
CREATE VIEW view_3_tab2_350 AS SELECT pk FROM view_1_tab2_350

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE col0 > 18 AND col0 > 78
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_350
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 18 AND col0 > 78 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_350 UNION ALL SELECT pk, col0 FROM view_2_tab2_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 > 18 AND col0 > 78 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_350 UNION SELECT pk, col0 FROM view_2_tab2_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 18 AND col0 > 78 ) AS tab2_350
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_350
----

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE col0 > 18 AND col0 > 78
----

statement ok
DROP VIEW view_1_tab2_350

statement ok
DROP VIEW view_2_tab2_350

statement ok
DROP VIEW view_3_tab2_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_350') DROP VIEW view_1_tab3_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_350') DROP VIEW view_2_tab3_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_350') DROP VIEW view_3_tab3_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_350

statement ok
CREATE VIEW view_1_tab3_350 AS SELECT pk, col0 FROM tab3 WHERE col0 > 18 AND col0 > 78

statement ok
CREATE VIEW view_2_tab3_350 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18 AND col0 > 78)

statement ok
CREATE VIEW view_3_tab3_350 AS SELECT pk FROM view_1_tab3_350

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE col0 > 18 AND col0 > 78
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_350
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 18 AND col0 > 78 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_350 UNION ALL SELECT pk, col0 FROM view_2_tab3_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 > 18 AND col0 > 78 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_350 UNION SELECT pk, col0 FROM view_2_tab3_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 18 AND col0 > 78 ) AS tab3_350
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_350
----

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE col0 > 18 AND col0 > 78
----

statement ok
DROP VIEW view_1_tab3_350

statement ok
DROP VIEW view_2_tab3_350

statement ok
DROP VIEW view_3_tab3_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_350') DROP VIEW view_1_tab4_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_350') DROP VIEW view_2_tab4_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_350') DROP VIEW view_3_tab4_350

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_350

statement ok
CREATE VIEW view_1_tab4_350 AS SELECT pk, col0 FROM tab4 WHERE col0 > 18 AND col0 > 78

statement ok
CREATE VIEW view_2_tab4_350 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18 AND col0 > 78)

statement ok
CREATE VIEW view_3_tab4_350 AS SELECT pk FROM view_1_tab4_350

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE col0 > 18 AND col0 > 78
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_350
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 18 AND col0 > 78 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_350 UNION ALL SELECT pk, col0 FROM view_2_tab4_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 > 18 AND col0 > 78 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 18 AND col0 > 78)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_350 UNION SELECT pk, col0 FROM view_2_tab4_350
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 18 AND col0 > 78 ) AS tab4_350
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_350
----

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE col0 > 18 AND col0 > 78
----

statement ok
DROP VIEW view_1_tab4_350

statement ok
DROP VIEW view_2_tab4_350

statement ok
DROP VIEW view_3_tab4_350

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_351') DROP VIEW view_1_tab0_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_351') DROP VIEW view_2_tab0_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_351') DROP VIEW view_3_tab0_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_351

statement ok
CREATE VIEW view_1_tab0_351 AS SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 52.12 AND 90.29

statement ok
CREATE VIEW view_2_tab0_351 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)

statement ok
CREATE VIEW view_3_tab0_351 AS SELECT pk FROM view_1_tab0_351

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_351
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_351
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 52.12 AND 90.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_351 UNION ALL SELECT pk, col0 FROM view_2_tab0_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 52.12 AND 90.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_351 UNION SELECT pk, col0 FROM view_2_tab0_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 BETWEEN 52.12 AND 90.29 ) AS tab0_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
7
8
9

statement ok
DROP VIEW view_1_tab0_351

statement ok
DROP VIEW view_2_tab0_351

statement ok
DROP VIEW view_3_tab0_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_351') DROP VIEW view_1_tab1_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_351') DROP VIEW view_2_tab1_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_351') DROP VIEW view_3_tab1_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_351

statement ok
CREATE VIEW view_1_tab1_351 AS SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 52.12 AND 90.29

statement ok
CREATE VIEW view_2_tab1_351 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)

statement ok
CREATE VIEW view_3_tab1_351 AS SELECT pk FROM view_1_tab1_351

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_351
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_351
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 52.12 AND 90.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_351 UNION ALL SELECT pk, col0 FROM view_2_tab1_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 52.12 AND 90.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_351 UNION SELECT pk, col0 FROM view_2_tab1_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 BETWEEN 52.12 AND 90.29 ) AS tab1_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
7
8
9

statement ok
DROP VIEW view_1_tab1_351

statement ok
DROP VIEW view_2_tab1_351

statement ok
DROP VIEW view_3_tab1_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_351') DROP VIEW view_1_tab2_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_351') DROP VIEW view_2_tab2_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_351') DROP VIEW view_3_tab2_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_351

statement ok
CREATE VIEW view_1_tab2_351 AS SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 52.12 AND 90.29

statement ok
CREATE VIEW view_2_tab2_351 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)

statement ok
CREATE VIEW view_3_tab2_351 AS SELECT pk FROM view_1_tab2_351

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_351
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_351
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 52.12 AND 90.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_351 UNION ALL SELECT pk, col0 FROM view_2_tab2_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 52.12 AND 90.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_351 UNION SELECT pk, col0 FROM view_2_tab2_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 BETWEEN 52.12 AND 90.29 ) AS tab2_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
7
8
9

statement ok
DROP VIEW view_1_tab2_351

statement ok
DROP VIEW view_2_tab2_351

statement ok
DROP VIEW view_3_tab2_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_351') DROP VIEW view_1_tab3_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_351') DROP VIEW view_2_tab3_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_351') DROP VIEW view_3_tab3_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_351

statement ok
CREATE VIEW view_1_tab3_351 AS SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 52.12 AND 90.29

statement ok
CREATE VIEW view_2_tab3_351 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)

statement ok
CREATE VIEW view_3_tab3_351 AS SELECT pk FROM view_1_tab3_351

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_351
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_351
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 52.12 AND 90.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_351 UNION ALL SELECT pk, col0 FROM view_2_tab3_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 52.12 AND 90.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_351 UNION SELECT pk, col0 FROM view_2_tab3_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 BETWEEN 52.12 AND 90.29 ) AS tab3_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
7
8
9

statement ok
DROP VIEW view_1_tab3_351

statement ok
DROP VIEW view_2_tab3_351

statement ok
DROP VIEW view_3_tab3_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_351') DROP VIEW view_1_tab4_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_351') DROP VIEW view_2_tab4_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_351') DROP VIEW view_3_tab4_351

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_351

statement ok
CREATE VIEW view_1_tab4_351 AS SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 52.12 AND 90.29

statement ok
CREATE VIEW view_2_tab4_351 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)

statement ok
CREATE VIEW view_3_tab4_351 AS SELECT pk FROM view_1_tab4_351

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_351
----
6
56
7
70
8
75
9
18

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_351
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 52.12 AND 90.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_351 UNION ALL SELECT pk, col0 FROM view_2_tab4_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 52.12 AND 90.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 BETWEEN 52.12 AND 90.29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_351 UNION SELECT pk, col0 FROM view_2_tab4_351
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 BETWEEN 52.12 AND 90.29 ) AS tab4_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_351
----
6
7
8
9

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE col4 BETWEEN 52.12 AND 90.29
----
6
7
8
9

statement ok
DROP VIEW view_1_tab4_351

statement ok
DROP VIEW view_2_tab4_351

statement ok
DROP VIEW view_3_tab4_351

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_352') DROP VIEW view_1_tab0_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_352') DROP VIEW view_2_tab0_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_352') DROP VIEW view_3_tab0_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_352

statement ok
CREATE VIEW view_1_tab0_352 AS SELECT pk, col0 FROM tab0 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20

statement ok
CREATE VIEW view_2_tab0_352 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)

statement ok
CREATE VIEW view_3_tab0_352 AS SELECT pk FROM view_1_tab0_352

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_352
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_352 UNION ALL SELECT pk, col0 FROM view_2_tab0_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_352 UNION SELECT pk, col0 FROM view_2_tab0_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 ) AS tab0_352
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_352
----

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

statement ok
DROP VIEW view_1_tab0_352

statement ok
DROP VIEW view_2_tab0_352

statement ok
DROP VIEW view_3_tab0_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_352') DROP VIEW view_1_tab1_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_352') DROP VIEW view_2_tab1_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_352') DROP VIEW view_3_tab1_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_352

statement ok
CREATE VIEW view_1_tab1_352 AS SELECT pk, col0 FROM tab1 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20

statement ok
CREATE VIEW view_2_tab1_352 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)

statement ok
CREATE VIEW view_3_tab1_352 AS SELECT pk FROM view_1_tab1_352

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_352
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_352 UNION ALL SELECT pk, col0 FROM view_2_tab1_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_352 UNION SELECT pk, col0 FROM view_2_tab1_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 ) AS tab1_352
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_352
----

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

statement ok
DROP VIEW view_1_tab1_352

statement ok
DROP VIEW view_2_tab1_352

statement ok
DROP VIEW view_3_tab1_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_352') DROP VIEW view_1_tab2_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_352') DROP VIEW view_2_tab2_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_352') DROP VIEW view_3_tab2_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_352

statement ok
CREATE VIEW view_1_tab2_352 AS SELECT pk, col0 FROM tab2 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20

statement ok
CREATE VIEW view_2_tab2_352 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)

statement ok
CREATE VIEW view_3_tab2_352 AS SELECT pk FROM view_1_tab2_352

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_352
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_352 UNION ALL SELECT pk, col0 FROM view_2_tab2_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_352 UNION SELECT pk, col0 FROM view_2_tab2_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 ) AS tab2_352
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_352
----

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

statement ok
DROP VIEW view_1_tab2_352

statement ok
DROP VIEW view_2_tab2_352

statement ok
DROP VIEW view_3_tab2_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_352') DROP VIEW view_1_tab3_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_352') DROP VIEW view_2_tab3_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_352') DROP VIEW view_3_tab3_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_352

statement ok
CREATE VIEW view_1_tab3_352 AS SELECT pk, col0 FROM tab3 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20

statement ok
CREATE VIEW view_2_tab3_352 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)

statement ok
CREATE VIEW view_3_tab3_352 AS SELECT pk FROM view_1_tab3_352

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_352
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_352 UNION ALL SELECT pk, col0 FROM view_2_tab3_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_352 UNION SELECT pk, col0 FROM view_2_tab3_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 ) AS tab3_352
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_352
----

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

statement ok
DROP VIEW view_1_tab3_352

statement ok
DROP VIEW view_2_tab3_352

statement ok
DROP VIEW view_3_tab3_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_352') DROP VIEW view_1_tab4_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_352') DROP VIEW view_2_tab4_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_352') DROP VIEW view_3_tab4_352

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_352

statement ok
CREATE VIEW view_1_tab4_352 AS SELECT pk, col0 FROM tab4 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20

statement ok
CREATE VIEW view_2_tab4_352 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)

statement ok
CREATE VIEW view_3_tab4_352 AS SELECT pk FROM view_1_tab4_352

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_352
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_352 UNION ALL SELECT pk, col0 FROM view_2_tab4_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_352 UNION SELECT pk, col0 FROM view_2_tab4_352
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20 ) AS tab4_352
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_352
----

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE col1 > 81.45 AND col4 BETWEEN 25.22 AND 40.20
----

statement ok
DROP VIEW view_1_tab4_352

statement ok
DROP VIEW view_2_tab4_352

statement ok
DROP VIEW view_3_tab4_352

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_353') DROP VIEW view_1_tab0_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_353') DROP VIEW view_2_tab0_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_353') DROP VIEW view_3_tab0_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_353

statement ok
CREATE VIEW view_1_tab0_353 AS SELECT pk, col0 FROM tab0 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)

statement ok
CREATE VIEW view_2_tab0_353 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))

statement ok
CREATE VIEW view_3_tab0_353 AS SELECT pk FROM view_1_tab0_353

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_353
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_353
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_353 UNION ALL SELECT pk, col0 FROM view_2_tab0_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_353 UNION SELECT pk, col0 FROM view_2_tab0_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) ) AS tab0_353
----
8

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_353
----
8

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8

statement ok
DROP VIEW view_1_tab0_353

statement ok
DROP VIEW view_2_tab0_353

statement ok
DROP VIEW view_3_tab0_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_353') DROP VIEW view_1_tab1_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_353') DROP VIEW view_2_tab1_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_353') DROP VIEW view_3_tab1_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_353

statement ok
CREATE VIEW view_1_tab1_353 AS SELECT pk, col0 FROM tab1 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)

statement ok
CREATE VIEW view_2_tab1_353 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))

statement ok
CREATE VIEW view_3_tab1_353 AS SELECT pk FROM view_1_tab1_353

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_353
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_353
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_353 UNION ALL SELECT pk, col0 FROM view_2_tab1_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_353 UNION SELECT pk, col0 FROM view_2_tab1_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) ) AS tab1_353
----
8

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_353
----
8

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8

statement ok
DROP VIEW view_1_tab1_353

statement ok
DROP VIEW view_2_tab1_353

statement ok
DROP VIEW view_3_tab1_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_353') DROP VIEW view_1_tab2_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_353') DROP VIEW view_2_tab2_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_353') DROP VIEW view_3_tab2_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_353

statement ok
CREATE VIEW view_1_tab2_353 AS SELECT pk, col0 FROM tab2 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)

statement ok
CREATE VIEW view_2_tab2_353 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))

statement ok
CREATE VIEW view_3_tab2_353 AS SELECT pk FROM view_1_tab2_353

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_353
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_353
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_353 UNION ALL SELECT pk, col0 FROM view_2_tab2_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_353 UNION SELECT pk, col0 FROM view_2_tab2_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) ) AS tab2_353
----
8

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_353
----
8

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8

statement ok
DROP VIEW view_1_tab2_353

statement ok
DROP VIEW view_2_tab2_353

statement ok
DROP VIEW view_3_tab2_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_353') DROP VIEW view_1_tab3_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_353') DROP VIEW view_2_tab3_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_353') DROP VIEW view_3_tab3_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_353

statement ok
CREATE VIEW view_1_tab3_353 AS SELECT pk, col0 FROM tab3 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)

statement ok
CREATE VIEW view_2_tab3_353 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))

statement ok
CREATE VIEW view_3_tab3_353 AS SELECT pk FROM view_1_tab3_353

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_353
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_353
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_353 UNION ALL SELECT pk, col0 FROM view_2_tab3_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_353 UNION SELECT pk, col0 FROM view_2_tab3_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) ) AS tab3_353
----
8

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_353
----
8

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8

statement ok
DROP VIEW view_1_tab3_353

statement ok
DROP VIEW view_2_tab3_353

statement ok
DROP VIEW view_3_tab3_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_353') DROP VIEW view_1_tab4_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_353') DROP VIEW view_2_tab4_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_353') DROP VIEW view_3_tab4_353

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_353

statement ok
CREATE VIEW view_1_tab4_353 AS SELECT pk, col0 FROM tab4 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)

statement ok
CREATE VIEW view_2_tab4_353 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))

statement ok
CREATE VIEW view_3_tab4_353 AS SELECT pk FROM view_1_tab4_353

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_353
----
8
75

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_353
----
18 values hashing to 9437d8824c47ec564c0e675a776b8e36

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_353 UNION ALL SELECT pk, col0 FROM view_2_tab4_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_353 UNION SELECT pk, col0 FROM view_2_tab4_353
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72) ) AS tab4_353
----
8

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_353
----
8

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE ((col4 < 16.61 AND col4 IN (45.74)) OR col0 >= 72)
----
8

statement ok
DROP VIEW view_1_tab4_353

statement ok
DROP VIEW view_2_tab4_353

statement ok
DROP VIEW view_3_tab4_353

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_354') DROP VIEW view_1_tab0_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_354') DROP VIEW view_2_tab0_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_354') DROP VIEW view_3_tab0_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_354

statement ok
CREATE VIEW view_1_tab0_354 AS SELECT pk, col0 FROM tab0 WHERE ((((col3 > 94))) OR col3 > 39)

statement ok
CREATE VIEW view_2_tab0_354 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 94))) OR col3 > 39))

statement ok
CREATE VIEW view_3_tab0_354 AS SELECT pk FROM view_1_tab0_354

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_354
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_354
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col3 > 94))) OR col3 > 39) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_354 UNION ALL SELECT pk, col0 FROM view_2_tab0_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col3 > 94))) OR col3 > 39) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_354 UNION SELECT pk, col0 FROM view_2_tab0_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col3 > 94))) OR col3 > 39) ) AS tab0_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
4
6
7

statement ok
DROP VIEW view_1_tab0_354

statement ok
DROP VIEW view_2_tab0_354

statement ok
DROP VIEW view_3_tab0_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_354') DROP VIEW view_1_tab1_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_354') DROP VIEW view_2_tab1_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_354') DROP VIEW view_3_tab1_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_354

statement ok
CREATE VIEW view_1_tab1_354 AS SELECT pk, col0 FROM tab1 WHERE ((((col3 > 94))) OR col3 > 39)

statement ok
CREATE VIEW view_2_tab1_354 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 94))) OR col3 > 39))

statement ok
CREATE VIEW view_3_tab1_354 AS SELECT pk FROM view_1_tab1_354

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_354
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_354
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col3 > 94))) OR col3 > 39) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_354 UNION ALL SELECT pk, col0 FROM view_2_tab1_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col3 > 94))) OR col3 > 39) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_354 UNION SELECT pk, col0 FROM view_2_tab1_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col3 > 94))) OR col3 > 39) ) AS tab1_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
4
6
7

statement ok
DROP VIEW view_1_tab1_354

statement ok
DROP VIEW view_2_tab1_354

statement ok
DROP VIEW view_3_tab1_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_354') DROP VIEW view_1_tab2_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_354') DROP VIEW view_2_tab2_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_354') DROP VIEW view_3_tab2_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_354

statement ok
CREATE VIEW view_1_tab2_354 AS SELECT pk, col0 FROM tab2 WHERE ((((col3 > 94))) OR col3 > 39)

statement ok
CREATE VIEW view_2_tab2_354 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 94))) OR col3 > 39))

statement ok
CREATE VIEW view_3_tab2_354 AS SELECT pk FROM view_1_tab2_354

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_354
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_354
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col3 > 94))) OR col3 > 39) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_354 UNION ALL SELECT pk, col0 FROM view_2_tab2_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col3 > 94))) OR col3 > 39) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_354 UNION SELECT pk, col0 FROM view_2_tab2_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col3 > 94))) OR col3 > 39) ) AS tab2_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
4
6
7

statement ok
DROP VIEW view_1_tab2_354

statement ok
DROP VIEW view_2_tab2_354

statement ok
DROP VIEW view_3_tab2_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_354') DROP VIEW view_1_tab3_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_354') DROP VIEW view_2_tab3_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_354') DROP VIEW view_3_tab3_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_354

statement ok
CREATE VIEW view_1_tab3_354 AS SELECT pk, col0 FROM tab3 WHERE ((((col3 > 94))) OR col3 > 39)

statement ok
CREATE VIEW view_2_tab3_354 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 94))) OR col3 > 39))

statement ok
CREATE VIEW view_3_tab3_354 AS SELECT pk FROM view_1_tab3_354

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_354
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_354
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col3 > 94))) OR col3 > 39) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_354 UNION ALL SELECT pk, col0 FROM view_2_tab3_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col3 > 94))) OR col3 > 39) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_354 UNION SELECT pk, col0 FROM view_2_tab3_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col3 > 94))) OR col3 > 39) ) AS tab3_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
4
6
7

statement ok
DROP VIEW view_1_tab3_354

statement ok
DROP VIEW view_2_tab3_354

statement ok
DROP VIEW view_3_tab3_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_354') DROP VIEW view_1_tab4_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_354') DROP VIEW view_2_tab4_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_354') DROP VIEW view_3_tab4_354

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_354

statement ok
CREATE VIEW view_1_tab4_354 AS SELECT pk, col0 FROM tab4 WHERE ((((col3 > 94))) OR col3 > 39)

statement ok
CREATE VIEW view_2_tab4_354 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 94))) OR col3 > 39))

statement ok
CREATE VIEW view_3_tab4_354 AS SELECT pk FROM view_1_tab4_354

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_354
----
1
6
4
11
6
56
7
70

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_354
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col3 > 94))) OR col3 > 39) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_354 UNION ALL SELECT pk, col0 FROM view_2_tab4_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col3 > 94))) OR col3 > 39) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 > 94))) OR col3 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_354 UNION SELECT pk, col0 FROM view_2_tab4_354
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col3 > 94))) OR col3 > 39) ) AS tab4_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_354
----
1
4
6
7

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE ((((col3 > 94))) OR col3 > 39)
----
1
4
6
7

statement ok
DROP VIEW view_1_tab4_354

statement ok
DROP VIEW view_2_tab4_354

statement ok
DROP VIEW view_3_tab4_354

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_355') DROP VIEW view_1_tab0_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_355') DROP VIEW view_2_tab0_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_355') DROP VIEW view_3_tab0_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_355

statement ok
CREATE VIEW view_1_tab0_355 AS SELECT pk, col0 FROM tab0 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))

statement ok
CREATE VIEW view_2_tab0_355 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))

statement ok
CREATE VIEW view_3_tab0_355 AS SELECT pk FROM view_1_tab0_355

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_355
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_355
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_355 UNION ALL SELECT pk, col0 FROM view_2_tab0_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_355 UNION SELECT pk, col0 FROM view_2_tab0_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) ) AS tab0_355
----
3

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_355
----
3

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3

statement ok
DROP VIEW view_1_tab0_355

statement ok
DROP VIEW view_2_tab0_355

statement ok
DROP VIEW view_3_tab0_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_355') DROP VIEW view_1_tab1_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_355') DROP VIEW view_2_tab1_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_355') DROP VIEW view_3_tab1_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_355

statement ok
CREATE VIEW view_1_tab1_355 AS SELECT pk, col0 FROM tab1 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))

statement ok
CREATE VIEW view_2_tab1_355 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))

statement ok
CREATE VIEW view_3_tab1_355 AS SELECT pk FROM view_1_tab1_355

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_355
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_355
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_355 UNION ALL SELECT pk, col0 FROM view_2_tab1_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_355 UNION SELECT pk, col0 FROM view_2_tab1_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) ) AS tab1_355
----
3

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_355
----
3

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3

statement ok
DROP VIEW view_1_tab1_355

statement ok
DROP VIEW view_2_tab1_355

statement ok
DROP VIEW view_3_tab1_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_355') DROP VIEW view_1_tab2_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_355') DROP VIEW view_2_tab2_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_355') DROP VIEW view_3_tab2_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_355

statement ok
CREATE VIEW view_1_tab2_355 AS SELECT pk, col0 FROM tab2 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))

statement ok
CREATE VIEW view_2_tab2_355 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))

statement ok
CREATE VIEW view_3_tab2_355 AS SELECT pk FROM view_1_tab2_355

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_355
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_355
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_355 UNION ALL SELECT pk, col0 FROM view_2_tab2_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_355 UNION SELECT pk, col0 FROM view_2_tab2_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) ) AS tab2_355
----
3

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_355
----
3

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3

statement ok
DROP VIEW view_1_tab2_355

statement ok
DROP VIEW view_2_tab2_355

statement ok
DROP VIEW view_3_tab2_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_355') DROP VIEW view_1_tab3_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_355') DROP VIEW view_2_tab3_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_355') DROP VIEW view_3_tab3_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_355

statement ok
CREATE VIEW view_1_tab3_355 AS SELECT pk, col0 FROM tab3 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))

statement ok
CREATE VIEW view_2_tab3_355 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))

statement ok
CREATE VIEW view_3_tab3_355 AS SELECT pk FROM view_1_tab3_355

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_355
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_355
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_355 UNION ALL SELECT pk, col0 FROM view_2_tab3_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_355 UNION SELECT pk, col0 FROM view_2_tab3_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) ) AS tab3_355
----
3

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_355
----
3

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3

statement ok
DROP VIEW view_1_tab3_355

statement ok
DROP VIEW view_2_tab3_355

statement ok
DROP VIEW view_3_tab3_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_355') DROP VIEW view_1_tab4_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_355') DROP VIEW view_2_tab4_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_355') DROP VIEW view_3_tab4_355

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_355

statement ok
CREATE VIEW view_1_tab4_355 AS SELECT pk, col0 FROM tab4 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))

statement ok
CREATE VIEW view_2_tab4_355 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))

statement ok
CREATE VIEW view_3_tab4_355 AS SELECT pk FROM view_1_tab4_355

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_355
----
3
53

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_355
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_355 UNION ALL SELECT pk, col0 FROM view_2_tab4_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_355 UNION SELECT pk, col0 FROM view_2_tab4_355
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53)) ) AS tab4_355
----
3

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_355
----
3

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE (col0 = 53) OR ((col1 = 3.66) AND (col0 >= 48) AND ((col0 > 56 OR (((col0 > 41)) OR col3 >= 65) AND col0 < 34 AND (((col1 <= 35.95) OR (col4 > 2.33)) AND col3 < 35 OR col3 = 77 AND col4 > 49.45 AND (col0 <= 6)) AND (((col0 >= 47) OR ((col4 < 43.60) OR ((col3 <= 13)) AND col3 IS NULL) AND col3 >= 22 AND col1 < 97.26 OR (col3 IS NULL))))) AND (col1 > 5.53))
----
3

statement ok
DROP VIEW view_1_tab4_355

statement ok
DROP VIEW view_2_tab4_355

statement ok
DROP VIEW view_3_tab4_355

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_356') DROP VIEW view_1_tab0_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_356') DROP VIEW view_2_tab0_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_356') DROP VIEW view_3_tab0_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_356

statement ok
CREATE VIEW view_1_tab0_356 AS SELECT pk, col0 FROM tab0 WHERE (col1 <= 63.99) AND col1 < 20.0

statement ok
CREATE VIEW view_2_tab0_356 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)

statement ok
CREATE VIEW view_3_tab0_356 AS SELECT pk FROM view_1_tab0_356

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_356
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_356
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_356 UNION ALL SELECT pk, col0 FROM view_2_tab0_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_356 UNION SELECT pk, col0 FROM view_2_tab0_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 <= 63.99) AND col1 < 20.0 ) AS tab0_356
----
0

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_356
----
0

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0

statement ok
DROP VIEW view_1_tab0_356

statement ok
DROP VIEW view_2_tab0_356

statement ok
DROP VIEW view_3_tab0_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_356') DROP VIEW view_1_tab1_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_356') DROP VIEW view_2_tab1_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_356') DROP VIEW view_3_tab1_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_356

statement ok
CREATE VIEW view_1_tab1_356 AS SELECT pk, col0 FROM tab1 WHERE (col1 <= 63.99) AND col1 < 20.0

statement ok
CREATE VIEW view_2_tab1_356 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)

statement ok
CREATE VIEW view_3_tab1_356 AS SELECT pk FROM view_1_tab1_356

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_356
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_356
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_356 UNION ALL SELECT pk, col0 FROM view_2_tab1_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_356 UNION SELECT pk, col0 FROM view_2_tab1_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 <= 63.99) AND col1 < 20.0 ) AS tab1_356
----
0

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_356
----
0

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0

statement ok
DROP VIEW view_1_tab1_356

statement ok
DROP VIEW view_2_tab1_356

statement ok
DROP VIEW view_3_tab1_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_356') DROP VIEW view_1_tab2_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_356') DROP VIEW view_2_tab2_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_356') DROP VIEW view_3_tab2_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_356

statement ok
CREATE VIEW view_1_tab2_356 AS SELECT pk, col0 FROM tab2 WHERE (col1 <= 63.99) AND col1 < 20.0

statement ok
CREATE VIEW view_2_tab2_356 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)

statement ok
CREATE VIEW view_3_tab2_356 AS SELECT pk FROM view_1_tab2_356

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_356
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_356
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_356 UNION ALL SELECT pk, col0 FROM view_2_tab2_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_356 UNION SELECT pk, col0 FROM view_2_tab2_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 <= 63.99) AND col1 < 20.0 ) AS tab2_356
----
0

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_356
----
0

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0

statement ok
DROP VIEW view_1_tab2_356

statement ok
DROP VIEW view_2_tab2_356

statement ok
DROP VIEW view_3_tab2_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_356') DROP VIEW view_1_tab3_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_356') DROP VIEW view_2_tab3_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_356') DROP VIEW view_3_tab3_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_356

statement ok
CREATE VIEW view_1_tab3_356 AS SELECT pk, col0 FROM tab3 WHERE (col1 <= 63.99) AND col1 < 20.0

statement ok
CREATE VIEW view_2_tab3_356 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)

statement ok
CREATE VIEW view_3_tab3_356 AS SELECT pk FROM view_1_tab3_356

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_356
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_356
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_356 UNION ALL SELECT pk, col0 FROM view_2_tab3_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_356 UNION SELECT pk, col0 FROM view_2_tab3_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 <= 63.99) AND col1 < 20.0 ) AS tab3_356
----
0

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_356
----
0

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0

statement ok
DROP VIEW view_1_tab3_356

statement ok
DROP VIEW view_2_tab3_356

statement ok
DROP VIEW view_3_tab3_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_356') DROP VIEW view_1_tab4_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_356') DROP VIEW view_2_tab4_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_356') DROP VIEW view_3_tab4_356

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_356

statement ok
CREATE VIEW view_1_tab4_356 AS SELECT pk, col0 FROM tab4 WHERE (col1 <= 63.99) AND col1 < 20.0

statement ok
CREATE VIEW view_2_tab4_356 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)

statement ok
CREATE VIEW view_3_tab4_356 AS SELECT pk FROM view_1_tab4_356

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_356
----
0
8

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_356
----
18 values hashing to 929b16bdea51c39349b4d8d9cf3da810

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_356 UNION ALL SELECT pk, col0 FROM view_2_tab4_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 <= 63.99) AND col1 < 20.0 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 63.99) AND col1 < 20.0)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_356 UNION SELECT pk, col0 FROM view_2_tab4_356
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 <= 63.99) AND col1 < 20.0 ) AS tab4_356
----
0

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_356
----
0

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE (col1 <= 63.99) AND col1 < 20.0
----
0

statement ok
DROP VIEW view_1_tab4_356

statement ok
DROP VIEW view_2_tab4_356

statement ok
DROP VIEW view_3_tab4_356

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_357') DROP VIEW view_1_tab0_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_357') DROP VIEW view_2_tab0_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_357') DROP VIEW view_3_tab0_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_357

statement ok
CREATE VIEW view_1_tab0_357 AS SELECT pk, col0 FROM tab0 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8

statement ok
CREATE VIEW view_2_tab0_357 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)

statement ok
CREATE VIEW view_3_tab0_357 AS SELECT pk FROM view_1_tab0_357

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_357
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_357
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_357 UNION ALL SELECT pk, col0 FROM view_2_tab0_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_357 UNION SELECT pk, col0 FROM view_2_tab0_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 ) AS tab0_357
----
1
2

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_357
----
1
2

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
2

statement ok
DROP VIEW view_1_tab0_357

statement ok
DROP VIEW view_2_tab0_357

statement ok
DROP VIEW view_3_tab0_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_357') DROP VIEW view_1_tab1_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_357') DROP VIEW view_2_tab1_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_357') DROP VIEW view_3_tab1_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_357

statement ok
CREATE VIEW view_1_tab1_357 AS SELECT pk, col0 FROM tab1 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8

statement ok
CREATE VIEW view_2_tab1_357 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)

statement ok
CREATE VIEW view_3_tab1_357 AS SELECT pk FROM view_1_tab1_357

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_357
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_357
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_357 UNION ALL SELECT pk, col0 FROM view_2_tab1_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_357 UNION SELECT pk, col0 FROM view_2_tab1_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 ) AS tab1_357
----
1
2

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_357
----
1
2

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
2

statement ok
DROP VIEW view_1_tab1_357

statement ok
DROP VIEW view_2_tab1_357

statement ok
DROP VIEW view_3_tab1_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_357') DROP VIEW view_1_tab2_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_357') DROP VIEW view_2_tab2_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_357') DROP VIEW view_3_tab2_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_357

statement ok
CREATE VIEW view_1_tab2_357 AS SELECT pk, col0 FROM tab2 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8

statement ok
CREATE VIEW view_2_tab2_357 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)

statement ok
CREATE VIEW view_3_tab2_357 AS SELECT pk FROM view_1_tab2_357

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_357
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_357
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_357 UNION ALL SELECT pk, col0 FROM view_2_tab2_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_357 UNION SELECT pk, col0 FROM view_2_tab2_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 ) AS tab2_357
----
1
2

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_357
----
1
2

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
2

statement ok
DROP VIEW view_1_tab2_357

statement ok
DROP VIEW view_2_tab2_357

statement ok
DROP VIEW view_3_tab2_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_357') DROP VIEW view_1_tab3_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_357') DROP VIEW view_2_tab3_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_357') DROP VIEW view_3_tab3_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_357

statement ok
CREATE VIEW view_1_tab3_357 AS SELECT pk, col0 FROM tab3 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8

statement ok
CREATE VIEW view_2_tab3_357 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)

statement ok
CREATE VIEW view_3_tab3_357 AS SELECT pk FROM view_1_tab3_357

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_357
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_357
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_357 UNION ALL SELECT pk, col0 FROM view_2_tab3_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_357 UNION SELECT pk, col0 FROM view_2_tab3_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 ) AS tab3_357
----
1
2

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_357
----
1
2

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
2

statement ok
DROP VIEW view_1_tab3_357

statement ok
DROP VIEW view_2_tab3_357

statement ok
DROP VIEW view_3_tab3_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_357') DROP VIEW view_1_tab4_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_357') DROP VIEW view_2_tab4_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_357') DROP VIEW view_3_tab4_357

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_357

statement ok
CREATE VIEW view_1_tab4_357 AS SELECT pk, col0 FROM tab4 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8

statement ok
CREATE VIEW view_2_tab4_357 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)

statement ok
CREATE VIEW view_3_tab4_357 AS SELECT pk FROM view_1_tab4_357

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_357
----
1
6
2
3

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_357
----
16 values hashing to 7827d70f00f1e8ee4e4514f2f36ceb3e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_357 UNION ALL SELECT pk, col0 FROM view_2_tab4_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_357 UNION SELECT pk, col0 FROM view_2_tab4_357
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8 ) AS tab4_357
----
1
2

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_357
----
1
2

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE (col4 > 22.87 AND col1 = 0.50 AND (col4 >= 31.31) AND col0 > 97) OR (((col0 < 63)) AND (col0 = 47 OR col3 = 52 AND col0 IS NULL OR (col1 > 86.28) OR col0 < 37 OR col0 >= 46 OR (col1 < 42.43) AND ((col3 >= 72)) AND ((((col3 <= 85))) AND col0 IS NULL OR col0 IS NULL AND col0 > 6) OR (col0 >= 22))) AND col0 <= 73 AND col0 < 8
----
1
2

statement ok
DROP VIEW view_1_tab4_357

statement ok
DROP VIEW view_2_tab4_357

statement ok
DROP VIEW view_3_tab4_357

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_358') DROP VIEW view_1_tab0_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_358') DROP VIEW view_2_tab0_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_358') DROP VIEW view_3_tab0_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_358

statement ok
CREATE VIEW view_1_tab0_358 AS SELECT pk, col0 FROM tab0 WHERE col3 < 64

statement ok
CREATE VIEW view_2_tab0_358 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 64)

statement ok
CREATE VIEW view_3_tab0_358 AS SELECT pk FROM view_1_tab0_358

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE col3 < 64
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 64)
----
1
6
4
11
7
70

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_358
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_358
----
1
6
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 64 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_358 UNION ALL SELECT pk, col0 FROM view_2_tab0_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 64 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_358 UNION SELECT pk, col0 FROM view_2_tab0_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 64 ) AS tab0_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE col3 < 64
----
0
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab0_358

statement ok
DROP VIEW view_2_tab0_358

statement ok
DROP VIEW view_3_tab0_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_358') DROP VIEW view_1_tab1_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_358') DROP VIEW view_2_tab1_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_358') DROP VIEW view_3_tab1_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_358

statement ok
CREATE VIEW view_1_tab1_358 AS SELECT pk, col0 FROM tab1 WHERE col3 < 64

statement ok
CREATE VIEW view_2_tab1_358 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 64)

statement ok
CREATE VIEW view_3_tab1_358 AS SELECT pk FROM view_1_tab1_358

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE col3 < 64
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 64)
----
1
6
4
11
7
70

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_358
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_358
----
1
6
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 64 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_358 UNION ALL SELECT pk, col0 FROM view_2_tab1_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 64 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_358 UNION SELECT pk, col0 FROM view_2_tab1_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 64 ) AS tab1_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE col3 < 64
----
0
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab1_358

statement ok
DROP VIEW view_2_tab1_358

statement ok
DROP VIEW view_3_tab1_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_358') DROP VIEW view_1_tab2_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_358') DROP VIEW view_2_tab2_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_358') DROP VIEW view_3_tab2_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_358

statement ok
CREATE VIEW view_1_tab2_358 AS SELECT pk, col0 FROM tab2 WHERE col3 < 64

statement ok
CREATE VIEW view_2_tab2_358 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 64)

statement ok
CREATE VIEW view_3_tab2_358 AS SELECT pk FROM view_1_tab2_358

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE col3 < 64
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 64)
----
1
6
4
11
7
70

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_358
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_358
----
1
6
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 64 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_358 UNION ALL SELECT pk, col0 FROM view_2_tab2_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 64 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_358 UNION SELECT pk, col0 FROM view_2_tab2_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 64 ) AS tab2_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE col3 < 64
----
0
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab2_358

statement ok
DROP VIEW view_2_tab2_358

statement ok
DROP VIEW view_3_tab2_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_358') DROP VIEW view_1_tab3_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_358') DROP VIEW view_2_tab3_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_358') DROP VIEW view_3_tab3_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_358

statement ok
CREATE VIEW view_1_tab3_358 AS SELECT pk, col0 FROM tab3 WHERE col3 < 64

statement ok
CREATE VIEW view_2_tab3_358 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 64)

statement ok
CREATE VIEW view_3_tab3_358 AS SELECT pk FROM view_1_tab3_358

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE col3 < 64
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 64)
----
1
6
4
11
7
70

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_358
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_358
----
1
6
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 64 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_358 UNION ALL SELECT pk, col0 FROM view_2_tab3_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 64 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_358 UNION SELECT pk, col0 FROM view_2_tab3_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 64 ) AS tab3_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE col3 < 64
----
0
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab3_358

statement ok
DROP VIEW view_2_tab3_358

statement ok
DROP VIEW view_3_tab3_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_358') DROP VIEW view_1_tab4_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_358') DROP VIEW view_2_tab4_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_358') DROP VIEW view_3_tab4_358

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_358

statement ok
CREATE VIEW view_1_tab4_358 AS SELECT pk, col0 FROM tab4 WHERE col3 < 64

statement ok
CREATE VIEW view_2_tab4_358 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 64)

statement ok
CREATE VIEW view_3_tab4_358 AS SELECT pk FROM view_1_tab4_358

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE col3 < 64
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 64)
----
1
6
4
11
7
70

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_358
----
14 values hashing to 8767023e5fc8c0340e30fc2f1b1f1482

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_358
----
1
6
4
11
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 64 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_358 UNION ALL SELECT pk, col0 FROM view_2_tab4_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 64 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 64)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_358 UNION SELECT pk, col0 FROM view_2_tab4_358
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 64 ) AS tab4_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_358
----
0
2
3
5
6
8
9

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE col3 < 64
----
0
2
3
5
6
8
9

statement ok
DROP VIEW view_1_tab4_358

statement ok
DROP VIEW view_2_tab4_358

statement ok
DROP VIEW view_3_tab4_358

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_359') DROP VIEW view_1_tab0_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_359') DROP VIEW view_2_tab0_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_359') DROP VIEW view_3_tab0_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_359

statement ok
CREATE VIEW view_1_tab0_359 AS SELECT pk, col0 FROM tab0 WHERE col3 = 29

statement ok
CREATE VIEW view_2_tab0_359 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 29)

statement ok
CREATE VIEW view_3_tab0_359 AS SELECT pk FROM view_1_tab0_359

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col3 = 29
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 29)
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_359
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_359
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_359 UNION ALL SELECT pk, col0 FROM view_2_tab0_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_359 UNION SELECT pk, col0 FROM view_2_tab0_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 29 ) AS tab0_359
----
3

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_359
----
3

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col3 = 29
----
3

statement ok
DROP VIEW view_1_tab0_359

statement ok
DROP VIEW view_2_tab0_359

statement ok
DROP VIEW view_3_tab0_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_359') DROP VIEW view_1_tab1_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_359') DROP VIEW view_2_tab1_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_359') DROP VIEW view_3_tab1_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_359

statement ok
CREATE VIEW view_1_tab1_359 AS SELECT pk, col0 FROM tab1 WHERE col3 = 29

statement ok
CREATE VIEW view_2_tab1_359 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 29)

statement ok
CREATE VIEW view_3_tab1_359 AS SELECT pk FROM view_1_tab1_359

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col3 = 29
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 29)
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_359
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_359
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_359 UNION ALL SELECT pk, col0 FROM view_2_tab1_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_359 UNION SELECT pk, col0 FROM view_2_tab1_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 29 ) AS tab1_359
----
3

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_359
----
3

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col3 = 29
----
3

statement ok
DROP VIEW view_1_tab1_359

statement ok
DROP VIEW view_2_tab1_359

statement ok
DROP VIEW view_3_tab1_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_359') DROP VIEW view_1_tab2_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_359') DROP VIEW view_2_tab2_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_359') DROP VIEW view_3_tab2_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_359

statement ok
CREATE VIEW view_1_tab2_359 AS SELECT pk, col0 FROM tab2 WHERE col3 = 29

statement ok
CREATE VIEW view_2_tab2_359 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 29)

statement ok
CREATE VIEW view_3_tab2_359 AS SELECT pk FROM view_1_tab2_359

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col3 = 29
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 29)
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_359
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_359
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_359 UNION ALL SELECT pk, col0 FROM view_2_tab2_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_359 UNION SELECT pk, col0 FROM view_2_tab2_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 29 ) AS tab2_359
----
3

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_359
----
3

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col3 = 29
----
3

statement ok
DROP VIEW view_1_tab2_359

statement ok
DROP VIEW view_2_tab2_359

statement ok
DROP VIEW view_3_tab2_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_359') DROP VIEW view_1_tab3_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_359') DROP VIEW view_2_tab3_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_359') DROP VIEW view_3_tab3_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_359

statement ok
CREATE VIEW view_1_tab3_359 AS SELECT pk, col0 FROM tab3 WHERE col3 = 29

statement ok
CREATE VIEW view_2_tab3_359 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 29)

statement ok
CREATE VIEW view_3_tab3_359 AS SELECT pk FROM view_1_tab3_359

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col3 = 29
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 29)
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_359
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_359
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_359 UNION ALL SELECT pk, col0 FROM view_2_tab3_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_359 UNION SELECT pk, col0 FROM view_2_tab3_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 29 ) AS tab3_359
----
3

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_359
----
3

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col3 = 29
----
3

statement ok
DROP VIEW view_1_tab3_359

statement ok
DROP VIEW view_2_tab3_359

statement ok
DROP VIEW view_3_tab3_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_359') DROP VIEW view_1_tab4_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_359') DROP VIEW view_2_tab4_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_359') DROP VIEW view_3_tab4_359

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_359

statement ok
CREATE VIEW view_1_tab4_359 AS SELECT pk, col0 FROM tab4 WHERE col3 = 29

statement ok
CREATE VIEW view_2_tab4_359 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 29)

statement ok
CREATE VIEW view_3_tab4_359 AS SELECT pk FROM view_1_tab4_359

query II rowsort label-5600-1
SELECT pk, col0 FROM tab4 WHERE col3 = 29
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 29)
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab4_359
----
3
53

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab4_359
----
18 values hashing to 73ba655a681901789915144110590cf4

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_359 UNION ALL SELECT pk, col0 FROM view_2_tab4_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 29)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_359 UNION SELECT pk, col0 FROM view_2_tab4_359
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 29 ) AS tab4_359
----
3

query I rowsort label-5600-3
SELECT * FROM view_3_tab4_359
----
3

query I rowsort label-5600-3
SELECT pk FROM tab4 WHERE col3 = 29
----
3

statement ok
DROP VIEW view_1_tab4_359

statement ok
DROP VIEW view_2_tab4_359

statement ok
DROP VIEW view_3_tab4_359

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_360') DROP VIEW view_1_tab0_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_360') DROP VIEW view_2_tab0_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_360') DROP VIEW view_3_tab0_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_360

statement ok
CREATE VIEW view_1_tab0_360 AS SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18

statement ok
CREATE VIEW view_2_tab0_360 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)

statement ok
CREATE VIEW view_3_tab0_360 AS SELECT pk FROM view_1_tab0_360

query II rowsort label-5700-1
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab0_360
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab0_360
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_360 UNION ALL SELECT pk, col0 FROM view_2_tab0_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_360 UNION SELECT pk, col0 FROM view_2_tab0_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 ) AS tab0_360
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab0_360
----
2

query I rowsort label-5700-3
SELECT pk FROM tab0 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2

statement ok
DROP VIEW view_1_tab0_360

statement ok
DROP VIEW view_2_tab0_360

statement ok
DROP VIEW view_3_tab0_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_360') DROP VIEW view_1_tab1_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_360') DROP VIEW view_2_tab1_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_360') DROP VIEW view_3_tab1_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_360

statement ok
CREATE VIEW view_1_tab1_360 AS SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18

statement ok
CREATE VIEW view_2_tab1_360 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)

statement ok
CREATE VIEW view_3_tab1_360 AS SELECT pk FROM view_1_tab1_360

query II rowsort label-5700-1
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab1_360
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab1_360
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_360 UNION ALL SELECT pk, col0 FROM view_2_tab1_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_360 UNION SELECT pk, col0 FROM view_2_tab1_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 ) AS tab1_360
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab1_360
----
2

query I rowsort label-5700-3
SELECT pk FROM tab1 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2

statement ok
DROP VIEW view_1_tab1_360

statement ok
DROP VIEW view_2_tab1_360

statement ok
DROP VIEW view_3_tab1_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_360') DROP VIEW view_1_tab2_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_360') DROP VIEW view_2_tab2_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_360') DROP VIEW view_3_tab2_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_360

statement ok
CREATE VIEW view_1_tab2_360 AS SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18

statement ok
CREATE VIEW view_2_tab2_360 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)

statement ok
CREATE VIEW view_3_tab2_360 AS SELECT pk FROM view_1_tab2_360

query II rowsort label-5700-1
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab2_360
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab2_360
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_360 UNION ALL SELECT pk, col0 FROM view_2_tab2_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_360 UNION SELECT pk, col0 FROM view_2_tab2_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 ) AS tab2_360
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab2_360
----
2

query I rowsort label-5700-3
SELECT pk FROM tab2 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2

statement ok
DROP VIEW view_1_tab2_360

statement ok
DROP VIEW view_2_tab2_360

statement ok
DROP VIEW view_3_tab2_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_360') DROP VIEW view_1_tab3_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_360') DROP VIEW view_2_tab3_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_360') DROP VIEW view_3_tab3_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_360

statement ok
CREATE VIEW view_1_tab3_360 AS SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18

statement ok
CREATE VIEW view_2_tab3_360 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)

statement ok
CREATE VIEW view_3_tab3_360 AS SELECT pk FROM view_1_tab3_360

query II rowsort label-5700-1
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab3_360
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab3_360
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_360 UNION ALL SELECT pk, col0 FROM view_2_tab3_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_360 UNION SELECT pk, col0 FROM view_2_tab3_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 ) AS tab3_360
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab3_360
----
2

query I rowsort label-5700-3
SELECT pk FROM tab3 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2

statement ok
DROP VIEW view_1_tab3_360

statement ok
DROP VIEW view_2_tab3_360

statement ok
DROP VIEW view_3_tab3_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_360') DROP VIEW view_1_tab4_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_360') DROP VIEW view_2_tab4_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_360') DROP VIEW view_3_tab4_360

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_360

statement ok
CREATE VIEW view_1_tab4_360 AS SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18

statement ok
CREATE VIEW view_2_tab4_360 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)

statement ok
CREATE VIEW view_3_tab4_360 AS SELECT pk FROM view_1_tab4_360

query II rowsort label-5700-1
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-5700-1
SELECT pk, col0 FROM view_1_tab4_360
----
2
3

query II rowsort label-5700-2
SELECT pk, col0 FROM view_2_tab4_360
----
18 values hashing to 1034645f9146356b6a57df969444e889

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_360 UNION ALL SELECT pk, col0 FROM view_2_tab4_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_360 UNION SELECT pk, col0 FROM view_2_tab4_360
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18 ) AS tab4_360
----
2

query I rowsort label-5700-3
SELECT * FROM view_3_tab4_360
----
2

query I rowsort label-5700-3
SELECT pk FROM tab4 WHERE col3 IS NULL OR col0 < 5 AND (col0 < 40) AND col0 < 18
----
2

statement ok
DROP VIEW view_1_tab4_360

statement ok
DROP VIEW view_2_tab4_360

statement ok
DROP VIEW view_3_tab4_360

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_361') DROP VIEW view_1_tab0_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_361') DROP VIEW view_2_tab0_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_361') DROP VIEW view_3_tab0_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_361

statement ok
CREATE VIEW view_1_tab0_361 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))

statement ok
CREATE VIEW view_2_tab0_361 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))

statement ok
CREATE VIEW view_3_tab0_361 AS SELECT pk FROM view_1_tab0_361

query II rowsort label-5800-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab0_361
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab0_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_361 UNION ALL SELECT pk, col0 FROM view_2_tab0_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_361 UNION SELECT pk, col0 FROM view_2_tab0_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) ) AS tab0_361
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab0_361
----

query I rowsort label-5800-3
SELECT pk FROM tab0 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

statement ok
DROP VIEW view_1_tab0_361

statement ok
DROP VIEW view_2_tab0_361

statement ok
DROP VIEW view_3_tab0_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_361') DROP VIEW view_1_tab1_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_361') DROP VIEW view_2_tab1_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_361') DROP VIEW view_3_tab1_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_361

statement ok
CREATE VIEW view_1_tab1_361 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))

statement ok
CREATE VIEW view_2_tab1_361 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))

statement ok
CREATE VIEW view_3_tab1_361 AS SELECT pk FROM view_1_tab1_361

query II rowsort label-5800-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab1_361
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab1_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_361 UNION ALL SELECT pk, col0 FROM view_2_tab1_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_361 UNION SELECT pk, col0 FROM view_2_tab1_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) ) AS tab1_361
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab1_361
----

query I rowsort label-5800-3
SELECT pk FROM tab1 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

statement ok
DROP VIEW view_1_tab1_361

statement ok
DROP VIEW view_2_tab1_361

statement ok
DROP VIEW view_3_tab1_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_361') DROP VIEW view_1_tab2_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_361') DROP VIEW view_2_tab2_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_361') DROP VIEW view_3_tab2_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_361

statement ok
CREATE VIEW view_1_tab2_361 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))

statement ok
CREATE VIEW view_2_tab2_361 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))

statement ok
CREATE VIEW view_3_tab2_361 AS SELECT pk FROM view_1_tab2_361

query II rowsort label-5800-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab2_361
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab2_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_361 UNION ALL SELECT pk, col0 FROM view_2_tab2_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_361 UNION SELECT pk, col0 FROM view_2_tab2_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) ) AS tab2_361
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab2_361
----

query I rowsort label-5800-3
SELECT pk FROM tab2 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

statement ok
DROP VIEW view_1_tab2_361

statement ok
DROP VIEW view_2_tab2_361

statement ok
DROP VIEW view_3_tab2_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_361') DROP VIEW view_1_tab3_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_361') DROP VIEW view_2_tab3_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_361') DROP VIEW view_3_tab3_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_361

statement ok
CREATE VIEW view_1_tab3_361 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))

statement ok
CREATE VIEW view_2_tab3_361 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))

statement ok
CREATE VIEW view_3_tab3_361 AS SELECT pk FROM view_1_tab3_361

query II rowsort label-5800-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab3_361
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab3_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_361 UNION ALL SELECT pk, col0 FROM view_2_tab3_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_361 UNION SELECT pk, col0 FROM view_2_tab3_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) ) AS tab3_361
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab3_361
----

query I rowsort label-5800-3
SELECT pk FROM tab3 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

statement ok
DROP VIEW view_1_tab3_361

statement ok
DROP VIEW view_2_tab3_361

statement ok
DROP VIEW view_3_tab3_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_361') DROP VIEW view_1_tab4_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_361') DROP VIEW view_2_tab4_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_361') DROP VIEW view_3_tab4_361

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_361

statement ok
CREATE VIEW view_1_tab4_361 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))

statement ok
CREATE VIEW view_2_tab4_361 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))

statement ok
CREATE VIEW view_3_tab4_361 AS SELECT pk FROM view_1_tab4_361

query II rowsort label-5800-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

query II rowsort label-5800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5800-1
SELECT pk, col0 FROM view_1_tab4_361
----

query II rowsort label-5800-2
SELECT pk, col0 FROM view_2_tab4_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_361 UNION ALL SELECT pk, col0 FROM view_2_tab4_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_361 UNION SELECT pk, col0 FROM view_2_tab4_361
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15))) ) AS tab4_361
----

query I rowsort label-5800-3
SELECT * FROM view_3_tab4_361
----

query I rowsort label-5800-3
SELECT pk FROM tab4 WHERE col0 >= 80 OR ((col0 <= 70 AND (col0 > 30) OR ((col0 = 77)) AND ((((col3 <= 96)))) OR ((col0 = 55)) OR col1 = 4.71 OR col0 > 6) AND ((col1 BETWEEN 27.24 AND 17.15)))
----

statement ok
DROP VIEW view_1_tab4_361

statement ok
DROP VIEW view_2_tab4_361

statement ok
DROP VIEW view_3_tab4_361

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_362') DROP VIEW view_1_tab0_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_362') DROP VIEW view_2_tab0_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_362') DROP VIEW view_3_tab0_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_362

statement ok
CREATE VIEW view_1_tab0_362 AS SELECT pk, col0 FROM tab0 WHERE col0 < 84

statement ok
CREATE VIEW view_2_tab0_362 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 84)

statement ok
CREATE VIEW view_3_tab0_362 AS SELECT pk FROM view_1_tab0_362

query II rowsort label-5900-1
SELECT pk, col0 FROM tab0 WHERE col0 < 84
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 84)
----

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab0_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab0_362
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 84 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_362 UNION ALL SELECT pk, col0 FROM view_2_tab0_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 < 84 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_362 UNION SELECT pk, col0 FROM view_2_tab0_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 < 84 ) AS tab0_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT * FROM view_3_tab0_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT pk FROM tab0 WHERE col0 < 84
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_362

statement ok
DROP VIEW view_2_tab0_362

statement ok
DROP VIEW view_3_tab0_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_362') DROP VIEW view_1_tab1_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_362') DROP VIEW view_2_tab1_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_362') DROP VIEW view_3_tab1_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_362

statement ok
CREATE VIEW view_1_tab1_362 AS SELECT pk, col0 FROM tab1 WHERE col0 < 84

statement ok
CREATE VIEW view_2_tab1_362 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 84)

statement ok
CREATE VIEW view_3_tab1_362 AS SELECT pk FROM view_1_tab1_362

query II rowsort label-5900-1
SELECT pk, col0 FROM tab1 WHERE col0 < 84
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 84)
----

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab1_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab1_362
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 84 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_362 UNION ALL SELECT pk, col0 FROM view_2_tab1_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 < 84 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_362 UNION SELECT pk, col0 FROM view_2_tab1_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 < 84 ) AS tab1_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT * FROM view_3_tab1_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT pk FROM tab1 WHERE col0 < 84
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_362

statement ok
DROP VIEW view_2_tab1_362

statement ok
DROP VIEW view_3_tab1_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_362') DROP VIEW view_1_tab2_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_362') DROP VIEW view_2_tab2_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_362') DROP VIEW view_3_tab2_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_362

statement ok
CREATE VIEW view_1_tab2_362 AS SELECT pk, col0 FROM tab2 WHERE col0 < 84

statement ok
CREATE VIEW view_2_tab2_362 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 84)

statement ok
CREATE VIEW view_3_tab2_362 AS SELECT pk FROM view_1_tab2_362

query II rowsort label-5900-1
SELECT pk, col0 FROM tab2 WHERE col0 < 84
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 84)
----

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab2_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab2_362
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 84 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_362 UNION ALL SELECT pk, col0 FROM view_2_tab2_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 < 84 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_362 UNION SELECT pk, col0 FROM view_2_tab2_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 < 84 ) AS tab2_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT * FROM view_3_tab2_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT pk FROM tab2 WHERE col0 < 84
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_362

statement ok
DROP VIEW view_2_tab2_362

statement ok
DROP VIEW view_3_tab2_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_362') DROP VIEW view_1_tab3_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_362') DROP VIEW view_2_tab3_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_362') DROP VIEW view_3_tab3_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_362

statement ok
CREATE VIEW view_1_tab3_362 AS SELECT pk, col0 FROM tab3 WHERE col0 < 84

statement ok
CREATE VIEW view_2_tab3_362 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 84)

statement ok
CREATE VIEW view_3_tab3_362 AS SELECT pk FROM view_1_tab3_362

query II rowsort label-5900-1
SELECT pk, col0 FROM tab3 WHERE col0 < 84
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 84)
----

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab3_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab3_362
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 84 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_362 UNION ALL SELECT pk, col0 FROM view_2_tab3_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 < 84 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_362 UNION SELECT pk, col0 FROM view_2_tab3_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 < 84 ) AS tab3_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT * FROM view_3_tab3_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT pk FROM tab3 WHERE col0 < 84
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_362

statement ok
DROP VIEW view_2_tab3_362

statement ok
DROP VIEW view_3_tab3_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_362') DROP VIEW view_1_tab4_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_362') DROP VIEW view_2_tab4_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_362') DROP VIEW view_3_tab4_362

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_362

statement ok
CREATE VIEW view_1_tab4_362 AS SELECT pk, col0 FROM tab4 WHERE col0 < 84

statement ok
CREATE VIEW view_2_tab4_362 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 84)

statement ok
CREATE VIEW view_3_tab4_362 AS SELECT pk FROM view_1_tab4_362

query II rowsort label-5900-1
SELECT pk, col0 FROM tab4 WHERE col0 < 84
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 84)
----

query II rowsort label-5900-1
SELECT pk, col0 FROM view_1_tab4_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-5900-2
SELECT pk, col0 FROM view_2_tab4_362
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 84 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_362 UNION ALL SELECT pk, col0 FROM view_2_tab4_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 < 84 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 < 84)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_362 UNION SELECT pk, col0 FROM view_2_tab4_362
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-5900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 < 84 ) AS tab4_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT * FROM view_3_tab4_362
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-5900-3
SELECT pk FROM tab4 WHERE col0 < 84
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_362

statement ok
DROP VIEW view_2_tab4_362

statement ok
DROP VIEW view_3_tab4_362

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_363') DROP VIEW view_1_tab0_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_363') DROP VIEW view_2_tab0_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_363') DROP VIEW view_3_tab0_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_363

statement ok
CREATE VIEW view_1_tab0_363 AS SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))

statement ok
CREATE VIEW view_2_tab0_363 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))

statement ok
CREATE VIEW view_3_tab0_363 AS SELECT pk FROM view_1_tab0_363

query II rowsort label-6000-1
SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab0_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab0_363
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_363 UNION ALL SELECT pk, col0 FROM view_2_tab0_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_363 UNION SELECT pk, col0 FROM view_2_tab0_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) ) AS tab0_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab0_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab0 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_363

statement ok
DROP VIEW view_2_tab0_363

statement ok
DROP VIEW view_3_tab0_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_363') DROP VIEW view_1_tab1_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_363') DROP VIEW view_2_tab1_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_363') DROP VIEW view_3_tab1_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_363

statement ok
CREATE VIEW view_1_tab1_363 AS SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))

statement ok
CREATE VIEW view_2_tab1_363 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))

statement ok
CREATE VIEW view_3_tab1_363 AS SELECT pk FROM view_1_tab1_363

query II rowsort label-6000-1
SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab1_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab1_363
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_363 UNION ALL SELECT pk, col0 FROM view_2_tab1_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_363 UNION SELECT pk, col0 FROM view_2_tab1_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) ) AS tab1_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab1_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab1 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_363

statement ok
DROP VIEW view_2_tab1_363

statement ok
DROP VIEW view_3_tab1_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_363') DROP VIEW view_1_tab2_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_363') DROP VIEW view_2_tab2_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_363') DROP VIEW view_3_tab2_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_363

statement ok
CREATE VIEW view_1_tab2_363 AS SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))

statement ok
CREATE VIEW view_2_tab2_363 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))

statement ok
CREATE VIEW view_3_tab2_363 AS SELECT pk FROM view_1_tab2_363

query II rowsort label-6000-1
SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab2_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab2_363
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_363 UNION ALL SELECT pk, col0 FROM view_2_tab2_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_363 UNION SELECT pk, col0 FROM view_2_tab2_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) ) AS tab2_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab2_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab2 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_363

statement ok
DROP VIEW view_2_tab2_363

statement ok
DROP VIEW view_3_tab2_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_363') DROP VIEW view_1_tab3_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_363') DROP VIEW view_2_tab3_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_363') DROP VIEW view_3_tab3_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_363

statement ok
CREATE VIEW view_1_tab3_363 AS SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))

statement ok
CREATE VIEW view_2_tab3_363 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))

statement ok
CREATE VIEW view_3_tab3_363 AS SELECT pk FROM view_1_tab3_363

query II rowsort label-6000-1
SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab3_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab3_363
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_363 UNION ALL SELECT pk, col0 FROM view_2_tab3_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_363 UNION SELECT pk, col0 FROM view_2_tab3_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) ) AS tab3_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab3_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab3 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_363

statement ok
DROP VIEW view_2_tab3_363

statement ok
DROP VIEW view_3_tab3_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_363') DROP VIEW view_1_tab4_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_363') DROP VIEW view_2_tab4_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_363') DROP VIEW view_3_tab4_363

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_363

statement ok
CREATE VIEW view_1_tab4_363 AS SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))

statement ok
CREATE VIEW view_2_tab4_363 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))

statement ok
CREATE VIEW view_3_tab4_363 AS SELECT pk FROM view_1_tab4_363

query II rowsort label-6000-1
SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----

query II rowsort label-6000-1
SELECT pk, col0 FROM view_1_tab4_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6000-2
SELECT pk, col0 FROM view_2_tab4_363
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_363 UNION ALL SELECT pk, col0 FROM view_2_tab4_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_363 UNION SELECT pk, col0 FROM view_2_tab4_363
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62)))) ) AS tab4_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT * FROM view_3_tab4_363
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6000-3
SELECT pk FROM tab4 WHERE (col1 >= 43.31) OR (((col3 < 28 OR col0 <= 11) AND col0 < 52 OR ((col0 < 62))))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_363

statement ok
DROP VIEW view_2_tab4_363

statement ok
DROP VIEW view_3_tab4_363

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_364') DROP VIEW view_1_tab0_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_364') DROP VIEW view_2_tab0_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_364') DROP VIEW view_3_tab0_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_364

statement ok
CREATE VIEW view_1_tab0_364 AS SELECT pk, col0 FROM tab0 WHERE col4 <= 56.3

statement ok
CREATE VIEW view_2_tab0_364 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 56.3)

statement ok
CREATE VIEW view_3_tab0_364 AS SELECT pk FROM view_1_tab0_364

query II rowsort label-6100-1
SELECT pk, col0 FROM tab0 WHERE col4 <= 56.3
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 56.3)
----
6
56
7
70
8
75
9
18

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab0_364
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab0_364
----
6
56
7
70
8
75
9
18

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 56.3 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_364 UNION ALL SELECT pk, col0 FROM view_2_tab0_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 56.3 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_364 UNION SELECT pk, col0 FROM view_2_tab0_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 <= 56.3 ) AS tab0_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT * FROM view_3_tab0_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT pk FROM tab0 WHERE col4 <= 56.3
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab0_364

statement ok
DROP VIEW view_2_tab0_364

statement ok
DROP VIEW view_3_tab0_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_364') DROP VIEW view_1_tab1_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_364') DROP VIEW view_2_tab1_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_364') DROP VIEW view_3_tab1_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_364

statement ok
CREATE VIEW view_1_tab1_364 AS SELECT pk, col0 FROM tab1 WHERE col4 <= 56.3

statement ok
CREATE VIEW view_2_tab1_364 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 56.3)

statement ok
CREATE VIEW view_3_tab1_364 AS SELECT pk FROM view_1_tab1_364

query II rowsort label-6100-1
SELECT pk, col0 FROM tab1 WHERE col4 <= 56.3
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 56.3)
----
6
56
7
70
8
75
9
18

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab1_364
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab1_364
----
6
56
7
70
8
75
9
18

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 56.3 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_364 UNION ALL SELECT pk, col0 FROM view_2_tab1_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 56.3 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_364 UNION SELECT pk, col0 FROM view_2_tab1_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 <= 56.3 ) AS tab1_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT * FROM view_3_tab1_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT pk FROM tab1 WHERE col4 <= 56.3
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab1_364

statement ok
DROP VIEW view_2_tab1_364

statement ok
DROP VIEW view_3_tab1_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_364') DROP VIEW view_1_tab2_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_364') DROP VIEW view_2_tab2_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_364') DROP VIEW view_3_tab2_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_364

statement ok
CREATE VIEW view_1_tab2_364 AS SELECT pk, col0 FROM tab2 WHERE col4 <= 56.3

statement ok
CREATE VIEW view_2_tab2_364 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 56.3)

statement ok
CREATE VIEW view_3_tab2_364 AS SELECT pk FROM view_1_tab2_364

query II rowsort label-6100-1
SELECT pk, col0 FROM tab2 WHERE col4 <= 56.3
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 56.3)
----
6
56
7
70
8
75
9
18

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab2_364
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab2_364
----
6
56
7
70
8
75
9
18

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 56.3 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_364 UNION ALL SELECT pk, col0 FROM view_2_tab2_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 56.3 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_364 UNION SELECT pk, col0 FROM view_2_tab2_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 <= 56.3 ) AS tab2_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT * FROM view_3_tab2_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT pk FROM tab2 WHERE col4 <= 56.3
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab2_364

statement ok
DROP VIEW view_2_tab2_364

statement ok
DROP VIEW view_3_tab2_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_364') DROP VIEW view_1_tab3_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_364') DROP VIEW view_2_tab3_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_364') DROP VIEW view_3_tab3_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_364

statement ok
CREATE VIEW view_1_tab3_364 AS SELECT pk, col0 FROM tab3 WHERE col4 <= 56.3

statement ok
CREATE VIEW view_2_tab3_364 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 56.3)

statement ok
CREATE VIEW view_3_tab3_364 AS SELECT pk FROM view_1_tab3_364

query II rowsort label-6100-1
SELECT pk, col0 FROM tab3 WHERE col4 <= 56.3
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 56.3)
----
6
56
7
70
8
75
9
18

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab3_364
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab3_364
----
6
56
7
70
8
75
9
18

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 56.3 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_364 UNION ALL SELECT pk, col0 FROM view_2_tab3_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 56.3 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_364 UNION SELECT pk, col0 FROM view_2_tab3_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 <= 56.3 ) AS tab3_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT * FROM view_3_tab3_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT pk FROM tab3 WHERE col4 <= 56.3
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab3_364

statement ok
DROP VIEW view_2_tab3_364

statement ok
DROP VIEW view_3_tab3_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_364') DROP VIEW view_1_tab4_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_364') DROP VIEW view_2_tab4_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_364') DROP VIEW view_3_tab4_364

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_364

statement ok
CREATE VIEW view_1_tab4_364 AS SELECT pk, col0 FROM tab4 WHERE col4 <= 56.3

statement ok
CREATE VIEW view_2_tab4_364 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 56.3)

statement ok
CREATE VIEW view_3_tab4_364 AS SELECT pk FROM view_1_tab4_364

query II rowsort label-6100-1
SELECT pk, col0 FROM tab4 WHERE col4 <= 56.3
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 56.3)
----
6
56
7
70
8
75
9
18

query II rowsort label-6100-1
SELECT pk, col0 FROM view_1_tab4_364
----
12 values hashing to a06df7c74a074f1c2ffde9f940e8b5e8

query II rowsort label-6100-2
SELECT pk, col0 FROM view_2_tab4_364
----
6
56
7
70
8
75
9
18

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 56.3 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_364 UNION ALL SELECT pk, col0 FROM view_2_tab4_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 56.3 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 56.3)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_364 UNION SELECT pk, col0 FROM view_2_tab4_364
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 <= 56.3 ) AS tab4_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT * FROM view_3_tab4_364
----
0
1
2
3
4
5

query I rowsort label-6100-3
SELECT pk FROM tab4 WHERE col4 <= 56.3
----
0
1
2
3
4
5

statement ok
DROP VIEW view_1_tab4_364

statement ok
DROP VIEW view_2_tab4_364

statement ok
DROP VIEW view_3_tab4_364

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_365') DROP VIEW view_1_tab0_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_365') DROP VIEW view_2_tab0_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_365') DROP VIEW view_3_tab0_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_365

statement ok
CREATE VIEW view_1_tab0_365 AS SELECT pk, col0 FROM tab0 WHERE (col0 = 42)

statement ok
CREATE VIEW view_2_tab0_365 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 42))

statement ok
CREATE VIEW view_3_tab0_365 AS SELECT pk FROM view_1_tab0_365

query II rowsort label-6200-1
SELECT pk, col0 FROM tab0 WHERE (col0 = 42)
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 = 42))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab0_365
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab0_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_365 UNION ALL SELECT pk, col0 FROM view_2_tab0_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_365 UNION SELECT pk, col0 FROM view_2_tab0_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 = 42) ) AS tab0_365
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab0_365
----

query I rowsort label-6200-3
SELECT pk FROM tab0 WHERE (col0 = 42)
----

statement ok
DROP VIEW view_1_tab0_365

statement ok
DROP VIEW view_2_tab0_365

statement ok
DROP VIEW view_3_tab0_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_365') DROP VIEW view_1_tab1_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_365') DROP VIEW view_2_tab1_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_365') DROP VIEW view_3_tab1_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_365

statement ok
CREATE VIEW view_1_tab1_365 AS SELECT pk, col0 FROM tab1 WHERE (col0 = 42)

statement ok
CREATE VIEW view_2_tab1_365 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 42))

statement ok
CREATE VIEW view_3_tab1_365 AS SELECT pk FROM view_1_tab1_365

query II rowsort label-6200-1
SELECT pk, col0 FROM tab1 WHERE (col0 = 42)
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 = 42))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab1_365
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab1_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_365 UNION ALL SELECT pk, col0 FROM view_2_tab1_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_365 UNION SELECT pk, col0 FROM view_2_tab1_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 = 42) ) AS tab1_365
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab1_365
----

query I rowsort label-6200-3
SELECT pk FROM tab1 WHERE (col0 = 42)
----

statement ok
DROP VIEW view_1_tab1_365

statement ok
DROP VIEW view_2_tab1_365

statement ok
DROP VIEW view_3_tab1_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_365') DROP VIEW view_1_tab2_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_365') DROP VIEW view_2_tab2_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_365') DROP VIEW view_3_tab2_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_365

statement ok
CREATE VIEW view_1_tab2_365 AS SELECT pk, col0 FROM tab2 WHERE (col0 = 42)

statement ok
CREATE VIEW view_2_tab2_365 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 42))

statement ok
CREATE VIEW view_3_tab2_365 AS SELECT pk FROM view_1_tab2_365

query II rowsort label-6200-1
SELECT pk, col0 FROM tab2 WHERE (col0 = 42)
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 = 42))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab2_365
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab2_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_365 UNION ALL SELECT pk, col0 FROM view_2_tab2_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_365 UNION SELECT pk, col0 FROM view_2_tab2_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 = 42) ) AS tab2_365
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab2_365
----

query I rowsort label-6200-3
SELECT pk FROM tab2 WHERE (col0 = 42)
----

statement ok
DROP VIEW view_1_tab2_365

statement ok
DROP VIEW view_2_tab2_365

statement ok
DROP VIEW view_3_tab2_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_365') DROP VIEW view_1_tab3_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_365') DROP VIEW view_2_tab3_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_365') DROP VIEW view_3_tab3_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_365

statement ok
CREATE VIEW view_1_tab3_365 AS SELECT pk, col0 FROM tab3 WHERE (col0 = 42)

statement ok
CREATE VIEW view_2_tab3_365 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 42))

statement ok
CREATE VIEW view_3_tab3_365 AS SELECT pk FROM view_1_tab3_365

query II rowsort label-6200-1
SELECT pk, col0 FROM tab3 WHERE (col0 = 42)
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 = 42))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab3_365
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab3_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_365 UNION ALL SELECT pk, col0 FROM view_2_tab3_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_365 UNION SELECT pk, col0 FROM view_2_tab3_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 = 42) ) AS tab3_365
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab3_365
----

query I rowsort label-6200-3
SELECT pk FROM tab3 WHERE (col0 = 42)
----

statement ok
DROP VIEW view_1_tab3_365

statement ok
DROP VIEW view_2_tab3_365

statement ok
DROP VIEW view_3_tab3_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_365') DROP VIEW view_1_tab4_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_365') DROP VIEW view_2_tab4_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_365') DROP VIEW view_3_tab4_365

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_365

statement ok
CREATE VIEW view_1_tab4_365 AS SELECT pk, col0 FROM tab4 WHERE (col0 = 42)

statement ok
CREATE VIEW view_2_tab4_365 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 42))

statement ok
CREATE VIEW view_3_tab4_365 AS SELECT pk FROM view_1_tab4_365

query II rowsort label-6200-1
SELECT pk, col0 FROM tab4 WHERE (col0 = 42)
----

query II rowsort label-6200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 = 42))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6200-1
SELECT pk, col0 FROM view_1_tab4_365
----

query II rowsort label-6200-2
SELECT pk, col0 FROM view_2_tab4_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_365 UNION ALL SELECT pk, col0 FROM view_2_tab4_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

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 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_365 UNION SELECT pk, col0 FROM view_2_tab4_365
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 = 42) ) AS tab4_365
----

query I rowsort label-6200-3
SELECT * FROM view_3_tab4_365
----

query I rowsort label-6200-3
SELECT pk FROM tab4 WHERE (col0 = 42)
----

statement ok
DROP VIEW view_1_tab4_365

statement ok
DROP VIEW view_2_tab4_365

statement ok
DROP VIEW view_3_tab4_365

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_366') DROP VIEW view_1_tab0_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_366') DROP VIEW view_2_tab0_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_366') DROP VIEW view_3_tab0_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_366

statement ok
CREATE VIEW view_1_tab0_366 AS SELECT pk, col0 FROM tab0 WHERE (col4 = 69.90)

statement ok
CREATE VIEW view_2_tab0_366 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 69.90))

statement ok
CREATE VIEW view_3_tab0_366 AS SELECT pk FROM view_1_tab0_366

query II rowsort label-6300-1
SELECT pk, col0 FROM tab0 WHERE (col4 = 69.90)
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab0_366
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab0_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 69.90) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_366 UNION ALL SELECT pk, col0 FROM view_2_tab0_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col4 = 69.90) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_366 UNION SELECT pk, col0 FROM view_2_tab0_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col4 = 69.90) ) AS tab0_366
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab0_366
----

query I rowsort label-6300-3
SELECT pk FROM tab0 WHERE (col4 = 69.90)
----

statement ok
DROP VIEW view_1_tab0_366

statement ok
DROP VIEW view_2_tab0_366

statement ok
DROP VIEW view_3_tab0_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_366') DROP VIEW view_1_tab1_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_366') DROP VIEW view_2_tab1_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_366') DROP VIEW view_3_tab1_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_366

statement ok
CREATE VIEW view_1_tab1_366 AS SELECT pk, col0 FROM tab1 WHERE (col4 = 69.90)

statement ok
CREATE VIEW view_2_tab1_366 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 69.90))

statement ok
CREATE VIEW view_3_tab1_366 AS SELECT pk FROM view_1_tab1_366

query II rowsort label-6300-1
SELECT pk, col0 FROM tab1 WHERE (col4 = 69.90)
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab1_366
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab1_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 69.90) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_366 UNION ALL SELECT pk, col0 FROM view_2_tab1_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col4 = 69.90) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_366 UNION SELECT pk, col0 FROM view_2_tab1_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col4 = 69.90) ) AS tab1_366
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab1_366
----

query I rowsort label-6300-3
SELECT pk FROM tab1 WHERE (col4 = 69.90)
----

statement ok
DROP VIEW view_1_tab1_366

statement ok
DROP VIEW view_2_tab1_366

statement ok
DROP VIEW view_3_tab1_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_366') DROP VIEW view_1_tab2_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_366') DROP VIEW view_2_tab2_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_366') DROP VIEW view_3_tab2_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_366

statement ok
CREATE VIEW view_1_tab2_366 AS SELECT pk, col0 FROM tab2 WHERE (col4 = 69.90)

statement ok
CREATE VIEW view_2_tab2_366 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 69.90))

statement ok
CREATE VIEW view_3_tab2_366 AS SELECT pk FROM view_1_tab2_366

query II rowsort label-6300-1
SELECT pk, col0 FROM tab2 WHERE (col4 = 69.90)
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab2_366
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab2_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 69.90) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_366 UNION ALL SELECT pk, col0 FROM view_2_tab2_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col4 = 69.90) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_366 UNION SELECT pk, col0 FROM view_2_tab2_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col4 = 69.90) ) AS tab2_366
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab2_366
----

query I rowsort label-6300-3
SELECT pk FROM tab2 WHERE (col4 = 69.90)
----

statement ok
DROP VIEW view_1_tab2_366

statement ok
DROP VIEW view_2_tab2_366

statement ok
DROP VIEW view_3_tab2_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_366') DROP VIEW view_1_tab3_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_366') DROP VIEW view_2_tab3_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_366') DROP VIEW view_3_tab3_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_366

statement ok
CREATE VIEW view_1_tab3_366 AS SELECT pk, col0 FROM tab3 WHERE (col4 = 69.90)

statement ok
CREATE VIEW view_2_tab3_366 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 69.90))

statement ok
CREATE VIEW view_3_tab3_366 AS SELECT pk FROM view_1_tab3_366

query II rowsort label-6300-1
SELECT pk, col0 FROM tab3 WHERE (col4 = 69.90)
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab3_366
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab3_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 69.90) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_366 UNION ALL SELECT pk, col0 FROM view_2_tab3_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col4 = 69.90) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_366 UNION SELECT pk, col0 FROM view_2_tab3_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col4 = 69.90) ) AS tab3_366
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab3_366
----

query I rowsort label-6300-3
SELECT pk FROM tab3 WHERE (col4 = 69.90)
----

statement ok
DROP VIEW view_1_tab3_366

statement ok
DROP VIEW view_2_tab3_366

statement ok
DROP VIEW view_3_tab3_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_366') DROP VIEW view_1_tab4_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_366') DROP VIEW view_2_tab4_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_366') DROP VIEW view_3_tab4_366

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_366

statement ok
CREATE VIEW view_1_tab4_366 AS SELECT pk, col0 FROM tab4 WHERE (col4 = 69.90)

statement ok
CREATE VIEW view_2_tab4_366 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 69.90))

statement ok
CREATE VIEW view_3_tab4_366 AS SELECT pk FROM view_1_tab4_366

query II rowsort label-6300-1
SELECT pk, col0 FROM tab4 WHERE (col4 = 69.90)
----

query II rowsort label-6300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6300-1
SELECT pk, col0 FROM view_1_tab4_366
----

query II rowsort label-6300-2
SELECT pk, col0 FROM view_2_tab4_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 69.90) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_366 UNION ALL SELECT pk, col0 FROM view_2_tab4_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col4 = 69.90) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col4 = 69.90))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_366 UNION SELECT pk, col0 FROM view_2_tab4_366
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col4 = 69.90) ) AS tab4_366
----

query I rowsort label-6300-3
SELECT * FROM view_3_tab4_366
----

query I rowsort label-6300-3
SELECT pk FROM tab4 WHERE (col4 = 69.90)
----

statement ok
DROP VIEW view_1_tab4_366

statement ok
DROP VIEW view_2_tab4_366

statement ok
DROP VIEW view_3_tab4_366

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_367') DROP VIEW view_1_tab0_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_367') DROP VIEW view_2_tab0_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_367') DROP VIEW view_3_tab0_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_367

statement ok
CREATE VIEW view_1_tab0_367 AS SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))

statement ok
CREATE VIEW view_2_tab0_367 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))

statement ok
CREATE VIEW view_3_tab0_367 AS SELECT pk FROM view_1_tab0_367

query II rowsort label-6400-1
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab0_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab0_367
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_367 UNION ALL SELECT pk, col0 FROM view_2_tab0_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_367 UNION SELECT pk, col0 FROM view_2_tab0_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) ) AS tab0_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT * FROM view_3_tab0_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT pk FROM tab0 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab0 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_367

statement ok
DROP VIEW view_2_tab0_367

statement ok
DROP VIEW view_3_tab0_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_367') DROP VIEW view_1_tab1_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_367') DROP VIEW view_2_tab1_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_367') DROP VIEW view_3_tab1_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_367

statement ok
CREATE VIEW view_1_tab1_367 AS SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))

statement ok
CREATE VIEW view_2_tab1_367 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))

statement ok
CREATE VIEW view_3_tab1_367 AS SELECT pk FROM view_1_tab1_367

query II rowsort label-6400-1
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab1_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab1_367
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_367 UNION ALL SELECT pk, col0 FROM view_2_tab1_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_367 UNION SELECT pk, col0 FROM view_2_tab1_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) ) AS tab1_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT * FROM view_3_tab1_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT pk FROM tab1 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab1 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_367

statement ok
DROP VIEW view_2_tab1_367

statement ok
DROP VIEW view_3_tab1_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_367') DROP VIEW view_1_tab2_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_367') DROP VIEW view_2_tab2_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_367') DROP VIEW view_3_tab2_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_367

statement ok
CREATE VIEW view_1_tab2_367 AS SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))

statement ok
CREATE VIEW view_2_tab2_367 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))

statement ok
CREATE VIEW view_3_tab2_367 AS SELECT pk FROM view_1_tab2_367

query II rowsort label-6400-1
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab2_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab2_367
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_367 UNION ALL SELECT pk, col0 FROM view_2_tab2_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_367 UNION SELECT pk, col0 FROM view_2_tab2_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) ) AS tab2_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT * FROM view_3_tab2_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT pk FROM tab2 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab2 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_367

statement ok
DROP VIEW view_2_tab2_367

statement ok
DROP VIEW view_3_tab2_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_367') DROP VIEW view_1_tab3_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_367') DROP VIEW view_2_tab3_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_367') DROP VIEW view_3_tab3_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_367

statement ok
CREATE VIEW view_1_tab3_367 AS SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))

statement ok
CREATE VIEW view_2_tab3_367 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))

statement ok
CREATE VIEW view_3_tab3_367 AS SELECT pk FROM view_1_tab3_367

query II rowsort label-6400-1
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab3_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab3_367
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_367 UNION ALL SELECT pk, col0 FROM view_2_tab3_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_367 UNION SELECT pk, col0 FROM view_2_tab3_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) ) AS tab3_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT * FROM view_3_tab3_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT pk FROM tab3 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab3 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_367

statement ok
DROP VIEW view_2_tab3_367

statement ok
DROP VIEW view_3_tab3_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_367') DROP VIEW view_1_tab4_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_367') DROP VIEW view_2_tab4_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_367') DROP VIEW view_3_tab4_367

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_367

statement ok
CREATE VIEW view_1_tab4_367 AS SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))

statement ok
CREATE VIEW view_2_tab4_367 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))

statement ok
CREATE VIEW view_3_tab4_367 AS SELECT pk FROM view_1_tab4_367

query II rowsort label-6400-1
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----

query II rowsort label-6400-1
SELECT pk, col0 FROM view_1_tab4_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6400-2
SELECT pk, col0 FROM view_2_tab4_367
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_367 UNION ALL SELECT pk, col0 FROM view_2_tab4_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_367 UNION SELECT pk, col0 FROM view_2_tab4_367
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75))) ) AS tab4_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT * FROM view_3_tab4_367
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-6400-3
SELECT pk FROM tab4 WHERE col3 IS NULL OR (((col0 < 64 AND (col0 BETWEEN 25 AND 41) AND (col4 >= 33.34) OR (col4 < 22.72 AND (col0 >= 61)) AND (col0 > 4) OR col0 >= 0 OR col0 >= 45 AND col3 IN (SELECT col0 FROM tab4 WHERE col3 > 42) AND col3 IS NULL AND col3 <= 75)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_367

statement ok
DROP VIEW view_2_tab4_367

statement ok
DROP VIEW view_3_tab4_367

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_368') DROP VIEW view_1_tab0_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_368') DROP VIEW view_2_tab0_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_368') DROP VIEW view_3_tab0_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_368

statement ok
CREATE VIEW view_1_tab0_368 AS SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col4 <= 23.61

statement ok
CREATE VIEW view_2_tab0_368 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col4 <= 23.61)

statement ok
CREATE VIEW view_3_tab0_368 AS SELECT pk FROM view_1_tab0_368

query II rowsort label-6500-1
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col4 <= 23.61
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab0_368
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab0_368
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col4 <= 23.61 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_368 UNION ALL SELECT pk, col0 FROM view_2_tab0_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col4 <= 23.61 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_368 UNION SELECT pk, col0 FROM view_2_tab0_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IS NULL OR col4 <= 23.61 ) AS tab0_368
----
4

query I rowsort label-6500-3
SELECT * FROM view_3_tab0_368
----
4

query I rowsort label-6500-3
SELECT pk FROM tab0 WHERE col0 IS NULL OR col4 <= 23.61
----
4

statement ok
DROP VIEW view_1_tab0_368

statement ok
DROP VIEW view_2_tab0_368

statement ok
DROP VIEW view_3_tab0_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_368') DROP VIEW view_1_tab1_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_368') DROP VIEW view_2_tab1_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_368') DROP VIEW view_3_tab1_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_368

statement ok
CREATE VIEW view_1_tab1_368 AS SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col4 <= 23.61

statement ok
CREATE VIEW view_2_tab1_368 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col4 <= 23.61)

statement ok
CREATE VIEW view_3_tab1_368 AS SELECT pk FROM view_1_tab1_368

query II rowsort label-6500-1
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col4 <= 23.61
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab1_368
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab1_368
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col4 <= 23.61 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_368 UNION ALL SELECT pk, col0 FROM view_2_tab1_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col4 <= 23.61 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_368 UNION SELECT pk, col0 FROM view_2_tab1_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IS NULL OR col4 <= 23.61 ) AS tab1_368
----
4

query I rowsort label-6500-3
SELECT * FROM view_3_tab1_368
----
4

query I rowsort label-6500-3
SELECT pk FROM tab1 WHERE col0 IS NULL OR col4 <= 23.61
----
4

statement ok
DROP VIEW view_1_tab1_368

statement ok
DROP VIEW view_2_tab1_368

statement ok
DROP VIEW view_3_tab1_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_368') DROP VIEW view_1_tab2_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_368') DROP VIEW view_2_tab2_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_368') DROP VIEW view_3_tab2_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_368

statement ok
CREATE VIEW view_1_tab2_368 AS SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col4 <= 23.61

statement ok
CREATE VIEW view_2_tab2_368 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col4 <= 23.61)

statement ok
CREATE VIEW view_3_tab2_368 AS SELECT pk FROM view_1_tab2_368

query II rowsort label-6500-1
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col4 <= 23.61
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab2_368
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab2_368
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col4 <= 23.61 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_368 UNION ALL SELECT pk, col0 FROM view_2_tab2_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col4 <= 23.61 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_368 UNION SELECT pk, col0 FROM view_2_tab2_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IS NULL OR col4 <= 23.61 ) AS tab2_368
----
4

query I rowsort label-6500-3
SELECT * FROM view_3_tab2_368
----
4

query I rowsort label-6500-3
SELECT pk FROM tab2 WHERE col0 IS NULL OR col4 <= 23.61
----
4

statement ok
DROP VIEW view_1_tab2_368

statement ok
DROP VIEW view_2_tab2_368

statement ok
DROP VIEW view_3_tab2_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_368') DROP VIEW view_1_tab3_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_368') DROP VIEW view_2_tab3_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_368') DROP VIEW view_3_tab3_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_368

statement ok
CREATE VIEW view_1_tab3_368 AS SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col4 <= 23.61

statement ok
CREATE VIEW view_2_tab3_368 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col4 <= 23.61)

statement ok
CREATE VIEW view_3_tab3_368 AS SELECT pk FROM view_1_tab3_368

query II rowsort label-6500-1
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col4 <= 23.61
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab3_368
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab3_368
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col4 <= 23.61 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_368 UNION ALL SELECT pk, col0 FROM view_2_tab3_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col4 <= 23.61 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_368 UNION SELECT pk, col0 FROM view_2_tab3_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IS NULL OR col4 <= 23.61 ) AS tab3_368
----
4

query I rowsort label-6500-3
SELECT * FROM view_3_tab3_368
----
4

query I rowsort label-6500-3
SELECT pk FROM tab3 WHERE col0 IS NULL OR col4 <= 23.61
----
4

statement ok
DROP VIEW view_1_tab3_368

statement ok
DROP VIEW view_2_tab3_368

statement ok
DROP VIEW view_3_tab3_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_368') DROP VIEW view_1_tab4_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_368') DROP VIEW view_2_tab4_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_368') DROP VIEW view_3_tab4_368

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_368

statement ok
CREATE VIEW view_1_tab4_368 AS SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col4 <= 23.61

statement ok
CREATE VIEW view_2_tab4_368 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col4 <= 23.61)

statement ok
CREATE VIEW view_3_tab4_368 AS SELECT pk FROM view_1_tab4_368

query II rowsort label-6500-1
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col4 <= 23.61
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6500-1
SELECT pk, col0 FROM view_1_tab4_368
----
4
11

query II rowsort label-6500-2
SELECT pk, col0 FROM view_2_tab4_368
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col4 <= 23.61 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_368 UNION ALL SELECT pk, col0 FROM view_2_tab4_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col4 <= 23.61 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IS NULL OR col4 <= 23.61)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_368 UNION SELECT pk, col0 FROM view_2_tab4_368
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IS NULL OR col4 <= 23.61 ) AS tab4_368
----
4

query I rowsort label-6500-3
SELECT * FROM view_3_tab4_368
----
4

query I rowsort label-6500-3
SELECT pk FROM tab4 WHERE col0 IS NULL OR col4 <= 23.61
----
4

statement ok
DROP VIEW view_1_tab4_368

statement ok
DROP VIEW view_2_tab4_368

statement ok
DROP VIEW view_3_tab4_368

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_369') DROP VIEW view_1_tab0_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_369') DROP VIEW view_2_tab0_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_369') DROP VIEW view_3_tab0_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_369

statement ok
CREATE VIEW view_1_tab0_369 AS SELECT pk, col0 FROM tab0 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))

statement ok
CREATE VIEW view_2_tab0_369 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))

statement ok
CREATE VIEW view_3_tab0_369 AS SELECT pk FROM view_1_tab0_369

query II rowsort label-6600-1
SELECT pk, col0 FROM tab0 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
1
6
4
11
6
56
7
70

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab0_369
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab0_369
----
1
6
4
11
6
56
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_369 UNION ALL SELECT pk, col0 FROM view_2_tab0_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_369 UNION SELECT pk, col0 FROM view_2_tab0_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) ) AS tab0_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab0_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab0 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
0
2
3
5
8
9

statement ok
DROP VIEW view_1_tab0_369

statement ok
DROP VIEW view_2_tab0_369

statement ok
DROP VIEW view_3_tab0_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_369') DROP VIEW view_1_tab1_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_369') DROP VIEW view_2_tab1_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_369') DROP VIEW view_3_tab1_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_369

statement ok
CREATE VIEW view_1_tab1_369 AS SELECT pk, col0 FROM tab1 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))

statement ok
CREATE VIEW view_2_tab1_369 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))

statement ok
CREATE VIEW view_3_tab1_369 AS SELECT pk FROM view_1_tab1_369

query II rowsort label-6600-1
SELECT pk, col0 FROM tab1 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
1
6
4
11
6
56
7
70

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab1_369
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab1_369
----
1
6
4
11
6
56
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_369 UNION ALL SELECT pk, col0 FROM view_2_tab1_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_369 UNION SELECT pk, col0 FROM view_2_tab1_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) ) AS tab1_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab1_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab1 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
0
2
3
5
8
9

statement ok
DROP VIEW view_1_tab1_369

statement ok
DROP VIEW view_2_tab1_369

statement ok
DROP VIEW view_3_tab1_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_369') DROP VIEW view_1_tab2_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_369') DROP VIEW view_2_tab2_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_369') DROP VIEW view_3_tab2_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_369

statement ok
CREATE VIEW view_1_tab2_369 AS SELECT pk, col0 FROM tab2 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))

statement ok
CREATE VIEW view_2_tab2_369 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))

statement ok
CREATE VIEW view_3_tab2_369 AS SELECT pk FROM view_1_tab2_369

query II rowsort label-6600-1
SELECT pk, col0 FROM tab2 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
1
6
4
11
6
56
7
70

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab2_369
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab2_369
----
1
6
4
11
6
56
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_369 UNION ALL SELECT pk, col0 FROM view_2_tab2_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_369 UNION SELECT pk, col0 FROM view_2_tab2_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) ) AS tab2_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab2_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab2 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
0
2
3
5
8
9

statement ok
DROP VIEW view_1_tab2_369

statement ok
DROP VIEW view_2_tab2_369

statement ok
DROP VIEW view_3_tab2_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_369') DROP VIEW view_1_tab3_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_369') DROP VIEW view_2_tab3_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_369') DROP VIEW view_3_tab3_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_369

statement ok
CREATE VIEW view_1_tab3_369 AS SELECT pk, col0 FROM tab3 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))

statement ok
CREATE VIEW view_2_tab3_369 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))

statement ok
CREATE VIEW view_3_tab3_369 AS SELECT pk FROM view_1_tab3_369

query II rowsort label-6600-1
SELECT pk, col0 FROM tab3 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
1
6
4
11
6
56
7
70

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab3_369
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab3_369
----
1
6
4
11
6
56
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_369 UNION ALL SELECT pk, col0 FROM view_2_tab3_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_369 UNION SELECT pk, col0 FROM view_2_tab3_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) ) AS tab3_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab3_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab3 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
0
2
3
5
8
9

statement ok
DROP VIEW view_1_tab3_369

statement ok
DROP VIEW view_2_tab3_369

statement ok
DROP VIEW view_3_tab3_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_369') DROP VIEW view_1_tab4_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_369') DROP VIEW view_2_tab4_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_369') DROP VIEW view_3_tab4_369

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_369

statement ok
CREATE VIEW view_1_tab4_369 AS SELECT pk, col0 FROM tab4 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))

statement ok
CREATE VIEW view_2_tab4_369 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))

statement ok
CREATE VIEW view_3_tab4_369 AS SELECT pk FROM view_1_tab4_369

query II rowsort label-6600-1
SELECT pk, col0 FROM tab4 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
1
6
4
11
6
56
7
70

query II rowsort label-6600-1
SELECT pk, col0 FROM view_1_tab4_369
----
12 values hashing to ce2fb1ca6c383f05b8018046b44c43d0

query II rowsort label-6600-2
SELECT pk, col0 FROM view_2_tab4_369
----
1
6
4
11
6
56
7
70

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_369 UNION ALL SELECT pk, col0 FROM view_2_tab4_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_369 UNION SELECT pk, col0 FROM view_2_tab4_369
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67))) ) AS tab4_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT * FROM view_3_tab4_369
----
0
2
3
5
8
9

query I rowsort label-6600-3
SELECT pk FROM tab4 WHERE ((col4 < 72.64) AND col1 < 16.25 OR col3 < 19 AND (col3 IN (24)) AND col3 < 60 OR ((col1 BETWEEN 40.43 AND 51.72) AND ((col4 >= 59.48)) AND ((col0 >= 48))) OR (col0 > 72 OR col4 <= 83.87 OR (((((col0 > 94)))) OR col3 IS NULL) AND col1 > 25.18 OR col3 < 33) AND (((col1 = 54.49) OR col3 < 37)) OR col0 <= 80 AND col3 <= 68 AND ((col0 = 1 OR col3 > 67)))
----
0
2
3
5
8
9

statement ok
DROP VIEW view_1_tab4_369

statement ok
DROP VIEW view_2_tab4_369

statement ok
DROP VIEW view_3_tab4_369

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_370') DROP VIEW view_1_tab0_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_370') DROP VIEW view_2_tab0_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_370') DROP VIEW view_3_tab0_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_370

statement ok
CREATE VIEW view_1_tab0_370 AS SELECT pk, col0 FROM tab0 WHERE col0 = 81 AND ((col3 IS NULL))

statement ok
CREATE VIEW view_2_tab0_370 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))

statement ok
CREATE VIEW view_3_tab0_370 AS SELECT pk FROM view_1_tab0_370

query II rowsort label-6700-1
SELECT pk, col0 FROM tab0 WHERE col0 = 81 AND ((col3 IS NULL))
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab0_370
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab0_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 81 AND ((col3 IS NULL)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_370 UNION ALL SELECT pk, col0 FROM view_2_tab0_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 = 81 AND ((col3 IS NULL)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_370 UNION SELECT pk, col0 FROM view_2_tab0_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 = 81 AND ((col3 IS NULL)) ) AS tab0_370
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab0_370
----

query I rowsort label-6700-3
SELECT pk FROM tab0 WHERE col0 = 81 AND ((col3 IS NULL))
----

statement ok
DROP VIEW view_1_tab0_370

statement ok
DROP VIEW view_2_tab0_370

statement ok
DROP VIEW view_3_tab0_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_370') DROP VIEW view_1_tab1_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_370') DROP VIEW view_2_tab1_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_370') DROP VIEW view_3_tab1_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_370

statement ok
CREATE VIEW view_1_tab1_370 AS SELECT pk, col0 FROM tab1 WHERE col0 = 81 AND ((col3 IS NULL))

statement ok
CREATE VIEW view_2_tab1_370 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))

statement ok
CREATE VIEW view_3_tab1_370 AS SELECT pk FROM view_1_tab1_370

query II rowsort label-6700-1
SELECT pk, col0 FROM tab1 WHERE col0 = 81 AND ((col3 IS NULL))
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab1_370
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab1_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 81 AND ((col3 IS NULL)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_370 UNION ALL SELECT pk, col0 FROM view_2_tab1_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 = 81 AND ((col3 IS NULL)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_370 UNION SELECT pk, col0 FROM view_2_tab1_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 = 81 AND ((col3 IS NULL)) ) AS tab1_370
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab1_370
----

query I rowsort label-6700-3
SELECT pk FROM tab1 WHERE col0 = 81 AND ((col3 IS NULL))
----

statement ok
DROP VIEW view_1_tab1_370

statement ok
DROP VIEW view_2_tab1_370

statement ok
DROP VIEW view_3_tab1_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_370') DROP VIEW view_1_tab2_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_370') DROP VIEW view_2_tab2_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_370') DROP VIEW view_3_tab2_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_370

statement ok
CREATE VIEW view_1_tab2_370 AS SELECT pk, col0 FROM tab2 WHERE col0 = 81 AND ((col3 IS NULL))

statement ok
CREATE VIEW view_2_tab2_370 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))

statement ok
CREATE VIEW view_3_tab2_370 AS SELECT pk FROM view_1_tab2_370

query II rowsort label-6700-1
SELECT pk, col0 FROM tab2 WHERE col0 = 81 AND ((col3 IS NULL))
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab2_370
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab2_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 81 AND ((col3 IS NULL)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_370 UNION ALL SELECT pk, col0 FROM view_2_tab2_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 = 81 AND ((col3 IS NULL)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_370 UNION SELECT pk, col0 FROM view_2_tab2_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 = 81 AND ((col3 IS NULL)) ) AS tab2_370
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab2_370
----

query I rowsort label-6700-3
SELECT pk FROM tab2 WHERE col0 = 81 AND ((col3 IS NULL))
----

statement ok
DROP VIEW view_1_tab2_370

statement ok
DROP VIEW view_2_tab2_370

statement ok
DROP VIEW view_3_tab2_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_370') DROP VIEW view_1_tab3_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_370') DROP VIEW view_2_tab3_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_370') DROP VIEW view_3_tab3_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_370

statement ok
CREATE VIEW view_1_tab3_370 AS SELECT pk, col0 FROM tab3 WHERE col0 = 81 AND ((col3 IS NULL))

statement ok
CREATE VIEW view_2_tab3_370 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))

statement ok
CREATE VIEW view_3_tab3_370 AS SELECT pk FROM view_1_tab3_370

query II rowsort label-6700-1
SELECT pk, col0 FROM tab3 WHERE col0 = 81 AND ((col3 IS NULL))
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab3_370
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab3_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 81 AND ((col3 IS NULL)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_370 UNION ALL SELECT pk, col0 FROM view_2_tab3_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 = 81 AND ((col3 IS NULL)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_370 UNION SELECT pk, col0 FROM view_2_tab3_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 = 81 AND ((col3 IS NULL)) ) AS tab3_370
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab3_370
----

query I rowsort label-6700-3
SELECT pk FROM tab3 WHERE col0 = 81 AND ((col3 IS NULL))
----

statement ok
DROP VIEW view_1_tab3_370

statement ok
DROP VIEW view_2_tab3_370

statement ok
DROP VIEW view_3_tab3_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_370') DROP VIEW view_1_tab4_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_370') DROP VIEW view_2_tab4_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_370') DROP VIEW view_3_tab4_370

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_370

statement ok
CREATE VIEW view_1_tab4_370 AS SELECT pk, col0 FROM tab4 WHERE col0 = 81 AND ((col3 IS NULL))

statement ok
CREATE VIEW view_2_tab4_370 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))

statement ok
CREATE VIEW view_3_tab4_370 AS SELECT pk FROM view_1_tab4_370

query II rowsort label-6700-1
SELECT pk, col0 FROM tab4 WHERE col0 = 81 AND ((col3 IS NULL))
----

query II rowsort label-6700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6700-1
SELECT pk, col0 FROM view_1_tab4_370
----

query II rowsort label-6700-2
SELECT pk, col0 FROM view_2_tab4_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 81 AND ((col3 IS NULL)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_370 UNION ALL SELECT pk, col0 FROM view_2_tab4_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 = 81 AND ((col3 IS NULL)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 = 81 AND ((col3 IS NULL)))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_370 UNION SELECT pk, col0 FROM view_2_tab4_370
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 = 81 AND ((col3 IS NULL)) ) AS tab4_370
----

query I rowsort label-6700-3
SELECT * FROM view_3_tab4_370
----

query I rowsort label-6700-3
SELECT pk FROM tab4 WHERE col0 = 81 AND ((col3 IS NULL))
----

statement ok
DROP VIEW view_1_tab4_370

statement ok
DROP VIEW view_2_tab4_370

statement ok
DROP VIEW view_3_tab4_370

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_371') DROP VIEW view_1_tab0_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_371') DROP VIEW view_2_tab0_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_371') DROP VIEW view_3_tab0_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_371

statement ok
CREATE VIEW view_1_tab0_371 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 78) OR col4 <= 17.11

statement ok
CREATE VIEW view_2_tab0_371 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 78) OR col4 <= 17.11)

statement ok
CREATE VIEW view_3_tab0_371 AS SELECT pk FROM view_1_tab0_371

query II rowsort label-6800-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 78) OR col4 <= 17.11
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab0_371
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab0_371
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 78) OR col4 <= 17.11 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_371 UNION ALL SELECT pk, col0 FROM view_2_tab0_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 > 78) OR col4 <= 17.11 UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_371 UNION SELECT pk, col0 FROM view_2_tab0_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 78) OR col4 <= 17.11 ) AS tab0_371
----
4

query I rowsort label-6800-3
SELECT * FROM view_3_tab0_371
----
4

query I rowsort label-6800-3
SELECT pk FROM tab0 WHERE (col0 > 78) OR col4 <= 17.11
----
4

statement ok
DROP VIEW view_1_tab0_371

statement ok
DROP VIEW view_2_tab0_371

statement ok
DROP VIEW view_3_tab0_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_371') DROP VIEW view_1_tab1_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_371') DROP VIEW view_2_tab1_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_371') DROP VIEW view_3_tab1_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_371

statement ok
CREATE VIEW view_1_tab1_371 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 78) OR col4 <= 17.11

statement ok
CREATE VIEW view_2_tab1_371 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 78) OR col4 <= 17.11)

statement ok
CREATE VIEW view_3_tab1_371 AS SELECT pk FROM view_1_tab1_371

query II rowsort label-6800-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 78) OR col4 <= 17.11
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab1_371
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab1_371
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 78) OR col4 <= 17.11 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_371 UNION ALL SELECT pk, col0 FROM view_2_tab1_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 > 78) OR col4 <= 17.11 UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_371 UNION SELECT pk, col0 FROM view_2_tab1_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 78) OR col4 <= 17.11 ) AS tab1_371
----
4

query I rowsort label-6800-3
SELECT * FROM view_3_tab1_371
----
4

query I rowsort label-6800-3
SELECT pk FROM tab1 WHERE (col0 > 78) OR col4 <= 17.11
----
4

statement ok
DROP VIEW view_1_tab1_371

statement ok
DROP VIEW view_2_tab1_371

statement ok
DROP VIEW view_3_tab1_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_371') DROP VIEW view_1_tab2_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_371') DROP VIEW view_2_tab2_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_371') DROP VIEW view_3_tab2_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_371

statement ok
CREATE VIEW view_1_tab2_371 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 78) OR col4 <= 17.11

statement ok
CREATE VIEW view_2_tab2_371 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 78) OR col4 <= 17.11)

statement ok
CREATE VIEW view_3_tab2_371 AS SELECT pk FROM view_1_tab2_371

query II rowsort label-6800-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 78) OR col4 <= 17.11
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab2_371
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab2_371
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 78) OR col4 <= 17.11 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_371 UNION ALL SELECT pk, col0 FROM view_2_tab2_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 > 78) OR col4 <= 17.11 UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_371 UNION SELECT pk, col0 FROM view_2_tab2_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 78) OR col4 <= 17.11 ) AS tab2_371
----
4

query I rowsort label-6800-3
SELECT * FROM view_3_tab2_371
----
4

query I rowsort label-6800-3
SELECT pk FROM tab2 WHERE (col0 > 78) OR col4 <= 17.11
----
4

statement ok
DROP VIEW view_1_tab2_371

statement ok
DROP VIEW view_2_tab2_371

statement ok
DROP VIEW view_3_tab2_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_371') DROP VIEW view_1_tab3_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_371') DROP VIEW view_2_tab3_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_371') DROP VIEW view_3_tab3_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_371

statement ok
CREATE VIEW view_1_tab3_371 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 78) OR col4 <= 17.11

statement ok
CREATE VIEW view_2_tab3_371 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 78) OR col4 <= 17.11)

statement ok
CREATE VIEW view_3_tab3_371 AS SELECT pk FROM view_1_tab3_371

query II rowsort label-6800-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 78) OR col4 <= 17.11
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab3_371
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab3_371
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 78) OR col4 <= 17.11 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_371 UNION ALL SELECT pk, col0 FROM view_2_tab3_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 > 78) OR col4 <= 17.11 UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_371 UNION SELECT pk, col0 FROM view_2_tab3_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 78) OR col4 <= 17.11 ) AS tab3_371
----
4

query I rowsort label-6800-3
SELECT * FROM view_3_tab3_371
----
4

query I rowsort label-6800-3
SELECT pk FROM tab3 WHERE (col0 > 78) OR col4 <= 17.11
----
4

statement ok
DROP VIEW view_1_tab3_371

statement ok
DROP VIEW view_2_tab3_371

statement ok
DROP VIEW view_3_tab3_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_371') DROP VIEW view_1_tab4_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_371') DROP VIEW view_2_tab4_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_371') DROP VIEW view_3_tab4_371

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_371

statement ok
CREATE VIEW view_1_tab4_371 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 78) OR col4 <= 17.11

statement ok
CREATE VIEW view_2_tab4_371 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 78) OR col4 <= 17.11)

statement ok
CREATE VIEW view_3_tab4_371 AS SELECT pk FROM view_1_tab4_371

query II rowsort label-6800-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 78) OR col4 <= 17.11
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-6800-1
SELECT pk, col0 FROM view_1_tab4_371
----
4
11

query II rowsort label-6800-2
SELECT pk, col0 FROM view_2_tab4_371
----
18 values hashing to b0acd79b1550d7ef2f168d9b0ef2c20f

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 78) OR col4 <= 17.11 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_371 UNION ALL SELECT pk, col0 FROM view_2_tab4_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 > 78) OR col4 <= 17.11 UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 78) OR col4 <= 17.11)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_371 UNION SELECT pk, col0 FROM view_2_tab4_371
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 78) OR col4 <= 17.11 ) AS tab4_371
----
4

query I rowsort label-6800-3
SELECT * FROM view_3_tab4_371
----
4

query I rowsort label-6800-3
SELECT pk FROM tab4 WHERE (col0 > 78) OR col4 <= 17.11
----
4

statement ok
DROP VIEW view_1_tab4_371

statement ok
DROP VIEW view_2_tab4_371

statement ok
DROP VIEW view_3_tab4_371

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_372') DROP VIEW view_1_tab0_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_372') DROP VIEW view_2_tab0_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_372') DROP VIEW view_3_tab0_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_372

statement ok
CREATE VIEW view_1_tab0_372 AS SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 75 AND 42

statement ok
CREATE VIEW view_2_tab0_372 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 75 AND 42)

statement ok
CREATE VIEW view_3_tab0_372 AS SELECT pk FROM view_1_tab0_372

query II rowsort label-6900-1
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 75 AND 42
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab0_372
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab0_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 75 AND 42 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_372 UNION ALL SELECT pk, col0 FROM view_2_tab0_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 75 AND 42 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_372 UNION SELECT pk, col0 FROM view_2_tab0_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 BETWEEN 75 AND 42 ) AS tab0_372
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab0_372
----

query I rowsort label-6900-3
SELECT pk FROM tab0 WHERE col3 BETWEEN 75 AND 42
----

statement ok
DROP VIEW view_1_tab0_372

statement ok
DROP VIEW view_2_tab0_372

statement ok
DROP VIEW view_3_tab0_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_372') DROP VIEW view_1_tab1_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_372') DROP VIEW view_2_tab1_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_372') DROP VIEW view_3_tab1_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_372

statement ok
CREATE VIEW view_1_tab1_372 AS SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 75 AND 42

statement ok
CREATE VIEW view_2_tab1_372 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 75 AND 42)

statement ok
CREATE VIEW view_3_tab1_372 AS SELECT pk FROM view_1_tab1_372

query II rowsort label-6900-1
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 75 AND 42
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab1_372
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab1_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 75 AND 42 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_372 UNION ALL SELECT pk, col0 FROM view_2_tab1_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 75 AND 42 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_372 UNION SELECT pk, col0 FROM view_2_tab1_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 BETWEEN 75 AND 42 ) AS tab1_372
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab1_372
----

query I rowsort label-6900-3
SELECT pk FROM tab1 WHERE col3 BETWEEN 75 AND 42
----

statement ok
DROP VIEW view_1_tab1_372

statement ok
DROP VIEW view_2_tab1_372

statement ok
DROP VIEW view_3_tab1_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_372') DROP VIEW view_1_tab2_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_372') DROP VIEW view_2_tab2_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_372') DROP VIEW view_3_tab2_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_372

statement ok
CREATE VIEW view_1_tab2_372 AS SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 75 AND 42

statement ok
CREATE VIEW view_2_tab2_372 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 75 AND 42)

statement ok
CREATE VIEW view_3_tab2_372 AS SELECT pk FROM view_1_tab2_372

query II rowsort label-6900-1
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 75 AND 42
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab2_372
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab2_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 75 AND 42 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_372 UNION ALL SELECT pk, col0 FROM view_2_tab2_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 75 AND 42 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_372 UNION SELECT pk, col0 FROM view_2_tab2_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 BETWEEN 75 AND 42 ) AS tab2_372
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab2_372
----

query I rowsort label-6900-3
SELECT pk FROM tab2 WHERE col3 BETWEEN 75 AND 42
----

statement ok
DROP VIEW view_1_tab2_372

statement ok
DROP VIEW view_2_tab2_372

statement ok
DROP VIEW view_3_tab2_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_372') DROP VIEW view_1_tab3_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_372') DROP VIEW view_2_tab3_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_372') DROP VIEW view_3_tab3_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_372

statement ok
CREATE VIEW view_1_tab3_372 AS SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 75 AND 42

statement ok
CREATE VIEW view_2_tab3_372 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 75 AND 42)

statement ok
CREATE VIEW view_3_tab3_372 AS SELECT pk FROM view_1_tab3_372

query II rowsort label-6900-1
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 75 AND 42
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab3_372
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab3_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 75 AND 42 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_372 UNION ALL SELECT pk, col0 FROM view_2_tab3_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 75 AND 42 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_372 UNION SELECT pk, col0 FROM view_2_tab3_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 BETWEEN 75 AND 42 ) AS tab3_372
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab3_372
----

query I rowsort label-6900-3
SELECT pk FROM tab3 WHERE col3 BETWEEN 75 AND 42
----

statement ok
DROP VIEW view_1_tab3_372

statement ok
DROP VIEW view_2_tab3_372

statement ok
DROP VIEW view_3_tab3_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_372') DROP VIEW view_1_tab4_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_372') DROP VIEW view_2_tab4_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_372') DROP VIEW view_3_tab4_372

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_372

statement ok
CREATE VIEW view_1_tab4_372 AS SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 75 AND 42

statement ok
CREATE VIEW view_2_tab4_372 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 75 AND 42)

statement ok
CREATE VIEW view_3_tab4_372 AS SELECT pk FROM view_1_tab4_372

query II rowsort label-6900-1
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 75 AND 42
----

query II rowsort label-6900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-6900-1
SELECT pk, col0 FROM view_1_tab4_372
----

query II rowsort label-6900-2
SELECT pk, col0 FROM view_2_tab4_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 75 AND 42 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_372 UNION ALL SELECT pk, col0 FROM view_2_tab4_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 75 AND 42 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 BETWEEN 75 AND 42)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_372 UNION SELECT pk, col0 FROM view_2_tab4_372
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-6900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 BETWEEN 75 AND 42 ) AS tab4_372
----

query I rowsort label-6900-3
SELECT * FROM view_3_tab4_372
----

query I rowsort label-6900-3
SELECT pk FROM tab4 WHERE col3 BETWEEN 75 AND 42
----

statement ok
DROP VIEW view_1_tab4_372

statement ok
DROP VIEW view_2_tab4_372

statement ok
DROP VIEW view_3_tab4_372

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_373') DROP VIEW view_1_tab0_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_373') DROP VIEW view_2_tab0_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_373') DROP VIEW view_3_tab0_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_373

statement ok
CREATE VIEW view_1_tab0_373 AS SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39)

statement ok
CREATE VIEW view_2_tab0_373 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39))

statement ok
CREATE VIEW view_3_tab0_373 AS SELECT pk FROM view_1_tab0_373

query II rowsort label-7000-1
SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39)
----

query II rowsort label-7000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab0_373
----

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab0_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_373 UNION ALL SELECT pk, col0 FROM view_2_tab0_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_373 UNION SELECT pk, col0 FROM view_2_tab0_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39) ) AS tab0_373
----

query I rowsort label-7000-3
SELECT * FROM view_3_tab0_373
----

query I rowsort label-7000-3
SELECT pk FROM tab0 WHERE col3 IN (SELECT col0 FROM tab0 WHERE col0 > 39)
----

statement ok
DROP VIEW view_1_tab0_373

statement ok
DROP VIEW view_2_tab0_373

statement ok
DROP VIEW view_3_tab0_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_373') DROP VIEW view_1_tab1_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_373') DROP VIEW view_2_tab1_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_373') DROP VIEW view_3_tab1_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_373

statement ok
CREATE VIEW view_1_tab1_373 AS SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39)

statement ok
CREATE VIEW view_2_tab1_373 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39))

statement ok
CREATE VIEW view_3_tab1_373 AS SELECT pk FROM view_1_tab1_373

query II rowsort label-7000-1
SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39)
----

query II rowsort label-7000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab1_373
----

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab1_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_373 UNION ALL SELECT pk, col0 FROM view_2_tab1_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_373 UNION SELECT pk, col0 FROM view_2_tab1_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39) ) AS tab1_373
----

query I rowsort label-7000-3
SELECT * FROM view_3_tab1_373
----

query I rowsort label-7000-3
SELECT pk FROM tab1 WHERE col3 IN (SELECT col0 FROM tab1 WHERE col0 > 39)
----

statement ok
DROP VIEW view_1_tab1_373

statement ok
DROP VIEW view_2_tab1_373

statement ok
DROP VIEW view_3_tab1_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_373') DROP VIEW view_1_tab2_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_373') DROP VIEW view_2_tab2_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_373') DROP VIEW view_3_tab2_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_373

statement ok
CREATE VIEW view_1_tab2_373 AS SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39)

statement ok
CREATE VIEW view_2_tab2_373 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39))

statement ok
CREATE VIEW view_3_tab2_373 AS SELECT pk FROM view_1_tab2_373

query II rowsort label-7000-1
SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39)
----

query II rowsort label-7000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab2_373
----

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab2_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_373 UNION ALL SELECT pk, col0 FROM view_2_tab2_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_373 UNION SELECT pk, col0 FROM view_2_tab2_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39) ) AS tab2_373
----

query I rowsort label-7000-3
SELECT * FROM view_3_tab2_373
----

query I rowsort label-7000-3
SELECT pk FROM tab2 WHERE col3 IN (SELECT col0 FROM tab2 WHERE col0 > 39)
----

statement ok
DROP VIEW view_1_tab2_373

statement ok
DROP VIEW view_2_tab2_373

statement ok
DROP VIEW view_3_tab2_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_373') DROP VIEW view_1_tab3_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_373') DROP VIEW view_2_tab3_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_373') DROP VIEW view_3_tab3_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_373

statement ok
CREATE VIEW view_1_tab3_373 AS SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39)

statement ok
CREATE VIEW view_2_tab3_373 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39))

statement ok
CREATE VIEW view_3_tab3_373 AS SELECT pk FROM view_1_tab3_373

query II rowsort label-7000-1
SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39)
----

query II rowsort label-7000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab3_373
----

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab3_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_373 UNION ALL SELECT pk, col0 FROM view_2_tab3_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_373 UNION SELECT pk, col0 FROM view_2_tab3_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39) ) AS tab3_373
----

query I rowsort label-7000-3
SELECT * FROM view_3_tab3_373
----

query I rowsort label-7000-3
SELECT pk FROM tab3 WHERE col3 IN (SELECT col0 FROM tab3 WHERE col0 > 39)
----

statement ok
DROP VIEW view_1_tab3_373

statement ok
DROP VIEW view_2_tab3_373

statement ok
DROP VIEW view_3_tab3_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_373') DROP VIEW view_1_tab4_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_373') DROP VIEW view_2_tab4_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_373') DROP VIEW view_3_tab4_373

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_373

statement ok
CREATE VIEW view_1_tab4_373 AS SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39)

statement ok
CREATE VIEW view_2_tab4_373 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39))

statement ok
CREATE VIEW view_3_tab4_373 AS SELECT pk FROM view_1_tab4_373

query II rowsort label-7000-1
SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39)
----

query II rowsort label-7000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-7000-1
SELECT pk, col0 FROM view_1_tab4_373
----

query II rowsort label-7000-2
SELECT pk, col0 FROM view_2_tab4_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_373 UNION ALL SELECT pk, col0 FROM view_2_tab4_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_373 UNION SELECT pk, col0 FROM view_2_tab4_373
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39) ) AS tab4_373
----

query I rowsort label-7000-3
SELECT * FROM view_3_tab4_373
----

query I rowsort label-7000-3
SELECT pk FROM tab4 WHERE col3 IN (SELECT col0 FROM tab4 WHERE col0 > 39)
----

statement ok
DROP VIEW view_1_tab4_373

statement ok
DROP VIEW view_2_tab4_373

statement ok
DROP VIEW view_3_tab4_373

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_374') DROP VIEW view_1_tab0_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_374') DROP VIEW view_2_tab0_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_374') DROP VIEW view_3_tab0_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_374

statement ok
CREATE VIEW view_1_tab0_374 AS SELECT pk, col0 FROM tab0 WHERE col1 > 71.95

statement ok
CREATE VIEW view_2_tab0_374 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 71.95)

statement ok
CREATE VIEW view_3_tab0_374 AS SELECT pk FROM view_1_tab0_374

query II rowsort label-7100-1
SELECT pk, col0 FROM tab0 WHERE col1 > 71.95
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 71.95)
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab0_374
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab0_374
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 71.95 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_374 UNION ALL SELECT pk, col0 FROM view_2_tab0_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 71.95 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_374 UNION SELECT pk, col0 FROM view_2_tab0_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 71.95 ) AS tab0_374
----
1
6

query I rowsort label-7100-3
SELECT * FROM view_3_tab0_374
----
1
6

query I rowsort label-7100-3
SELECT pk FROM tab0 WHERE col1 > 71.95
----
1
6

statement ok
DROP VIEW view_1_tab0_374

statement ok
DROP VIEW view_2_tab0_374

statement ok
DROP VIEW view_3_tab0_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_374') DROP VIEW view_1_tab1_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_374') DROP VIEW view_2_tab1_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_374') DROP VIEW view_3_tab1_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_374

statement ok
CREATE VIEW view_1_tab1_374 AS SELECT pk, col0 FROM tab1 WHERE col1 > 71.95

statement ok
CREATE VIEW view_2_tab1_374 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 71.95)

statement ok
CREATE VIEW view_3_tab1_374 AS SELECT pk FROM view_1_tab1_374

query II rowsort label-7100-1
SELECT pk, col0 FROM tab1 WHERE col1 > 71.95
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 71.95)
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab1_374
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab1_374
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 71.95 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_374 UNION ALL SELECT pk, col0 FROM view_2_tab1_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 71.95 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_374 UNION SELECT pk, col0 FROM view_2_tab1_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 71.95 ) AS tab1_374
----
1
6

query I rowsort label-7100-3
SELECT * FROM view_3_tab1_374
----
1
6

query I rowsort label-7100-3
SELECT pk FROM tab1 WHERE col1 > 71.95
----
1
6

statement ok
DROP VIEW view_1_tab1_374

statement ok
DROP VIEW view_2_tab1_374

statement ok
DROP VIEW view_3_tab1_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_374') DROP VIEW view_1_tab2_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_374') DROP VIEW view_2_tab2_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_374') DROP VIEW view_3_tab2_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_374

statement ok
CREATE VIEW view_1_tab2_374 AS SELECT pk, col0 FROM tab2 WHERE col1 > 71.95

statement ok
CREATE VIEW view_2_tab2_374 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 71.95)

statement ok
CREATE VIEW view_3_tab2_374 AS SELECT pk FROM view_1_tab2_374

query II rowsort label-7100-1
SELECT pk, col0 FROM tab2 WHERE col1 > 71.95
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 71.95)
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab2_374
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab2_374
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 71.95 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_374 UNION ALL SELECT pk, col0 FROM view_2_tab2_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 71.95 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_374 UNION SELECT pk, col0 FROM view_2_tab2_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 71.95 ) AS tab2_374
----
1
6

query I rowsort label-7100-3
SELECT * FROM view_3_tab2_374
----
1
6

query I rowsort label-7100-3
SELECT pk FROM tab2 WHERE col1 > 71.95
----
1
6

statement ok
DROP VIEW view_1_tab2_374

statement ok
DROP VIEW view_2_tab2_374

statement ok
DROP VIEW view_3_tab2_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_374') DROP VIEW view_1_tab3_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_374') DROP VIEW view_2_tab3_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_374') DROP VIEW view_3_tab3_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_374

statement ok
CREATE VIEW view_1_tab3_374 AS SELECT pk, col0 FROM tab3 WHERE col1 > 71.95

statement ok
CREATE VIEW view_2_tab3_374 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 71.95)

statement ok
CREATE VIEW view_3_tab3_374 AS SELECT pk FROM view_1_tab3_374

query II rowsort label-7100-1
SELECT pk, col0 FROM tab3 WHERE col1 > 71.95
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 71.95)
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab3_374
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab3_374
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 71.95 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_374 UNION ALL SELECT pk, col0 FROM view_2_tab3_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 71.95 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_374 UNION SELECT pk, col0 FROM view_2_tab3_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 71.95 ) AS tab3_374
----
1
6

query I rowsort label-7100-3
SELECT * FROM view_3_tab3_374
----
1
6

query I rowsort label-7100-3
SELECT pk FROM tab3 WHERE col1 > 71.95
----
1
6

statement ok
DROP VIEW view_1_tab3_374

statement ok
DROP VIEW view_2_tab3_374

statement ok
DROP VIEW view_3_tab3_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_374') DROP VIEW view_1_tab4_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_374') DROP VIEW view_2_tab4_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_374') DROP VIEW view_3_tab4_374

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_374

statement ok
CREATE VIEW view_1_tab4_374 AS SELECT pk, col0 FROM tab4 WHERE col1 > 71.95

statement ok
CREATE VIEW view_2_tab4_374 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 71.95)

statement ok
CREATE VIEW view_3_tab4_374 AS SELECT pk FROM view_1_tab4_374

query II rowsort label-7100-1
SELECT pk, col0 FROM tab4 WHERE col1 > 71.95
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 71.95)
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-7100-1
SELECT pk, col0 FROM view_1_tab4_374
----
1
6
6
56

query II rowsort label-7100-2
SELECT pk, col0 FROM view_2_tab4_374
----
16 values hashing to f29a158539b0635fd89db9f40216897d

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 71.95 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_374 UNION ALL SELECT pk, col0 FROM view_2_tab4_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 71.95 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 71.95)
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_374 UNION SELECT pk, col0 FROM view_2_tab4_374
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 71.95 ) AS tab4_374
----
1
6

query I rowsort label-7100-3
SELECT * FROM view_3_tab4_374
----
1
6

query I rowsort label-7100-3
SELECT pk FROM tab4 WHERE col1 > 71.95
----
1
6

statement ok
DROP VIEW view_1_tab4_374

statement ok
DROP VIEW view_2_tab4_374

statement ok
DROP VIEW view_3_tab4_374

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_375') DROP VIEW view_1_tab0_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_375') DROP VIEW view_2_tab0_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_375') DROP VIEW view_3_tab0_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_375

statement ok
CREATE VIEW view_1_tab0_375 AS SELECT pk, col0 FROM tab0 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)

statement ok
CREATE VIEW view_2_tab0_375 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))

statement ok
CREATE VIEW view_3_tab0_375 AS SELECT pk FROM view_1_tab0_375

query II rowsort label-7200-1
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-7200-1
SELECT pk, col0 FROM view_1_tab0_375
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM view_2_tab0_375
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_375 UNION ALL SELECT pk, col0 FROM view_2_tab0_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_375 UNION SELECT pk, col0 FROM view_2_tab0_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) ) AS tab0_375
----
0
9

query I rowsort label-7200-3
SELECT * FROM view_3_tab0_375
----
0
9

query I rowsort label-7200-3
SELECT pk FROM tab0 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
9

statement ok
DROP VIEW view_1_tab0_375

statement ok
DROP VIEW view_2_tab0_375

statement ok
DROP VIEW view_3_tab0_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_375') DROP VIEW view_1_tab1_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_375') DROP VIEW view_2_tab1_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_375') DROP VIEW view_3_tab1_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_375

statement ok
CREATE VIEW view_1_tab1_375 AS SELECT pk, col0 FROM tab1 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)

statement ok
CREATE VIEW view_2_tab1_375 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))

statement ok
CREATE VIEW view_3_tab1_375 AS SELECT pk FROM view_1_tab1_375

query II rowsort label-7200-1
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-7200-1
SELECT pk, col0 FROM view_1_tab1_375
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM view_2_tab1_375
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_375 UNION ALL SELECT pk, col0 FROM view_2_tab1_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_375 UNION SELECT pk, col0 FROM view_2_tab1_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) ) AS tab1_375
----
0
9

query I rowsort label-7200-3
SELECT * FROM view_3_tab1_375
----
0
9

query I rowsort label-7200-3
SELECT pk FROM tab1 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
9

statement ok
DROP VIEW view_1_tab1_375

statement ok
DROP VIEW view_2_tab1_375

statement ok
DROP VIEW view_3_tab1_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_375') DROP VIEW view_1_tab2_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_375') DROP VIEW view_2_tab2_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_375') DROP VIEW view_3_tab2_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_375

statement ok
CREATE VIEW view_1_tab2_375 AS SELECT pk, col0 FROM tab2 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)

statement ok
CREATE VIEW view_2_tab2_375 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))

statement ok
CREATE VIEW view_3_tab2_375 AS SELECT pk FROM view_1_tab2_375

query II rowsort label-7200-1
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-7200-1
SELECT pk, col0 FROM view_1_tab2_375
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM view_2_tab2_375
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_375 UNION ALL SELECT pk, col0 FROM view_2_tab2_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_375 UNION SELECT pk, col0 FROM view_2_tab2_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) ) AS tab2_375
----
0
9

query I rowsort label-7200-3
SELECT * FROM view_3_tab2_375
----
0
9

query I rowsort label-7200-3
SELECT pk FROM tab2 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
9

statement ok
DROP VIEW view_1_tab2_375

statement ok
DROP VIEW view_2_tab2_375

statement ok
DROP VIEW view_3_tab2_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_375') DROP VIEW view_1_tab3_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_375') DROP VIEW view_2_tab3_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_375') DROP VIEW view_3_tab3_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_375

statement ok
CREATE VIEW view_1_tab3_375 AS SELECT pk, col0 FROM tab3 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)

statement ok
CREATE VIEW view_2_tab3_375 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))

statement ok
CREATE VIEW view_3_tab3_375 AS SELECT pk FROM view_1_tab3_375

query II rowsort label-7200-1
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-7200-1
SELECT pk, col0 FROM view_1_tab3_375
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM view_2_tab3_375
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_375 UNION ALL SELECT pk, col0 FROM view_2_tab3_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_375 UNION SELECT pk, col0 FROM view_2_tab3_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) ) AS tab3_375
----
0
9

query I rowsort label-7200-3
SELECT * FROM view_3_tab3_375
----
0
9

query I rowsort label-7200-3
SELECT pk FROM tab3 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
9

statement ok
DROP VIEW view_1_tab3_375

statement ok
DROP VIEW view_2_tab3_375

statement ok
DROP VIEW view_3_tab3_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_375') DROP VIEW view_1_tab4_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_375') DROP VIEW view_2_tab4_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_375

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_375') DROP VIEW view_3_tab4_375

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_375

statement ok
CREATE VIEW view_1_tab4_375 AS SELECT pk, col0 FROM tab4 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)

statement ok
CREATE VIEW view_2_tab4_375 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))

statement ok
CREATE VIEW view_3_tab4_375 AS SELECT pk FROM view_1_tab4_375

query II rowsort label-7200-1
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-7200-1
SELECT pk, col0 FROM view_1_tab4_375
----
0
8
9
18

query II rowsort label-7200-2
SELECT pk, col0 FROM view_2_tab4_375
----
16 values hashing to 19d5aae9f5366f83e8269e4936310c4c

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_375 UNION ALL SELECT pk, col0 FROM view_2_tab4_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35))
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_375 UNION SELECT pk, col0 FROM view_2_tab4_375
----
20 values hashing to 463a8481a3c42a48764d017d9e15050b

query I rowsort label-7200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35) ) AS tab4_375
----
0
9

query I rowsort label-7200-3
SELECT * FROM view_3_tab4_375
----
0
9

query I rowsort label-7200-3
SELECT pk FROM tab4 WHERE ((col3 <= 69 AND (col4 > 50.62) OR col0 <= 76 AND (col3 < 72 AND ((col0 IS NULL) AND col4 = 42.59) AND (col0 < 99) AND col4 < 78.39 AND (((col0 IS NULL)) AND (((col3 > 91 AND col0 IS NULL)))) AND ((col0 BETWEEN 19 AND 87 AND col0 > 44) OR (col0 > 6) AND (col3 < 21) OR (col3 >= 44)) AND (col0 > 51) OR col3 >= 68 AND col0 IS NULL)) AND col0 < 37 OR col3 < 0 AND col0 <= 26 OR ((col0 > 68)) AND col1 BETWEEN 0.51 AND 37.65 OR col1 < 26.35)
----
0
9

statement ok
DROP VIEW view_1_tab4_375

statement ok
DROP VIEW view_2_tab4_375

statement ok
DROP VIEW view_3_tab4_375

