sqllogictest
Artifact Content
Not logged in

Artifact 8037a5bfa9e0eaf3ebfec4776ca67d35dc593da4:


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,60,16.37,'uupqq',95,92.11,'erssa')

statement ok
INSERT INTO tab0 VALUES(1,72,57.33,'tthcn',80,23.35,'riuoa')

statement ok
INSERT INTO tab0 VALUES(2,52,32.63,'foihd',1,48.20,'otlxo')

statement ok
INSERT INTO tab0 VALUES(3,23,49.70,'ubjko',59,43.3,'sebpp')

statement ok
INSERT INTO tab0 VALUES(4,18,91.65,'faofy',68,44.45,'jvkrn')

statement ok
INSERT INTO tab0 VALUES(5,85,87.35,'xccjx',69,7.40,'syzql')

statement ok
INSERT INTO tab0 VALUES(6,9,63.59,'odvkj',38,75.27,'qxwjd')

statement ok
INSERT INTO tab0 VALUES(7,17,17.16,'uexyz',8,36.4,'flhmk')

statement ok
INSERT INTO tab0 VALUES(8,94,71.1,'unmty',71,89.42,'ipfgx')

statement ok
INSERT INTO tab0 VALUES(9,95,39.38,'xdgym',96,6.95,'kcywq')

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

statement ok
CREATE UNIQUE INDEX idx_tab2_1 ON tab2 (col0)

statement ok
CREATE UNIQUE INDEX idx_tab2_2 ON tab2 (col3)

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 (col1 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab3_2 ON tab3 (col3)

statement ok
CREATE UNIQUE INDEX idx_tab3_3 ON tab3 (col4)

statement ok
INSERT INTO tab3 SELECT * FROM tab0

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

statement ok
CREATE INDEX idx_tab4_0 ON tab4 (col3 DESC)

statement ok
CREATE UNIQUE INDEX idx_tab4_3 ON tab4 (col0 DESC)

statement ok
CREATE INDEX idx_tab4_5 ON tab4 (col4 DESC)

statement ok
INSERT INTO tab4 SELECT * FROM tab0

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_376 AS SELECT pk, col0 FROM tab0 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))

statement ok
CREATE VIEW view_2_tab0_376 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))

statement ok
CREATE VIEW view_3_tab0_376 AS SELECT pk FROM view_1_tab0_376

query II rowsort label-0-1
SELECT pk, col0 FROM tab0 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab0_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab0_376
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_376 UNION ALL SELECT pk, col0 FROM view_2_tab0_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_376 UNION SELECT pk, col0 FROM view_2_tab0_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) ) AS tab0_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT * FROM view_3_tab0_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT pk FROM tab0 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_376

statement ok
DROP VIEW view_2_tab0_376

statement ok
DROP VIEW view_3_tab0_376

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_376 AS SELECT pk, col0 FROM tab1 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))

statement ok
CREATE VIEW view_2_tab1_376 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))

statement ok
CREATE VIEW view_3_tab1_376 AS SELECT pk FROM view_1_tab1_376

query II rowsort label-0-1
SELECT pk, col0 FROM tab1 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab1_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab1_376
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_376 UNION ALL SELECT pk, col0 FROM view_2_tab1_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_376 UNION SELECT pk, col0 FROM view_2_tab1_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) ) AS tab1_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT * FROM view_3_tab1_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT pk FROM tab1 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_376

statement ok
DROP VIEW view_2_tab1_376

statement ok
DROP VIEW view_3_tab1_376

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_376 AS SELECT pk, col0 FROM tab2 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))

statement ok
CREATE VIEW view_2_tab2_376 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))

statement ok
CREATE VIEW view_3_tab2_376 AS SELECT pk FROM view_1_tab2_376

query II rowsort label-0-1
SELECT pk, col0 FROM tab2 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab2_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab2_376
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_376 UNION ALL SELECT pk, col0 FROM view_2_tab2_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_376 UNION SELECT pk, col0 FROM view_2_tab2_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) ) AS tab2_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT * FROM view_3_tab2_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT pk FROM tab2 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_376

statement ok
DROP VIEW view_2_tab2_376

statement ok
DROP VIEW view_3_tab2_376

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_376 AS SELECT pk, col0 FROM tab3 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))

statement ok
CREATE VIEW view_2_tab3_376 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))

statement ok
CREATE VIEW view_3_tab3_376 AS SELECT pk FROM view_1_tab3_376

query II rowsort label-0-1
SELECT pk, col0 FROM tab3 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab3_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab3_376
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_376 UNION ALL SELECT pk, col0 FROM view_2_tab3_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_376 UNION SELECT pk, col0 FROM view_2_tab3_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) ) AS tab3_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT * FROM view_3_tab3_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT pk FROM tab3 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_376

statement ok
DROP VIEW view_2_tab3_376

statement ok
DROP VIEW view_3_tab3_376

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_376 AS SELECT pk, col0 FROM tab4 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))

statement ok
CREATE VIEW view_2_tab4_376 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))

statement ok
CREATE VIEW view_3_tab4_376 AS SELECT pk FROM view_1_tab4_376

query II rowsort label-0-1
SELECT pk, col0 FROM tab4 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----

query II rowsort label-0-1
SELECT pk, col0 FROM view_1_tab4_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-0-2
SELECT pk, col0 FROM view_2_tab4_376
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_376 UNION ALL SELECT pk, col0 FROM view_2_tab4_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_376 UNION SELECT pk, col0 FROM view_2_tab4_376
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-0-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80))) ) AS tab4_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT * FROM view_3_tab4_376
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-0-3
SELECT pk FROM tab4 WHERE col3 = 22 OR (col0 <= 44 OR col3 >= 14 AND col0 <= 14) OR col1 IS NULL AND (col3 < 82 OR col4 IS NULL OR col3 > 4 AND col4 >= 63.44) AND col0 <= 78 OR (col0 >= 43) OR (col1 > 80.15) OR col3 IN (71,67,63) AND ((col4 > 77.87)) AND col0 < 92 OR ((col4 IS NULL)) OR col0 = 8 AND (col3 < 29 AND col0 < 99) AND col1 > 82.0 AND col0 < 61 AND col0 <= 27 AND col1 > 9.48 AND col0 < 87 AND col1 > 20.64 AND col3 < 77 AND col4 = 56.19 OR col3 >= 70 OR (((col3 = 37 AND col0 = 91) AND (col4 < 63.80)))
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_376

statement ok
DROP VIEW view_2_tab4_376

statement ok
DROP VIEW view_3_tab4_376

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_377 AS SELECT pk, col0 FROM tab0 WHERE (col0 > 66)

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

statement ok
CREATE VIEW view_3_tab0_377 AS SELECT pk FROM view_1_tab0_377

query II rowsort label-100-1
SELECT pk, col0 FROM tab0 WHERE (col0 > 66)
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 > 66))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab0_377
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab0_377
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_377 UNION ALL SELECT pk, col0 FROM view_2_tab0_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_377 UNION SELECT pk, col0 FROM view_2_tab0_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 > 66) ) AS tab0_377
----
1
5
8
9

query I rowsort label-100-3
SELECT * FROM view_3_tab0_377
----
1
5
8
9

query I rowsort label-100-3
SELECT pk FROM tab0 WHERE (col0 > 66)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab0_377

statement ok
DROP VIEW view_2_tab0_377

statement ok
DROP VIEW view_3_tab0_377

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_377 AS SELECT pk, col0 FROM tab1 WHERE (col0 > 66)

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

statement ok
CREATE VIEW view_3_tab1_377 AS SELECT pk FROM view_1_tab1_377

query II rowsort label-100-1
SELECT pk, col0 FROM tab1 WHERE (col0 > 66)
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 > 66))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab1_377
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab1_377
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_377 UNION ALL SELECT pk, col0 FROM view_2_tab1_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_377 UNION SELECT pk, col0 FROM view_2_tab1_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 > 66) ) AS tab1_377
----
1
5
8
9

query I rowsort label-100-3
SELECT * FROM view_3_tab1_377
----
1
5
8
9

query I rowsort label-100-3
SELECT pk FROM tab1 WHERE (col0 > 66)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab1_377

statement ok
DROP VIEW view_2_tab1_377

statement ok
DROP VIEW view_3_tab1_377

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_377 AS SELECT pk, col0 FROM tab2 WHERE (col0 > 66)

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

statement ok
CREATE VIEW view_3_tab2_377 AS SELECT pk FROM view_1_tab2_377

query II rowsort label-100-1
SELECT pk, col0 FROM tab2 WHERE (col0 > 66)
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 > 66))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab2_377
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab2_377
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_377 UNION ALL SELECT pk, col0 FROM view_2_tab2_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_377 UNION SELECT pk, col0 FROM view_2_tab2_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 > 66) ) AS tab2_377
----
1
5
8
9

query I rowsort label-100-3
SELECT * FROM view_3_tab2_377
----
1
5
8
9

query I rowsort label-100-3
SELECT pk FROM tab2 WHERE (col0 > 66)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab2_377

statement ok
DROP VIEW view_2_tab2_377

statement ok
DROP VIEW view_3_tab2_377

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_377 AS SELECT pk, col0 FROM tab3 WHERE (col0 > 66)

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

statement ok
CREATE VIEW view_3_tab3_377 AS SELECT pk FROM view_1_tab3_377

query II rowsort label-100-1
SELECT pk, col0 FROM tab3 WHERE (col0 > 66)
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 > 66))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab3_377
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab3_377
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_377 UNION ALL SELECT pk, col0 FROM view_2_tab3_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_377 UNION SELECT pk, col0 FROM view_2_tab3_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 > 66) ) AS tab3_377
----
1
5
8
9

query I rowsort label-100-3
SELECT * FROM view_3_tab3_377
----
1
5
8
9

query I rowsort label-100-3
SELECT pk FROM tab3 WHERE (col0 > 66)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab3_377

statement ok
DROP VIEW view_2_tab3_377

statement ok
DROP VIEW view_3_tab3_377

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_377 AS SELECT pk, col0 FROM tab4 WHERE (col0 > 66)

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

statement ok
CREATE VIEW view_3_tab4_377 AS SELECT pk FROM view_1_tab4_377

query II rowsort label-100-1
SELECT pk, col0 FROM tab4 WHERE (col0 > 66)
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 > 66))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-100-1
SELECT pk, col0 FROM view_1_tab4_377
----
1
72
5
85
8
94
9
95

query II rowsort label-100-2
SELECT pk, col0 FROM view_2_tab4_377
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_377 UNION ALL SELECT pk, col0 FROM view_2_tab4_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_377 UNION SELECT pk, col0 FROM view_2_tab4_377
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 > 66) ) AS tab4_377
----
1
5
8
9

query I rowsort label-100-3
SELECT * FROM view_3_tab4_377
----
1
5
8
9

query I rowsort label-100-3
SELECT pk FROM tab4 WHERE (col0 > 66)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab4_377

statement ok
DROP VIEW view_2_tab4_377

statement ok
DROP VIEW view_3_tab4_377

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_378 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)

statement ok
CREATE VIEW view_2_tab0_378 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))

statement ok
CREATE VIEW view_3_tab0_378 AS SELECT pk FROM view_1_tab0_378

query II rowsort label-200-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab0_378
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab0_378
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_378 UNION ALL SELECT pk, col0 FROM view_2_tab0_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_378 UNION SELECT pk, col0 FROM view_2_tab0_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) ) AS tab0_378
----
2

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

query I rowsort label-200-3
SELECT pk FROM tab0 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2

statement ok
DROP VIEW view_1_tab0_378

statement ok
DROP VIEW view_2_tab0_378

statement ok
DROP VIEW view_3_tab0_378

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_378 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)

statement ok
CREATE VIEW view_2_tab1_378 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))

statement ok
CREATE VIEW view_3_tab1_378 AS SELECT pk FROM view_1_tab1_378

query II rowsort label-200-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab1_378
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab1_378
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_378 UNION ALL SELECT pk, col0 FROM view_2_tab1_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_378 UNION SELECT pk, col0 FROM view_2_tab1_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) ) AS tab1_378
----
2

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

query I rowsort label-200-3
SELECT pk FROM tab1 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2

statement ok
DROP VIEW view_1_tab1_378

statement ok
DROP VIEW view_2_tab1_378

statement ok
DROP VIEW view_3_tab1_378

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_378 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)

statement ok
CREATE VIEW view_2_tab2_378 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))

statement ok
CREATE VIEW view_3_tab2_378 AS SELECT pk FROM view_1_tab2_378

query II rowsort label-200-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab2_378
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab2_378
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_378 UNION ALL SELECT pk, col0 FROM view_2_tab2_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_378 UNION SELECT pk, col0 FROM view_2_tab2_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) ) AS tab2_378
----
2

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

query I rowsort label-200-3
SELECT pk FROM tab2 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2

statement ok
DROP VIEW view_1_tab2_378

statement ok
DROP VIEW view_2_tab2_378

statement ok
DROP VIEW view_3_tab2_378

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_378 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)

statement ok
CREATE VIEW view_2_tab3_378 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))

statement ok
CREATE VIEW view_3_tab3_378 AS SELECT pk FROM view_1_tab3_378

query II rowsort label-200-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab3_378
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab3_378
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_378 UNION ALL SELECT pk, col0 FROM view_2_tab3_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_378 UNION SELECT pk, col0 FROM view_2_tab3_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) ) AS tab3_378
----
2

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

query I rowsort label-200-3
SELECT pk FROM tab3 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2

statement ok
DROP VIEW view_1_tab3_378

statement ok
DROP VIEW view_2_tab3_378

statement ok
DROP VIEW view_3_tab3_378

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_378 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)

statement ok
CREATE VIEW view_2_tab4_378 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))

statement ok
CREATE VIEW view_3_tab4_378 AS SELECT pk FROM view_1_tab4_378

query II rowsort label-200-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-200-1
SELECT pk, col0 FROM view_1_tab4_378
----
2
52

query II rowsort label-200-2
SELECT pk, col0 FROM view_2_tab4_378
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_378 UNION ALL SELECT pk, col0 FROM view_2_tab4_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_378 UNION SELECT pk, col0 FROM view_2_tab4_378
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82) ) AS tab4_378
----
2

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

query I rowsort label-200-3
SELECT pk FROM tab4 WHERE col3 <= 6 OR col3 IS NULL AND (col3 >= 41 AND col0 < 82)
----
2

statement ok
DROP VIEW view_1_tab4_378

statement ok
DROP VIEW view_2_tab4_378

statement ok
DROP VIEW view_3_tab4_378

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_379 AS SELECT pk, col0 FROM tab0 WHERE ((col0 > 85) OR ((col0 < 81)))

statement ok
CREATE VIEW view_2_tab0_379 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 85) OR ((col0 < 81))))

statement ok
CREATE VIEW view_3_tab0_379 AS SELECT pk FROM view_1_tab0_379

query II rowsort label-300-1
SELECT pk, col0 FROM tab0 WHERE ((col0 > 85) OR ((col0 < 81)))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
5
85

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab0_379
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab0_379
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 85) OR ((col0 < 81))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_379 UNION ALL SELECT pk, col0 FROM view_2_tab0_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 85) OR ((col0 < 81))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_379 UNION SELECT pk, col0 FROM view_2_tab0_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 > 85) OR ((col0 < 81))) ) AS tab0_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT * FROM view_3_tab0_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT pk FROM tab0 WHERE ((col0 > 85) OR ((col0 < 81)))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab0_379

statement ok
DROP VIEW view_2_tab0_379

statement ok
DROP VIEW view_3_tab0_379

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_379 AS SELECT pk, col0 FROM tab1 WHERE ((col0 > 85) OR ((col0 < 81)))

statement ok
CREATE VIEW view_2_tab1_379 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 85) OR ((col0 < 81))))

statement ok
CREATE VIEW view_3_tab1_379 AS SELECT pk FROM view_1_tab1_379

query II rowsort label-300-1
SELECT pk, col0 FROM tab1 WHERE ((col0 > 85) OR ((col0 < 81)))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
5
85

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab1_379
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab1_379
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 85) OR ((col0 < 81))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_379 UNION ALL SELECT pk, col0 FROM view_2_tab1_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 85) OR ((col0 < 81))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_379 UNION SELECT pk, col0 FROM view_2_tab1_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 > 85) OR ((col0 < 81))) ) AS tab1_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT * FROM view_3_tab1_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT pk FROM tab1 WHERE ((col0 > 85) OR ((col0 < 81)))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab1_379

statement ok
DROP VIEW view_2_tab1_379

statement ok
DROP VIEW view_3_tab1_379

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_379 AS SELECT pk, col0 FROM tab2 WHERE ((col0 > 85) OR ((col0 < 81)))

statement ok
CREATE VIEW view_2_tab2_379 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 85) OR ((col0 < 81))))

statement ok
CREATE VIEW view_3_tab2_379 AS SELECT pk FROM view_1_tab2_379

query II rowsort label-300-1
SELECT pk, col0 FROM tab2 WHERE ((col0 > 85) OR ((col0 < 81)))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
5
85

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab2_379
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab2_379
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 85) OR ((col0 < 81))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_379 UNION ALL SELECT pk, col0 FROM view_2_tab2_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 85) OR ((col0 < 81))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_379 UNION SELECT pk, col0 FROM view_2_tab2_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 > 85) OR ((col0 < 81))) ) AS tab2_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT * FROM view_3_tab2_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT pk FROM tab2 WHERE ((col0 > 85) OR ((col0 < 81)))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab2_379

statement ok
DROP VIEW view_2_tab2_379

statement ok
DROP VIEW view_3_tab2_379

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_379 AS SELECT pk, col0 FROM tab3 WHERE ((col0 > 85) OR ((col0 < 81)))

statement ok
CREATE VIEW view_2_tab3_379 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 85) OR ((col0 < 81))))

statement ok
CREATE VIEW view_3_tab3_379 AS SELECT pk FROM view_1_tab3_379

query II rowsort label-300-1
SELECT pk, col0 FROM tab3 WHERE ((col0 > 85) OR ((col0 < 81)))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
5
85

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab3_379
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab3_379
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 85) OR ((col0 < 81))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_379 UNION ALL SELECT pk, col0 FROM view_2_tab3_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 85) OR ((col0 < 81))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_379 UNION SELECT pk, col0 FROM view_2_tab3_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 > 85) OR ((col0 < 81))) ) AS tab3_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT * FROM view_3_tab3_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT pk FROM tab3 WHERE ((col0 > 85) OR ((col0 < 81)))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab3_379

statement ok
DROP VIEW view_2_tab3_379

statement ok
DROP VIEW view_3_tab3_379

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_379 AS SELECT pk, col0 FROM tab4 WHERE ((col0 > 85) OR ((col0 < 81)))

statement ok
CREATE VIEW view_2_tab4_379 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 85) OR ((col0 < 81))))

statement ok
CREATE VIEW view_3_tab4_379 AS SELECT pk FROM view_1_tab4_379

query II rowsort label-300-1
SELECT pk, col0 FROM tab4 WHERE ((col0 > 85) OR ((col0 < 81)))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
5
85

query II rowsort label-300-1
SELECT pk, col0 FROM view_1_tab4_379
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-300-2
SELECT pk, col0 FROM view_2_tab4_379
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 85) OR ((col0 < 81))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_379 UNION ALL SELECT pk, col0 FROM view_2_tab4_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 85) OR ((col0 < 81))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 85) OR ((col0 < 81))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_379 UNION SELECT pk, col0 FROM view_2_tab4_379
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 > 85) OR ((col0 < 81))) ) AS tab4_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT * FROM view_3_tab4_379
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-300-3
SELECT pk FROM tab4 WHERE ((col0 > 85) OR ((col0 < 81)))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab4_379

statement ok
DROP VIEW view_2_tab4_379

statement ok
DROP VIEW view_3_tab4_379

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab0_380 AS SELECT pk FROM view_1_tab0_380

query II rowsort label-400-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 92)
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 92))
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab0_380
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab0_380
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_380 UNION ALL SELECT pk, col0 FROM view_2_tab0_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_380 UNION SELECT pk, col0 FROM view_2_tab0_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 92) ) AS tab0_380
----
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab0_380
----
8
9

query I rowsort label-400-3
SELECT pk FROM tab0 WHERE (col0 >= 92)
----
8
9

statement ok
DROP VIEW view_1_tab0_380

statement ok
DROP VIEW view_2_tab0_380

statement ok
DROP VIEW view_3_tab0_380

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab1_380 AS SELECT pk FROM view_1_tab1_380

query II rowsort label-400-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 92)
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 92))
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab1_380
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab1_380
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_380 UNION ALL SELECT pk, col0 FROM view_2_tab1_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_380 UNION SELECT pk, col0 FROM view_2_tab1_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 92) ) AS tab1_380
----
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab1_380
----
8
9

query I rowsort label-400-3
SELECT pk FROM tab1 WHERE (col0 >= 92)
----
8
9

statement ok
DROP VIEW view_1_tab1_380

statement ok
DROP VIEW view_2_tab1_380

statement ok
DROP VIEW view_3_tab1_380

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab2_380 AS SELECT pk FROM view_1_tab2_380

query II rowsort label-400-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 92)
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 92))
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab2_380
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab2_380
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_380 UNION ALL SELECT pk, col0 FROM view_2_tab2_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_380 UNION SELECT pk, col0 FROM view_2_tab2_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 92) ) AS tab2_380
----
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab2_380
----
8
9

query I rowsort label-400-3
SELECT pk FROM tab2 WHERE (col0 >= 92)
----
8
9

statement ok
DROP VIEW view_1_tab2_380

statement ok
DROP VIEW view_2_tab2_380

statement ok
DROP VIEW view_3_tab2_380

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab3_380 AS SELECT pk FROM view_1_tab3_380

query II rowsort label-400-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 92)
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 92))
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab3_380
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab3_380
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_380 UNION ALL SELECT pk, col0 FROM view_2_tab3_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_380 UNION SELECT pk, col0 FROM view_2_tab3_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 92) ) AS tab3_380
----
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab3_380
----
8
9

query I rowsort label-400-3
SELECT pk FROM tab3 WHERE (col0 >= 92)
----
8
9

statement ok
DROP VIEW view_1_tab3_380

statement ok
DROP VIEW view_2_tab3_380

statement ok
DROP VIEW view_3_tab3_380

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab4_380 AS SELECT pk FROM view_1_tab4_380

query II rowsort label-400-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 92)
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 92))
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-400-1
SELECT pk, col0 FROM view_1_tab4_380
----
8
94
9
95

query II rowsort label-400-2
SELECT pk, col0 FROM view_2_tab4_380
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_380 UNION ALL SELECT pk, col0 FROM view_2_tab4_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_380 UNION SELECT pk, col0 FROM view_2_tab4_380
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 92) ) AS tab4_380
----
8
9

query I rowsort label-400-3
SELECT * FROM view_3_tab4_380
----
8
9

query I rowsort label-400-3
SELECT pk FROM tab4 WHERE (col0 >= 92)
----
8
9

statement ok
DROP VIEW view_1_tab4_380

statement ok
DROP VIEW view_2_tab4_380

statement ok
DROP VIEW view_3_tab4_380

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_381 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))

statement ok
CREATE VIEW view_2_tab0_381 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))

statement ok
CREATE VIEW view_3_tab0_381 AS SELECT pk FROM view_1_tab0_381

query II rowsort label-500-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab0_381
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab0_381
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_381 UNION ALL SELECT pk, col0 FROM view_2_tab0_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_381 UNION SELECT pk, col0 FROM view_2_tab0_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) ) AS tab0_381
----
0
8

query I rowsort label-500-3
SELECT * FROM view_3_tab0_381
----
0
8

query I rowsort label-500-3
SELECT pk FROM tab0 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
8

statement ok
DROP VIEW view_1_tab0_381

statement ok
DROP VIEW view_2_tab0_381

statement ok
DROP VIEW view_3_tab0_381

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_381 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))

statement ok
CREATE VIEW view_2_tab1_381 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))

statement ok
CREATE VIEW view_3_tab1_381 AS SELECT pk FROM view_1_tab1_381

query II rowsort label-500-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab1_381
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab1_381
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_381 UNION ALL SELECT pk, col0 FROM view_2_tab1_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_381 UNION SELECT pk, col0 FROM view_2_tab1_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) ) AS tab1_381
----
0
8

query I rowsort label-500-3
SELECT * FROM view_3_tab1_381
----
0
8

query I rowsort label-500-3
SELECT pk FROM tab1 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
8

statement ok
DROP VIEW view_1_tab1_381

statement ok
DROP VIEW view_2_tab1_381

statement ok
DROP VIEW view_3_tab1_381

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_381 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))

statement ok
CREATE VIEW view_2_tab2_381 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))

statement ok
CREATE VIEW view_3_tab2_381 AS SELECT pk FROM view_1_tab2_381

query II rowsort label-500-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab2_381
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab2_381
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_381 UNION ALL SELECT pk, col0 FROM view_2_tab2_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_381 UNION SELECT pk, col0 FROM view_2_tab2_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) ) AS tab2_381
----
0
8

query I rowsort label-500-3
SELECT * FROM view_3_tab2_381
----
0
8

query I rowsort label-500-3
SELECT pk FROM tab2 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
8

statement ok
DROP VIEW view_1_tab2_381

statement ok
DROP VIEW view_2_tab2_381

statement ok
DROP VIEW view_3_tab2_381

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_381 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))

statement ok
CREATE VIEW view_2_tab3_381 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))

statement ok
CREATE VIEW view_3_tab3_381 AS SELECT pk FROM view_1_tab3_381

query II rowsort label-500-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab3_381
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab3_381
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_381 UNION ALL SELECT pk, col0 FROM view_2_tab3_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_381 UNION SELECT pk, col0 FROM view_2_tab3_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) ) AS tab3_381
----
0
8

query I rowsort label-500-3
SELECT * FROM view_3_tab3_381
----
0
8

query I rowsort label-500-3
SELECT pk FROM tab3 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
8

statement ok
DROP VIEW view_1_tab3_381

statement ok
DROP VIEW view_2_tab3_381

statement ok
DROP VIEW view_3_tab3_381

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_381 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))

statement ok
CREATE VIEW view_2_tab4_381 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))

statement ok
CREATE VIEW view_3_tab4_381 AS SELECT pk FROM view_1_tab4_381

query II rowsort label-500-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-500-1
SELECT pk, col0 FROM view_1_tab4_381
----
0
60
8
94

query II rowsort label-500-2
SELECT pk, col0 FROM view_2_tab4_381
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_381 UNION ALL SELECT pk, col0 FROM view_2_tab4_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_381 UNION SELECT pk, col0 FROM view_2_tab4_381
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46)))) ) AS tab4_381
----
0
8

query I rowsort label-500-3
SELECT * FROM view_3_tab4_381
----
0
8

query I rowsort label-500-3
SELECT pk FROM tab4 WHERE col0 >= 14 AND ((col4 > 68.52)) AND (((col1 IN (20.80,16.93,55.21,10.11) AND col1 > 40.68 AND (col1 > 60.87 AND col0 <= 99 AND col1 < 27.46 AND col0 > 81 OR (col3 BETWEEN 67 AND 78)) OR ((col0 IN (35,37,68,83,4))) OR ((col3 > 62))) AND (col0 > 38) OR (col3 IN (40,6,38,61,46))))
----
0
8

statement ok
DROP VIEW view_1_tab4_381

statement ok
DROP VIEW view_2_tab4_381

statement ok
DROP VIEW view_3_tab4_381

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_382 AS SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94

statement ok
CREATE VIEW view_2_tab0_382 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)

statement ok
CREATE VIEW view_3_tab0_382 AS SELECT pk FROM view_1_tab0_382

query II rowsort label-600-1
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab0_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_382 UNION ALL SELECT pk, col0 FROM view_2_tab0_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_382 UNION SELECT pk, col0 FROM view_2_tab0_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 ) AS tab0_382
----

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

query I rowsort label-600-3
SELECT pk FROM tab0 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

statement ok
DROP VIEW view_1_tab0_382

statement ok
DROP VIEW view_2_tab0_382

statement ok
DROP VIEW view_3_tab0_382

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_382 AS SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94

statement ok
CREATE VIEW view_2_tab1_382 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)

statement ok
CREATE VIEW view_3_tab1_382 AS SELECT pk FROM view_1_tab1_382

query II rowsort label-600-1
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab1_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_382 UNION ALL SELECT pk, col0 FROM view_2_tab1_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_382 UNION SELECT pk, col0 FROM view_2_tab1_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 ) AS tab1_382
----

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

query I rowsort label-600-3
SELECT pk FROM tab1 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

statement ok
DROP VIEW view_1_tab1_382

statement ok
DROP VIEW view_2_tab1_382

statement ok
DROP VIEW view_3_tab1_382

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_382 AS SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94

statement ok
CREATE VIEW view_2_tab2_382 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)

statement ok
CREATE VIEW view_3_tab2_382 AS SELECT pk FROM view_1_tab2_382

query II rowsort label-600-1
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab2_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_382 UNION ALL SELECT pk, col0 FROM view_2_tab2_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_382 UNION SELECT pk, col0 FROM view_2_tab2_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 ) AS tab2_382
----

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

query I rowsort label-600-3
SELECT pk FROM tab2 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

statement ok
DROP VIEW view_1_tab2_382

statement ok
DROP VIEW view_2_tab2_382

statement ok
DROP VIEW view_3_tab2_382

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_382 AS SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94

statement ok
CREATE VIEW view_2_tab3_382 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)

statement ok
CREATE VIEW view_3_tab3_382 AS SELECT pk FROM view_1_tab3_382

query II rowsort label-600-1
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab3_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_382 UNION ALL SELECT pk, col0 FROM view_2_tab3_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_382 UNION SELECT pk, col0 FROM view_2_tab3_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 ) AS tab3_382
----

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

query I rowsort label-600-3
SELECT pk FROM tab3 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

statement ok
DROP VIEW view_1_tab3_382

statement ok
DROP VIEW view_2_tab3_382

statement ok
DROP VIEW view_3_tab3_382

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_382 AS SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94

statement ok
CREATE VIEW view_2_tab4_382 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)

statement ok
CREATE VIEW view_3_tab4_382 AS SELECT pk FROM view_1_tab4_382

query II rowsort label-600-1
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

query II rowsort label-600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-600-2
SELECT pk, col0 FROM view_2_tab4_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_382 UNION ALL SELECT pk, col0 FROM view_2_tab4_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_382 UNION SELECT pk, col0 FROM view_2_tab4_382
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94 ) AS tab4_382
----

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

query I rowsort label-600-3
SELECT pk FROM tab4 WHERE col0 BETWEEN 27 AND 50 AND col1 > 18.58 AND col4 > 13.94
----

statement ok
DROP VIEW view_1_tab4_382

statement ok
DROP VIEW view_2_tab4_382

statement ok
DROP VIEW view_3_tab4_382

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab0_383 AS SELECT pk FROM view_1_tab0_383

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

query II rowsort label-700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 = 94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab0_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_383 UNION ALL SELECT pk, col0 FROM view_2_tab0_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_383 UNION SELECT pk, col0 FROM view_2_tab0_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 = 94 ) AS tab0_383
----

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

query I rowsort label-700-3
SELECT pk FROM tab0 WHERE col3 = 94
----

statement ok
DROP VIEW view_1_tab0_383

statement ok
DROP VIEW view_2_tab0_383

statement ok
DROP VIEW view_3_tab0_383

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab1_383 AS SELECT pk FROM view_1_tab1_383

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

query II rowsort label-700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 = 94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab1_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_383 UNION ALL SELECT pk, col0 FROM view_2_tab1_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_383 UNION SELECT pk, col0 FROM view_2_tab1_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 = 94 ) AS tab1_383
----

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

query I rowsort label-700-3
SELECT pk FROM tab1 WHERE col3 = 94
----

statement ok
DROP VIEW view_1_tab1_383

statement ok
DROP VIEW view_2_tab1_383

statement ok
DROP VIEW view_3_tab1_383

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab2_383 AS SELECT pk FROM view_1_tab2_383

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

query II rowsort label-700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 = 94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab2_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_383 UNION ALL SELECT pk, col0 FROM view_2_tab2_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_383 UNION SELECT pk, col0 FROM view_2_tab2_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 = 94 ) AS tab2_383
----

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

query I rowsort label-700-3
SELECT pk FROM tab2 WHERE col3 = 94
----

statement ok
DROP VIEW view_1_tab2_383

statement ok
DROP VIEW view_2_tab2_383

statement ok
DROP VIEW view_3_tab2_383

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab3_383 AS SELECT pk FROM view_1_tab3_383

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

query II rowsort label-700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 = 94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab3_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_383 UNION ALL SELECT pk, col0 FROM view_2_tab3_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_383 UNION SELECT pk, col0 FROM view_2_tab3_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 = 94 ) AS tab3_383
----

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

query I rowsort label-700-3
SELECT pk FROM tab3 WHERE col3 = 94
----

statement ok
DROP VIEW view_1_tab3_383

statement ok
DROP VIEW view_2_tab3_383

statement ok
DROP VIEW view_3_tab3_383

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

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

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

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

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

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

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

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

statement ok
CREATE VIEW view_3_tab4_383 AS SELECT pk FROM view_1_tab4_383

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

query II rowsort label-700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 = 94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-700-2
SELECT pk, col0 FROM view_2_tab4_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_383 UNION ALL SELECT pk, col0 FROM view_2_tab4_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_383 UNION SELECT pk, col0 FROM view_2_tab4_383
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 = 94 ) AS tab4_383
----

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

query I rowsort label-700-3
SELECT pk FROM tab4 WHERE col3 = 94
----

statement ok
DROP VIEW view_1_tab4_383

statement ok
DROP VIEW view_2_tab4_383

statement ok
DROP VIEW view_3_tab4_383

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_384 AS SELECT pk, col0 FROM tab0 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))

statement ok
CREATE VIEW view_2_tab0_384 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))

statement ok
CREATE VIEW view_3_tab0_384 AS SELECT pk FROM view_1_tab0_384

query II rowsort label-800-1
SELECT pk, col0 FROM tab0 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab0_384
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab0_384
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_384 UNION ALL SELECT pk, col0 FROM view_2_tab0_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_384 UNION SELECT pk, col0 FROM view_2_tab0_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) ) AS tab0_384
----
2

query I rowsort label-800-3
SELECT * FROM view_3_tab0_384
----
2

query I rowsort label-800-3
SELECT pk FROM tab0 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2

statement ok
DROP VIEW view_1_tab0_384

statement ok
DROP VIEW view_2_tab0_384

statement ok
DROP VIEW view_3_tab0_384

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_384 AS SELECT pk, col0 FROM tab1 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))

statement ok
CREATE VIEW view_2_tab1_384 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))

statement ok
CREATE VIEW view_3_tab1_384 AS SELECT pk FROM view_1_tab1_384

query II rowsort label-800-1
SELECT pk, col0 FROM tab1 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab1_384
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab1_384
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_384 UNION ALL SELECT pk, col0 FROM view_2_tab1_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_384 UNION SELECT pk, col0 FROM view_2_tab1_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) ) AS tab1_384
----
2

query I rowsort label-800-3
SELECT * FROM view_3_tab1_384
----
2

query I rowsort label-800-3
SELECT pk FROM tab1 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2

statement ok
DROP VIEW view_1_tab1_384

statement ok
DROP VIEW view_2_tab1_384

statement ok
DROP VIEW view_3_tab1_384

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_384 AS SELECT pk, col0 FROM tab2 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))

statement ok
CREATE VIEW view_2_tab2_384 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))

statement ok
CREATE VIEW view_3_tab2_384 AS SELECT pk FROM view_1_tab2_384

query II rowsort label-800-1
SELECT pk, col0 FROM tab2 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab2_384
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab2_384
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_384 UNION ALL SELECT pk, col0 FROM view_2_tab2_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_384 UNION SELECT pk, col0 FROM view_2_tab2_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) ) AS tab2_384
----
2

query I rowsort label-800-3
SELECT * FROM view_3_tab2_384
----
2

query I rowsort label-800-3
SELECT pk FROM tab2 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2

statement ok
DROP VIEW view_1_tab2_384

statement ok
DROP VIEW view_2_tab2_384

statement ok
DROP VIEW view_3_tab2_384

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_384 AS SELECT pk, col0 FROM tab3 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))

statement ok
CREATE VIEW view_2_tab3_384 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))

statement ok
CREATE VIEW view_3_tab3_384 AS SELECT pk FROM view_1_tab3_384

query II rowsort label-800-1
SELECT pk, col0 FROM tab3 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab3_384
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab3_384
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_384 UNION ALL SELECT pk, col0 FROM view_2_tab3_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_384 UNION SELECT pk, col0 FROM view_2_tab3_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) ) AS tab3_384
----
2

query I rowsort label-800-3
SELECT * FROM view_3_tab3_384
----
2

query I rowsort label-800-3
SELECT pk FROM tab3 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2

statement ok
DROP VIEW view_1_tab3_384

statement ok
DROP VIEW view_2_tab3_384

statement ok
DROP VIEW view_3_tab3_384

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_384 AS SELECT pk, col0 FROM tab4 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))

statement ok
CREATE VIEW view_2_tab4_384 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))

statement ok
CREATE VIEW view_3_tab4_384 AS SELECT pk FROM view_1_tab4_384

query II rowsort label-800-1
SELECT pk, col0 FROM tab4 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-800-1
SELECT pk, col0 FROM view_1_tab4_384
----
2
52

query II rowsort label-800-2
SELECT pk, col0 FROM view_2_tab4_384
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_384 UNION ALL SELECT pk, col0 FROM view_2_tab4_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 < 73 AND col1 > 96.67 OR col3 < 2))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_384 UNION SELECT pk, col0 FROM view_2_tab4_384
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2))) ) AS tab4_384
----
2

query I rowsort label-800-3
SELECT * FROM view_3_tab4_384
----
2

query I rowsort label-800-3
SELECT pk FROM tab4 WHERE (((col0 < 73 AND col1 > 96.67 OR col3 < 2)))
----
2

statement ok
DROP VIEW view_1_tab4_384

statement ok
DROP VIEW view_2_tab4_384

statement ok
DROP VIEW view_3_tab4_384

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_385 AS SELECT pk, col0 FROM tab0 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)

statement ok
CREATE VIEW view_2_tab0_385 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))

statement ok
CREATE VIEW view_3_tab0_385 AS SELECT pk FROM view_1_tab0_385

query II rowsort label-900-1
SELECT pk, col0 FROM tab0 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab0_385
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab0_385
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_385 UNION ALL SELECT pk, col0 FROM view_2_tab0_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_385 UNION SELECT pk, col0 FROM view_2_tab0_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) ) AS tab0_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT * FROM view_3_tab0_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT pk FROM tab0 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab0_385

statement ok
DROP VIEW view_2_tab0_385

statement ok
DROP VIEW view_3_tab0_385

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_385 AS SELECT pk, col0 FROM tab1 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)

statement ok
CREATE VIEW view_2_tab1_385 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))

statement ok
CREATE VIEW view_3_tab1_385 AS SELECT pk FROM view_1_tab1_385

query II rowsort label-900-1
SELECT pk, col0 FROM tab1 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab1_385
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab1_385
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_385 UNION ALL SELECT pk, col0 FROM view_2_tab1_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_385 UNION SELECT pk, col0 FROM view_2_tab1_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) ) AS tab1_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT * FROM view_3_tab1_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT pk FROM tab1 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab1_385

statement ok
DROP VIEW view_2_tab1_385

statement ok
DROP VIEW view_3_tab1_385

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_385 AS SELECT pk, col0 FROM tab2 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)

statement ok
CREATE VIEW view_2_tab2_385 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))

statement ok
CREATE VIEW view_3_tab2_385 AS SELECT pk FROM view_1_tab2_385

query II rowsort label-900-1
SELECT pk, col0 FROM tab2 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab2_385
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab2_385
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_385 UNION ALL SELECT pk, col0 FROM view_2_tab2_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_385 UNION SELECT pk, col0 FROM view_2_tab2_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) ) AS tab2_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT * FROM view_3_tab2_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT pk FROM tab2 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab2_385

statement ok
DROP VIEW view_2_tab2_385

statement ok
DROP VIEW view_3_tab2_385

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_385 AS SELECT pk, col0 FROM tab3 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)

statement ok
CREATE VIEW view_2_tab3_385 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))

statement ok
CREATE VIEW view_3_tab3_385 AS SELECT pk FROM view_1_tab3_385

query II rowsort label-900-1
SELECT pk, col0 FROM tab3 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab3_385
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab3_385
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_385 UNION ALL SELECT pk, col0 FROM view_2_tab3_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_385 UNION SELECT pk, col0 FROM view_2_tab3_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) ) AS tab3_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT * FROM view_3_tab3_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT pk FROM tab3 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab3_385

statement ok
DROP VIEW view_2_tab3_385

statement ok
DROP VIEW view_3_tab3_385

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_385 AS SELECT pk, col0 FROM tab4 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)

statement ok
CREATE VIEW view_2_tab4_385 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))

statement ok
CREATE VIEW view_3_tab4_385 AS SELECT pk FROM view_1_tab4_385

query II rowsort label-900-1
SELECT pk, col0 FROM tab4 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-900-1
SELECT pk, col0 FROM view_1_tab4_385
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-900-2
SELECT pk, col0 FROM view_2_tab4_385
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_385 UNION ALL SELECT pk, col0 FROM view_2_tab4_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_385 UNION SELECT pk, col0 FROM view_2_tab4_385
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15) ) AS tab4_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT * FROM view_3_tab4_385
----
0
2
3
7
9

query I rowsort label-900-3
SELECT pk FROM tab4 WHERE col1 < 50.34 AND ((col0 > 33 OR col4 > 33.73) OR col4 <= 81.77 AND col3 < 17 AND col4 > 8.15)
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab4_385

statement ok
DROP VIEW view_2_tab4_385

statement ok
DROP VIEW view_3_tab4_385

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_386 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 31)

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

statement ok
CREATE VIEW view_3_tab0_386 AS SELECT pk FROM view_1_tab0_386

query II rowsort label-1000-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 31)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 31))
----
2
52
7
17

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab0_386
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab0_386
----
2
52
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_386 UNION ALL SELECT pk, col0 FROM view_2_tab0_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_386 UNION SELECT pk, col0 FROM view_2_tab0_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 31) ) AS tab0_386
----
0
1
3
4
5
6
8
9

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

query I rowsort label-1000-3
SELECT pk FROM tab0 WHERE (col3 >= 31)
----
0
1
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab0_386

statement ok
DROP VIEW view_2_tab0_386

statement ok
DROP VIEW view_3_tab0_386

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_386 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 31)

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

statement ok
CREATE VIEW view_3_tab1_386 AS SELECT pk FROM view_1_tab1_386

query II rowsort label-1000-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 31)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 31))
----
2
52
7
17

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab1_386
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab1_386
----
2
52
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_386 UNION ALL SELECT pk, col0 FROM view_2_tab1_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_386 UNION SELECT pk, col0 FROM view_2_tab1_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 31) ) AS tab1_386
----
0
1
3
4
5
6
8
9

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

query I rowsort label-1000-3
SELECT pk FROM tab1 WHERE (col3 >= 31)
----
0
1
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab1_386

statement ok
DROP VIEW view_2_tab1_386

statement ok
DROP VIEW view_3_tab1_386

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_386 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 31)

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

statement ok
CREATE VIEW view_3_tab2_386 AS SELECT pk FROM view_1_tab2_386

query II rowsort label-1000-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 31)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 31))
----
2
52
7
17

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab2_386
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab2_386
----
2
52
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_386 UNION ALL SELECT pk, col0 FROM view_2_tab2_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_386 UNION SELECT pk, col0 FROM view_2_tab2_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 31) ) AS tab2_386
----
0
1
3
4
5
6
8
9

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

query I rowsort label-1000-3
SELECT pk FROM tab2 WHERE (col3 >= 31)
----
0
1
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab2_386

statement ok
DROP VIEW view_2_tab2_386

statement ok
DROP VIEW view_3_tab2_386

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_386 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 31)

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

statement ok
CREATE VIEW view_3_tab3_386 AS SELECT pk FROM view_1_tab3_386

query II rowsort label-1000-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 31)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 31))
----
2
52
7
17

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab3_386
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab3_386
----
2
52
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_386 UNION ALL SELECT pk, col0 FROM view_2_tab3_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_386 UNION SELECT pk, col0 FROM view_2_tab3_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 31) ) AS tab3_386
----
0
1
3
4
5
6
8
9

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

query I rowsort label-1000-3
SELECT pk FROM tab3 WHERE (col3 >= 31)
----
0
1
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab3_386

statement ok
DROP VIEW view_2_tab3_386

statement ok
DROP VIEW view_3_tab3_386

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_386 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 31)

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

statement ok
CREATE VIEW view_3_tab4_386 AS SELECT pk FROM view_1_tab4_386

query II rowsort label-1000-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 31)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 31))
----
2
52
7
17

query II rowsort label-1000-1
SELECT pk, col0 FROM view_1_tab4_386
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-1000-2
SELECT pk, col0 FROM view_2_tab4_386
----
2
52
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_386 UNION ALL SELECT pk, col0 FROM view_2_tab4_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_386 UNION SELECT pk, col0 FROM view_2_tab4_386
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 31) ) AS tab4_386
----
0
1
3
4
5
6
8
9

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

query I rowsort label-1000-3
SELECT pk FROM tab4 WHERE (col3 >= 31)
----
0
1
3
4
5
6
8
9

statement ok
DROP VIEW view_1_tab4_386

statement ok
DROP VIEW view_2_tab4_386

statement ok
DROP VIEW view_3_tab4_386

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_387 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 72)

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

statement ok
CREATE VIEW view_3_tab0_387 AS SELECT pk FROM view_1_tab0_387

query II rowsort label-1100-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 72)
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 72))
----
0
60
1
72
9
95

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab0_387
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab0_387
----
0
60
1
72
9
95

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_387 UNION ALL SELECT pk, col0 FROM view_2_tab0_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 72) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_387 UNION SELECT pk, col0 FROM view_2_tab0_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 72) ) AS tab0_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT * FROM view_3_tab0_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT pk FROM tab0 WHERE (col3 < 72)
----
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab0_387

statement ok
DROP VIEW view_2_tab0_387

statement ok
DROP VIEW view_3_tab0_387

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_387 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 72)

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

statement ok
CREATE VIEW view_3_tab1_387 AS SELECT pk FROM view_1_tab1_387

query II rowsort label-1100-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 72)
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 72))
----
0
60
1
72
9
95

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab1_387
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab1_387
----
0
60
1
72
9
95

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_387 UNION ALL SELECT pk, col0 FROM view_2_tab1_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 72) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_387 UNION SELECT pk, col0 FROM view_2_tab1_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 72) ) AS tab1_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT * FROM view_3_tab1_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT pk FROM tab1 WHERE (col3 < 72)
----
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab1_387

statement ok
DROP VIEW view_2_tab1_387

statement ok
DROP VIEW view_3_tab1_387

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_387 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 72)

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

statement ok
CREATE VIEW view_3_tab2_387 AS SELECT pk FROM view_1_tab2_387

query II rowsort label-1100-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 72)
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 72))
----
0
60
1
72
9
95

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab2_387
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab2_387
----
0
60
1
72
9
95

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_387 UNION ALL SELECT pk, col0 FROM view_2_tab2_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 72) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_387 UNION SELECT pk, col0 FROM view_2_tab2_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 72) ) AS tab2_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT * FROM view_3_tab2_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT pk FROM tab2 WHERE (col3 < 72)
----
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab2_387

statement ok
DROP VIEW view_2_tab2_387

statement ok
DROP VIEW view_3_tab2_387

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_387 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 72)

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

statement ok
CREATE VIEW view_3_tab3_387 AS SELECT pk FROM view_1_tab3_387

query II rowsort label-1100-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 72)
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 72))
----
0
60
1
72
9
95

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab3_387
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab3_387
----
0
60
1
72
9
95

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_387 UNION ALL SELECT pk, col0 FROM view_2_tab3_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 72) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_387 UNION SELECT pk, col0 FROM view_2_tab3_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 72) ) AS tab3_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT * FROM view_3_tab3_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT pk FROM tab3 WHERE (col3 < 72)
----
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab3_387

statement ok
DROP VIEW view_2_tab3_387

statement ok
DROP VIEW view_3_tab3_387

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_387 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 72)

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

statement ok
CREATE VIEW view_3_tab4_387 AS SELECT pk FROM view_1_tab4_387

query II rowsort label-1100-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 72)
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 72))
----
0
60
1
72
9
95

query II rowsort label-1100-1
SELECT pk, col0 FROM view_1_tab4_387
----
14 values hashing to 017fee861f7d7cdf6ac8cd256b9b753f

query II rowsort label-1100-2
SELECT pk, col0 FROM view_2_tab4_387
----
0
60
1
72
9
95

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_387 UNION ALL SELECT pk, col0 FROM view_2_tab4_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 72) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_387 UNION SELECT pk, col0 FROM view_2_tab4_387
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 72) ) AS tab4_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT * FROM view_3_tab4_387
----
2
3
4
5
6
7
8

query I rowsort label-1100-3
SELECT pk FROM tab4 WHERE (col3 < 72)
----
2
3
4
5
6
7
8

statement ok
DROP VIEW view_1_tab4_387

statement ok
DROP VIEW view_2_tab4_387

statement ok
DROP VIEW view_3_tab4_387

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_388 AS SELECT pk, col0 FROM tab0 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))

statement ok
CREATE VIEW view_2_tab0_388 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))

statement ok
CREATE VIEW view_3_tab0_388 AS SELECT pk FROM view_1_tab0_388

query II rowsort label-1200-1
SELECT pk, col0 FROM tab0 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab0_388
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab0_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_388 UNION ALL SELECT pk, col0 FROM view_2_tab0_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_388 UNION SELECT pk, col0 FROM view_2_tab0_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) ) AS tab0_388
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab0_388
----

query I rowsort label-1200-3
SELECT pk FROM tab0 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

statement ok
DROP VIEW view_1_tab0_388

statement ok
DROP VIEW view_2_tab0_388

statement ok
DROP VIEW view_3_tab0_388

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_388 AS SELECT pk, col0 FROM tab1 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))

statement ok
CREATE VIEW view_2_tab1_388 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))

statement ok
CREATE VIEW view_3_tab1_388 AS SELECT pk FROM view_1_tab1_388

query II rowsort label-1200-1
SELECT pk, col0 FROM tab1 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab1_388
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab1_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_388 UNION ALL SELECT pk, col0 FROM view_2_tab1_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_388 UNION SELECT pk, col0 FROM view_2_tab1_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) ) AS tab1_388
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab1_388
----

query I rowsort label-1200-3
SELECT pk FROM tab1 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

statement ok
DROP VIEW view_1_tab1_388

statement ok
DROP VIEW view_2_tab1_388

statement ok
DROP VIEW view_3_tab1_388

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_388 AS SELECT pk, col0 FROM tab2 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))

statement ok
CREATE VIEW view_2_tab2_388 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))

statement ok
CREATE VIEW view_3_tab2_388 AS SELECT pk FROM view_1_tab2_388

query II rowsort label-1200-1
SELECT pk, col0 FROM tab2 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab2_388
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab2_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_388 UNION ALL SELECT pk, col0 FROM view_2_tab2_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_388 UNION SELECT pk, col0 FROM view_2_tab2_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) ) AS tab2_388
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab2_388
----

query I rowsort label-1200-3
SELECT pk FROM tab2 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

statement ok
DROP VIEW view_1_tab2_388

statement ok
DROP VIEW view_2_tab2_388

statement ok
DROP VIEW view_3_tab2_388

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_388 AS SELECT pk, col0 FROM tab3 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))

statement ok
CREATE VIEW view_2_tab3_388 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))

statement ok
CREATE VIEW view_3_tab3_388 AS SELECT pk FROM view_1_tab3_388

query II rowsort label-1200-1
SELECT pk, col0 FROM tab3 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab3_388
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab3_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_388 UNION ALL SELECT pk, col0 FROM view_2_tab3_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_388 UNION SELECT pk, col0 FROM view_2_tab3_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) ) AS tab3_388
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab3_388
----

query I rowsort label-1200-3
SELECT pk FROM tab3 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

statement ok
DROP VIEW view_1_tab3_388

statement ok
DROP VIEW view_2_tab3_388

statement ok
DROP VIEW view_3_tab3_388

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_388 AS SELECT pk, col0 FROM tab4 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))

statement ok
CREATE VIEW view_2_tab4_388 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))

statement ok
CREATE VIEW view_3_tab4_388 AS SELECT pk FROM view_1_tab4_388

query II rowsort label-1200-1
SELECT pk, col0 FROM tab4 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

query II rowsort label-1200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-1200-1
SELECT pk, col0 FROM view_1_tab4_388
----

query II rowsort label-1200-2
SELECT pk, col0 FROM view_2_tab4_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_388 UNION ALL SELECT pk, col0 FROM view_2_tab4_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_388 UNION SELECT pk, col0 FROM view_2_tab4_388
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32)) ) AS tab4_388
----

query I rowsort label-1200-3
SELECT * FROM view_3_tab4_388
----

query I rowsort label-1200-3
SELECT pk FROM tab4 WHERE (((col1 IN (66.9,97.33)) AND (col1 < 57.59) AND col4 <= 5.32))
----

statement ok
DROP VIEW view_1_tab4_388

statement ok
DROP VIEW view_2_tab4_388

statement ok
DROP VIEW view_3_tab4_388

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_389 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 46

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

statement ok
CREATE VIEW view_3_tab0_389 AS SELECT pk FROM view_1_tab0_389

query II rowsort label-1300-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 46
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 46)
----
3
23
4
18
6
9
7
17

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab0_389
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab0_389
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_389 UNION ALL SELECT pk, col0 FROM view_2_tab0_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_389 UNION SELECT pk, col0 FROM view_2_tab0_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 46 ) AS tab0_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab0_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT pk FROM tab0 WHERE col0 >= 46
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab0_389

statement ok
DROP VIEW view_2_tab0_389

statement ok
DROP VIEW view_3_tab0_389

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_389 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 46

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

statement ok
CREATE VIEW view_3_tab1_389 AS SELECT pk FROM view_1_tab1_389

query II rowsort label-1300-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 46
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 46)
----
3
23
4
18
6
9
7
17

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab1_389
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab1_389
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_389 UNION ALL SELECT pk, col0 FROM view_2_tab1_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_389 UNION SELECT pk, col0 FROM view_2_tab1_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 46 ) AS tab1_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab1_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT pk FROM tab1 WHERE col0 >= 46
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab1_389

statement ok
DROP VIEW view_2_tab1_389

statement ok
DROP VIEW view_3_tab1_389

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_389 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 46

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

statement ok
CREATE VIEW view_3_tab2_389 AS SELECT pk FROM view_1_tab2_389

query II rowsort label-1300-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 46
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 46)
----
3
23
4
18
6
9
7
17

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab2_389
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab2_389
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_389 UNION ALL SELECT pk, col0 FROM view_2_tab2_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_389 UNION SELECT pk, col0 FROM view_2_tab2_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 46 ) AS tab2_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab2_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT pk FROM tab2 WHERE col0 >= 46
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab2_389

statement ok
DROP VIEW view_2_tab2_389

statement ok
DROP VIEW view_3_tab2_389

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_389 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 46

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

statement ok
CREATE VIEW view_3_tab3_389 AS SELECT pk FROM view_1_tab3_389

query II rowsort label-1300-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 46
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 46)
----
3
23
4
18
6
9
7
17

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab3_389
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab3_389
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_389 UNION ALL SELECT pk, col0 FROM view_2_tab3_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_389 UNION SELECT pk, col0 FROM view_2_tab3_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 46 ) AS tab3_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab3_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT pk FROM tab3 WHERE col0 >= 46
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab3_389

statement ok
DROP VIEW view_2_tab3_389

statement ok
DROP VIEW view_3_tab3_389

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_389 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 46

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

statement ok
CREATE VIEW view_3_tab4_389 AS SELECT pk FROM view_1_tab4_389

query II rowsort label-1300-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 46
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 46)
----
3
23
4
18
6
9
7
17

query II rowsort label-1300-1
SELECT pk, col0 FROM view_1_tab4_389
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1300-2
SELECT pk, col0 FROM view_2_tab4_389
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_389 UNION ALL SELECT pk, col0 FROM view_2_tab4_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_389 UNION SELECT pk, col0 FROM view_2_tab4_389
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 46 ) AS tab4_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT * FROM view_3_tab4_389
----
0
1
2
5
8
9

query I rowsort label-1300-3
SELECT pk FROM tab4 WHERE col0 >= 46
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab4_389

statement ok
DROP VIEW view_2_tab4_389

statement ok
DROP VIEW view_3_tab4_389

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_390 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 71

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

statement ok
CREATE VIEW view_3_tab0_390 AS SELECT pk FROM view_1_tab0_390

query II rowsort label-1400-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 71
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 71)
----
1
72
5
85
8
94
9
95

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab0_390
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab0_390
----
1
72
5
85
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_390 UNION ALL SELECT pk, col0 FROM view_2_tab0_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_390 UNION SELECT pk, col0 FROM view_2_tab0_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 71 ) AS tab0_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab0_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT pk FROM tab0 WHERE col0 <= 71
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab0_390

statement ok
DROP VIEW view_2_tab0_390

statement ok
DROP VIEW view_3_tab0_390

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_390 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 71

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

statement ok
CREATE VIEW view_3_tab1_390 AS SELECT pk FROM view_1_tab1_390

query II rowsort label-1400-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 71
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 71)
----
1
72
5
85
8
94
9
95

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab1_390
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab1_390
----
1
72
5
85
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_390 UNION ALL SELECT pk, col0 FROM view_2_tab1_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_390 UNION SELECT pk, col0 FROM view_2_tab1_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 71 ) AS tab1_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab1_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT pk FROM tab1 WHERE col0 <= 71
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab1_390

statement ok
DROP VIEW view_2_tab1_390

statement ok
DROP VIEW view_3_tab1_390

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_390 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 71

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

statement ok
CREATE VIEW view_3_tab2_390 AS SELECT pk FROM view_1_tab2_390

query II rowsort label-1400-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 71
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 71)
----
1
72
5
85
8
94
9
95

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab2_390
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab2_390
----
1
72
5
85
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_390 UNION ALL SELECT pk, col0 FROM view_2_tab2_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_390 UNION SELECT pk, col0 FROM view_2_tab2_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 71 ) AS tab2_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab2_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT pk FROM tab2 WHERE col0 <= 71
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab2_390

statement ok
DROP VIEW view_2_tab2_390

statement ok
DROP VIEW view_3_tab2_390

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_390 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 71

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

statement ok
CREATE VIEW view_3_tab3_390 AS SELECT pk FROM view_1_tab3_390

query II rowsort label-1400-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 71
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 71)
----
1
72
5
85
8
94
9
95

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab3_390
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab3_390
----
1
72
5
85
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_390 UNION ALL SELECT pk, col0 FROM view_2_tab3_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_390 UNION SELECT pk, col0 FROM view_2_tab3_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 71 ) AS tab3_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab3_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT pk FROM tab3 WHERE col0 <= 71
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab3_390

statement ok
DROP VIEW view_2_tab3_390

statement ok
DROP VIEW view_3_tab3_390

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_390 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 71

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

statement ok
CREATE VIEW view_3_tab4_390 AS SELECT pk FROM view_1_tab4_390

query II rowsort label-1400-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 71
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 71)
----
1
72
5
85
8
94
9
95

query II rowsort label-1400-1
SELECT pk, col0 FROM view_1_tab4_390
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1400-2
SELECT pk, col0 FROM view_2_tab4_390
----
1
72
5
85
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_390 UNION ALL SELECT pk, col0 FROM view_2_tab4_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_390 UNION SELECT pk, col0 FROM view_2_tab4_390
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 71 ) AS tab4_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT * FROM view_3_tab4_390
----
0
2
3
4
6
7

query I rowsort label-1400-3
SELECT pk FROM tab4 WHERE col0 <= 71
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab4_390

statement ok
DROP VIEW view_2_tab4_390

statement ok
DROP VIEW view_3_tab4_390

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_391 AS SELECT pk, col0 FROM tab0 WHERE col0 >= 39

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

statement ok
CREATE VIEW view_3_tab0_391 AS SELECT pk FROM view_1_tab0_391

query II rowsort label-1500-1
SELECT pk, col0 FROM tab0 WHERE col0 >= 39
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 >= 39)
----
3
23
4
18
6
9
7
17

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab0_391
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab0_391
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_391 UNION ALL SELECT pk, col0 FROM view_2_tab0_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_391 UNION SELECT pk, col0 FROM view_2_tab0_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 >= 39 ) AS tab0_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab0_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT pk FROM tab0 WHERE col0 >= 39
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab0_391

statement ok
DROP VIEW view_2_tab0_391

statement ok
DROP VIEW view_3_tab0_391

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_391 AS SELECT pk, col0 FROM tab1 WHERE col0 >= 39

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

statement ok
CREATE VIEW view_3_tab1_391 AS SELECT pk FROM view_1_tab1_391

query II rowsort label-1500-1
SELECT pk, col0 FROM tab1 WHERE col0 >= 39
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 >= 39)
----
3
23
4
18
6
9
7
17

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab1_391
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab1_391
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_391 UNION ALL SELECT pk, col0 FROM view_2_tab1_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_391 UNION SELECT pk, col0 FROM view_2_tab1_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 >= 39 ) AS tab1_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab1_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT pk FROM tab1 WHERE col0 >= 39
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab1_391

statement ok
DROP VIEW view_2_tab1_391

statement ok
DROP VIEW view_3_tab1_391

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_391 AS SELECT pk, col0 FROM tab2 WHERE col0 >= 39

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

statement ok
CREATE VIEW view_3_tab2_391 AS SELECT pk FROM view_1_tab2_391

query II rowsort label-1500-1
SELECT pk, col0 FROM tab2 WHERE col0 >= 39
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 >= 39)
----
3
23
4
18
6
9
7
17

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab2_391
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab2_391
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_391 UNION ALL SELECT pk, col0 FROM view_2_tab2_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_391 UNION SELECT pk, col0 FROM view_2_tab2_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 >= 39 ) AS tab2_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab2_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT pk FROM tab2 WHERE col0 >= 39
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab2_391

statement ok
DROP VIEW view_2_tab2_391

statement ok
DROP VIEW view_3_tab2_391

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_391 AS SELECT pk, col0 FROM tab3 WHERE col0 >= 39

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

statement ok
CREATE VIEW view_3_tab3_391 AS SELECT pk FROM view_1_tab3_391

query II rowsort label-1500-1
SELECT pk, col0 FROM tab3 WHERE col0 >= 39
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 >= 39)
----
3
23
4
18
6
9
7
17

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab3_391
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab3_391
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_391 UNION ALL SELECT pk, col0 FROM view_2_tab3_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_391 UNION SELECT pk, col0 FROM view_2_tab3_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 >= 39 ) AS tab3_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab3_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT pk FROM tab3 WHERE col0 >= 39
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab3_391

statement ok
DROP VIEW view_2_tab3_391

statement ok
DROP VIEW view_3_tab3_391

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_391 AS SELECT pk, col0 FROM tab4 WHERE col0 >= 39

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

statement ok
CREATE VIEW view_3_tab4_391 AS SELECT pk FROM view_1_tab4_391

query II rowsort label-1500-1
SELECT pk, col0 FROM tab4 WHERE col0 >= 39
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 >= 39)
----
3
23
4
18
6
9
7
17

query II rowsort label-1500-1
SELECT pk, col0 FROM view_1_tab4_391
----
12 values hashing to ce746723caa616e510def298427f4875

query II rowsort label-1500-2
SELECT pk, col0 FROM view_2_tab4_391
----
3
23
4
18
6
9
7
17

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_391 UNION ALL SELECT pk, col0 FROM view_2_tab4_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_391 UNION SELECT pk, col0 FROM view_2_tab4_391
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 >= 39 ) AS tab4_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT * FROM view_3_tab4_391
----
0
1
2
5
8
9

query I rowsort label-1500-3
SELECT pk FROM tab4 WHERE col0 >= 39
----
0
1
2
5
8
9

statement ok
DROP VIEW view_1_tab4_391

statement ok
DROP VIEW view_2_tab4_391

statement ok
DROP VIEW view_3_tab4_391

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_392 AS SELECT pk, col0 FROM tab0 WHERE col4 <= 71.46

statement ok
CREATE VIEW view_2_tab0_392 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 71.46)

statement ok
CREATE VIEW view_3_tab0_392 AS SELECT pk FROM view_1_tab0_392

query II rowsort label-1600-1
SELECT pk, col0 FROM tab0 WHERE col4 <= 71.46
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 71.46)
----
0
60
6
9
8
94

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab0_392
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab0_392
----
0
60
6
9
8
94

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_392 UNION ALL SELECT pk, col0 FROM view_2_tab0_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 <= 71.46 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 <= 71.46)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_392 UNION SELECT pk, col0 FROM view_2_tab0_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 <= 71.46 ) AS tab0_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab0_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT pk FROM tab0 WHERE col4 <= 71.46
----
1
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab0_392

statement ok
DROP VIEW view_2_tab0_392

statement ok
DROP VIEW view_3_tab0_392

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_392 AS SELECT pk, col0 FROM tab1 WHERE col4 <= 71.46

statement ok
CREATE VIEW view_2_tab1_392 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 71.46)

statement ok
CREATE VIEW view_3_tab1_392 AS SELECT pk FROM view_1_tab1_392

query II rowsort label-1600-1
SELECT pk, col0 FROM tab1 WHERE col4 <= 71.46
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 71.46)
----
0
60
6
9
8
94

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab1_392
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab1_392
----
0
60
6
9
8
94

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_392 UNION ALL SELECT pk, col0 FROM view_2_tab1_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 <= 71.46 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 <= 71.46)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_392 UNION SELECT pk, col0 FROM view_2_tab1_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 <= 71.46 ) AS tab1_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab1_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT pk FROM tab1 WHERE col4 <= 71.46
----
1
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab1_392

statement ok
DROP VIEW view_2_tab1_392

statement ok
DROP VIEW view_3_tab1_392

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_392 AS SELECT pk, col0 FROM tab2 WHERE col4 <= 71.46

statement ok
CREATE VIEW view_2_tab2_392 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 71.46)

statement ok
CREATE VIEW view_3_tab2_392 AS SELECT pk FROM view_1_tab2_392

query II rowsort label-1600-1
SELECT pk, col0 FROM tab2 WHERE col4 <= 71.46
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 71.46)
----
0
60
6
9
8
94

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab2_392
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab2_392
----
0
60
6
9
8
94

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_392 UNION ALL SELECT pk, col0 FROM view_2_tab2_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 <= 71.46 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 <= 71.46)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_392 UNION SELECT pk, col0 FROM view_2_tab2_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 <= 71.46 ) AS tab2_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab2_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT pk FROM tab2 WHERE col4 <= 71.46
----
1
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab2_392

statement ok
DROP VIEW view_2_tab2_392

statement ok
DROP VIEW view_3_tab2_392

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_392 AS SELECT pk, col0 FROM tab3 WHERE col4 <= 71.46

statement ok
CREATE VIEW view_2_tab3_392 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 71.46)

statement ok
CREATE VIEW view_3_tab3_392 AS SELECT pk FROM view_1_tab3_392

query II rowsort label-1600-1
SELECT pk, col0 FROM tab3 WHERE col4 <= 71.46
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 71.46)
----
0
60
6
9
8
94

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab3_392
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab3_392
----
0
60
6
9
8
94

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_392 UNION ALL SELECT pk, col0 FROM view_2_tab3_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 <= 71.46 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 <= 71.46)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_392 UNION SELECT pk, col0 FROM view_2_tab3_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 <= 71.46 ) AS tab3_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab3_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT pk FROM tab3 WHERE col4 <= 71.46
----
1
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab3_392

statement ok
DROP VIEW view_2_tab3_392

statement ok
DROP VIEW view_3_tab3_392

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_392 AS SELECT pk, col0 FROM tab4 WHERE col4 <= 71.46

statement ok
CREATE VIEW view_2_tab4_392 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 71.46)

statement ok
CREATE VIEW view_3_tab4_392 AS SELECT pk FROM view_1_tab4_392

query II rowsort label-1600-1
SELECT pk, col0 FROM tab4 WHERE col4 <= 71.46
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 71.46)
----
0
60
6
9
8
94

query II rowsort label-1600-1
SELECT pk, col0 FROM view_1_tab4_392
----
14 values hashing to d9ab038fca61220c5af3a556585ddea9

query II rowsort label-1600-2
SELECT pk, col0 FROM view_2_tab4_392
----
0
60
6
9
8
94

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_392 UNION ALL SELECT pk, col0 FROM view_2_tab4_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 <= 71.46 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 <= 71.46)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_392 UNION SELECT pk, col0 FROM view_2_tab4_392
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 <= 71.46 ) AS tab4_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT * FROM view_3_tab4_392
----
1
2
3
4
5
7
9

query I rowsort label-1600-3
SELECT pk FROM tab4 WHERE col4 <= 71.46
----
1
2
3
4
5
7
9

statement ok
DROP VIEW view_1_tab4_392

statement ok
DROP VIEW view_2_tab4_392

statement ok
DROP VIEW view_3_tab4_392

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_393 AS SELECT pk, col0 FROM tab0 WHERE (col0 < 72)

statement ok
CREATE VIEW view_2_tab0_393 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 72))

statement ok
CREATE VIEW view_3_tab0_393 AS SELECT pk FROM view_1_tab0_393

query II rowsort label-1700-1
SELECT pk, col0 FROM tab0 WHERE (col0 < 72)
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 72))
----
1
72
5
85
8
94
9
95

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab0_393
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab0_393
----
1
72
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 72) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_393 UNION ALL SELECT pk, col0 FROM view_2_tab0_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 < 72) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_393 UNION SELECT pk, col0 FROM view_2_tab0_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 < 72) ) AS tab0_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT * FROM view_3_tab0_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT pk FROM tab0 WHERE (col0 < 72)
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab0_393

statement ok
DROP VIEW view_2_tab0_393

statement ok
DROP VIEW view_3_tab0_393

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_393 AS SELECT pk, col0 FROM tab1 WHERE (col0 < 72)

statement ok
CREATE VIEW view_2_tab1_393 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 72))

statement ok
CREATE VIEW view_3_tab1_393 AS SELECT pk FROM view_1_tab1_393

query II rowsort label-1700-1
SELECT pk, col0 FROM tab1 WHERE (col0 < 72)
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 72))
----
1
72
5
85
8
94
9
95

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab1_393
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab1_393
----
1
72
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 72) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_393 UNION ALL SELECT pk, col0 FROM view_2_tab1_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 < 72) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_393 UNION SELECT pk, col0 FROM view_2_tab1_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 < 72) ) AS tab1_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT * FROM view_3_tab1_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT pk FROM tab1 WHERE (col0 < 72)
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab1_393

statement ok
DROP VIEW view_2_tab1_393

statement ok
DROP VIEW view_3_tab1_393

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_393 AS SELECT pk, col0 FROM tab2 WHERE (col0 < 72)

statement ok
CREATE VIEW view_2_tab2_393 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 72))

statement ok
CREATE VIEW view_3_tab2_393 AS SELECT pk FROM view_1_tab2_393

query II rowsort label-1700-1
SELECT pk, col0 FROM tab2 WHERE (col0 < 72)
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 72))
----
1
72
5
85
8
94
9
95

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab2_393
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab2_393
----
1
72
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 72) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_393 UNION ALL SELECT pk, col0 FROM view_2_tab2_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 < 72) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_393 UNION SELECT pk, col0 FROM view_2_tab2_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 < 72) ) AS tab2_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT * FROM view_3_tab2_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT pk FROM tab2 WHERE (col0 < 72)
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab2_393

statement ok
DROP VIEW view_2_tab2_393

statement ok
DROP VIEW view_3_tab2_393

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_393 AS SELECT pk, col0 FROM tab3 WHERE (col0 < 72)

statement ok
CREATE VIEW view_2_tab3_393 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 72))

statement ok
CREATE VIEW view_3_tab3_393 AS SELECT pk FROM view_1_tab3_393

query II rowsort label-1700-1
SELECT pk, col0 FROM tab3 WHERE (col0 < 72)
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 72))
----
1
72
5
85
8
94
9
95

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab3_393
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab3_393
----
1
72
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 72) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_393 UNION ALL SELECT pk, col0 FROM view_2_tab3_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 < 72) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_393 UNION SELECT pk, col0 FROM view_2_tab3_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 < 72) ) AS tab3_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT * FROM view_3_tab3_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT pk FROM tab3 WHERE (col0 < 72)
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab3_393

statement ok
DROP VIEW view_2_tab3_393

statement ok
DROP VIEW view_3_tab3_393

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_393 AS SELECT pk, col0 FROM tab4 WHERE (col0 < 72)

statement ok
CREATE VIEW view_2_tab4_393 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 72))

statement ok
CREATE VIEW view_3_tab4_393 AS SELECT pk FROM view_1_tab4_393

query II rowsort label-1700-1
SELECT pk, col0 FROM tab4 WHERE (col0 < 72)
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 72))
----
1
72
5
85
8
94
9
95

query II rowsort label-1700-1
SELECT pk, col0 FROM view_1_tab4_393
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-1700-2
SELECT pk, col0 FROM view_2_tab4_393
----
1
72
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 72) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_393 UNION ALL SELECT pk, col0 FROM view_2_tab4_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 < 72) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 < 72))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_393 UNION SELECT pk, col0 FROM view_2_tab4_393
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 < 72) ) AS tab4_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT * FROM view_3_tab4_393
----
0
2
3
4
6
7

query I rowsort label-1700-3
SELECT pk FROM tab4 WHERE (col0 < 72)
----
0
2
3
4
6
7

statement ok
DROP VIEW view_1_tab4_393

statement ok
DROP VIEW view_2_tab4_393

statement ok
DROP VIEW view_3_tab4_393

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_394 AS SELECT pk, col0 FROM tab0 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))

statement ok
CREATE VIEW view_2_tab0_394 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))

statement ok
CREATE VIEW view_3_tab0_394 AS SELECT pk FROM view_1_tab0_394

query II rowsort label-1800-1
SELECT pk, col0 FROM tab0 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
0
60
2
52
6
9

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab0_394
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab0_394
----
0
60
2
52
6
9

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_394 UNION ALL SELECT pk, col0 FROM view_2_tab0_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_394 UNION SELECT pk, col0 FROM view_2_tab0_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) ) AS tab0_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab0_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab0 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab0_394

statement ok
DROP VIEW view_2_tab0_394

statement ok
DROP VIEW view_3_tab0_394

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_394 AS SELECT pk, col0 FROM tab1 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))

statement ok
CREATE VIEW view_2_tab1_394 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))

statement ok
CREATE VIEW view_3_tab1_394 AS SELECT pk FROM view_1_tab1_394

query II rowsort label-1800-1
SELECT pk, col0 FROM tab1 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
0
60
2
52
6
9

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab1_394
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab1_394
----
0
60
2
52
6
9

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_394 UNION ALL SELECT pk, col0 FROM view_2_tab1_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_394 UNION SELECT pk, col0 FROM view_2_tab1_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) ) AS tab1_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab1_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab1 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab1_394

statement ok
DROP VIEW view_2_tab1_394

statement ok
DROP VIEW view_3_tab1_394

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_394 AS SELECT pk, col0 FROM tab2 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))

statement ok
CREATE VIEW view_2_tab2_394 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))

statement ok
CREATE VIEW view_3_tab2_394 AS SELECT pk FROM view_1_tab2_394

query II rowsort label-1800-1
SELECT pk, col0 FROM tab2 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
0
60
2
52
6
9

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab2_394
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab2_394
----
0
60
2
52
6
9

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_394 UNION ALL SELECT pk, col0 FROM view_2_tab2_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_394 UNION SELECT pk, col0 FROM view_2_tab2_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) ) AS tab2_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab2_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab2 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab2_394

statement ok
DROP VIEW view_2_tab2_394

statement ok
DROP VIEW view_3_tab2_394

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_394 AS SELECT pk, col0 FROM tab3 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))

statement ok
CREATE VIEW view_2_tab3_394 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))

statement ok
CREATE VIEW view_3_tab3_394 AS SELECT pk FROM view_1_tab3_394

query II rowsort label-1800-1
SELECT pk, col0 FROM tab3 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
0
60
2
52
6
9

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab3_394
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab3_394
----
0
60
2
52
6
9

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_394 UNION ALL SELECT pk, col0 FROM view_2_tab3_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_394 UNION SELECT pk, col0 FROM view_2_tab3_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) ) AS tab3_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab3_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab3 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab3_394

statement ok
DROP VIEW view_2_tab3_394

statement ok
DROP VIEW view_3_tab3_394

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_394 AS SELECT pk, col0 FROM tab4 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))

statement ok
CREATE VIEW view_2_tab4_394 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))

statement ok
CREATE VIEW view_3_tab4_394 AS SELECT pk FROM view_1_tab4_394

query II rowsort label-1800-1
SELECT pk, col0 FROM tab4 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
0
60
2
52
6
9

query II rowsort label-1800-1
SELECT pk, col0 FROM view_1_tab4_394
----
14 values hashing to 375615c222de312e47fa031254857c30

query II rowsort label-1800-2
SELECT pk, col0 FROM view_2_tab4_394
----
0
60
2
52
6
9

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_394 UNION ALL SELECT pk, col0 FROM view_2_tab4_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_394 UNION SELECT pk, col0 FROM view_2_tab4_394
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90)) ) AS tab4_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT * FROM view_3_tab4_394
----
1
3
4
5
7
8
9

query I rowsort label-1800-3
SELECT pk FROM tab4 WHERE ((col1 >= 63.83)) OR (col3 BETWEEN 55 AND 81 OR (col4 >= 55.67) AND (col0 IN (88,39,49)) OR (col4 <= 42.90))
----
1
3
4
5
7
8
9

statement ok
DROP VIEW view_1_tab4_394

statement ok
DROP VIEW view_2_tab4_394

statement ok
DROP VIEW view_3_tab4_394

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_395 AS SELECT pk, col0 FROM tab0 WHERE col0 <= 85

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

statement ok
CREATE VIEW view_3_tab0_395 AS SELECT pk FROM view_1_tab0_395

query II rowsort label-1900-1
SELECT pk, col0 FROM tab0 WHERE col0 <= 85
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 <= 85)
----
8
94
9
95

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab0_395
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab0_395
----
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_395 UNION ALL SELECT pk, col0 FROM view_2_tab0_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_395 UNION SELECT pk, col0 FROM view_2_tab0_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 <= 85 ) AS tab0_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT * FROM view_3_tab0_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT pk FROM tab0 WHERE col0 <= 85
----
0
1
2
3
4
5
6
7

statement ok
DROP VIEW view_1_tab0_395

statement ok
DROP VIEW view_2_tab0_395

statement ok
DROP VIEW view_3_tab0_395

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_395 AS SELECT pk, col0 FROM tab1 WHERE col0 <= 85

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

statement ok
CREATE VIEW view_3_tab1_395 AS SELECT pk FROM view_1_tab1_395

query II rowsort label-1900-1
SELECT pk, col0 FROM tab1 WHERE col0 <= 85
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 <= 85)
----
8
94
9
95

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab1_395
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab1_395
----
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_395 UNION ALL SELECT pk, col0 FROM view_2_tab1_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_395 UNION SELECT pk, col0 FROM view_2_tab1_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 <= 85 ) AS tab1_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT * FROM view_3_tab1_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT pk FROM tab1 WHERE col0 <= 85
----
0
1
2
3
4
5
6
7

statement ok
DROP VIEW view_1_tab1_395

statement ok
DROP VIEW view_2_tab1_395

statement ok
DROP VIEW view_3_tab1_395

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_395 AS SELECT pk, col0 FROM tab2 WHERE col0 <= 85

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

statement ok
CREATE VIEW view_3_tab2_395 AS SELECT pk FROM view_1_tab2_395

query II rowsort label-1900-1
SELECT pk, col0 FROM tab2 WHERE col0 <= 85
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 <= 85)
----
8
94
9
95

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab2_395
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab2_395
----
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_395 UNION ALL SELECT pk, col0 FROM view_2_tab2_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_395 UNION SELECT pk, col0 FROM view_2_tab2_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 <= 85 ) AS tab2_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT * FROM view_3_tab2_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT pk FROM tab2 WHERE col0 <= 85
----
0
1
2
3
4
5
6
7

statement ok
DROP VIEW view_1_tab2_395

statement ok
DROP VIEW view_2_tab2_395

statement ok
DROP VIEW view_3_tab2_395

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_395 AS SELECT pk, col0 FROM tab3 WHERE col0 <= 85

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

statement ok
CREATE VIEW view_3_tab3_395 AS SELECT pk FROM view_1_tab3_395

query II rowsort label-1900-1
SELECT pk, col0 FROM tab3 WHERE col0 <= 85
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 <= 85)
----
8
94
9
95

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab3_395
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab3_395
----
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_395 UNION ALL SELECT pk, col0 FROM view_2_tab3_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_395 UNION SELECT pk, col0 FROM view_2_tab3_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 <= 85 ) AS tab3_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT * FROM view_3_tab3_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT pk FROM tab3 WHERE col0 <= 85
----
0
1
2
3
4
5
6
7

statement ok
DROP VIEW view_1_tab3_395

statement ok
DROP VIEW view_2_tab3_395

statement ok
DROP VIEW view_3_tab3_395

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab4_395 AS SELECT pk, col0 FROM tab4 WHERE col0 <= 85

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

statement ok
CREATE VIEW view_3_tab4_395 AS SELECT pk FROM view_1_tab4_395

query II rowsort label-1900-1
SELECT pk, col0 FROM tab4 WHERE col0 <= 85
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 <= 85)
----
8
94
9
95

query II rowsort label-1900-1
SELECT pk, col0 FROM view_1_tab4_395
----
16 values hashing to dc91252deed21512dfa280dcbdbf3ba6

query II rowsort label-1900-2
SELECT pk, col0 FROM view_2_tab4_395
----
8
94
9
95

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_395 UNION ALL SELECT pk, col0 FROM view_2_tab4_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_395 UNION SELECT pk, col0 FROM view_2_tab4_395
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-1900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 <= 85 ) AS tab4_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT * FROM view_3_tab4_395
----
0
1
2
3
4
5
6
7

query I rowsort label-1900-3
SELECT pk FROM tab4 WHERE col0 <= 85
----
0
1
2
3
4
5
6
7

statement ok
DROP VIEW view_1_tab4_395

statement ok
DROP VIEW view_2_tab4_395

statement ok
DROP VIEW view_3_tab4_395

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab0_396 AS SELECT pk, col0 FROM tab0 WHERE (((col0 = 78)))

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

statement ok
CREATE VIEW view_3_tab0_396 AS SELECT pk FROM view_1_tab0_396

query II rowsort label-2000-1
SELECT pk, col0 FROM tab0 WHERE (((col0 = 78)))
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab0_396
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab0_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_396 UNION ALL SELECT pk, col0 FROM view_2_tab0_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_396 UNION SELECT pk, col0 FROM view_2_tab0_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 = 78))) ) AS tab0_396
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab0_396
----

query I rowsort label-2000-3
SELECT pk FROM tab0 WHERE (((col0 = 78)))
----

statement ok
DROP VIEW view_1_tab0_396

statement ok
DROP VIEW view_2_tab0_396

statement ok
DROP VIEW view_3_tab0_396

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab1_396 AS SELECT pk, col0 FROM tab1 WHERE (((col0 = 78)))

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

statement ok
CREATE VIEW view_3_tab1_396 AS SELECT pk FROM view_1_tab1_396

query II rowsort label-2000-1
SELECT pk, col0 FROM tab1 WHERE (((col0 = 78)))
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab1_396
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab1_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_396 UNION ALL SELECT pk, col0 FROM view_2_tab1_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_396 UNION SELECT pk, col0 FROM view_2_tab1_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 = 78))) ) AS tab1_396
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab1_396
----

query I rowsort label-2000-3
SELECT pk FROM tab1 WHERE (((col0 = 78)))
----

statement ok
DROP VIEW view_1_tab1_396

statement ok
DROP VIEW view_2_tab1_396

statement ok
DROP VIEW view_3_tab1_396

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab2_396 AS SELECT pk, col0 FROM tab2 WHERE (((col0 = 78)))

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

statement ok
CREATE VIEW view_3_tab2_396 AS SELECT pk FROM view_1_tab2_396

query II rowsort label-2000-1
SELECT pk, col0 FROM tab2 WHERE (((col0 = 78)))
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab2_396
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab2_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_396 UNION ALL SELECT pk, col0 FROM view_2_tab2_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_396 UNION SELECT pk, col0 FROM view_2_tab2_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 = 78))) ) AS tab2_396
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab2_396
----

query I rowsort label-2000-3
SELECT pk FROM tab2 WHERE (((col0 = 78)))
----

statement ok
DROP VIEW view_1_tab2_396

statement ok
DROP VIEW view_2_tab2_396

statement ok
DROP VIEW view_3_tab2_396

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

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

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

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

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

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

statement ok
CREATE VIEW view_1_tab3_396 AS SELECT pk, col0 FROM tab3 WHERE (((col0 = 78)))

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

statement ok
CREATE VIEW view_3_tab3_396 AS SELECT pk FROM view_1_tab3_396

query II rowsort label-2000-1
SELECT pk, col0 FROM tab3 WHERE (((col0 = 78)))
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab3_396
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab3_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_396 UNION ALL SELECT pk, col0 FROM view_2_tab3_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_396 UNION SELECT pk, col0 FROM view_2_tab3_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 = 78))) ) AS tab3_396
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab3_396
----

query I rowsort label-2000-3
SELECT pk FROM tab3 WHERE (((col0 = 78)))
----

statement ok
DROP VIEW view_1_tab3_396

statement ok
DROP VIEW view_2_tab3_396

statement ok
DROP VIEW view_3_tab3_396

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_396') DROP VIEW view_1_tab4_396

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_396

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_396') DROP VIEW view_2_tab4_396

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_396

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_396') DROP VIEW view_3_tab4_396

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_396

statement ok
CREATE VIEW view_1_tab4_396 AS SELECT pk, col0 FROM tab4 WHERE (((col0 = 78)))

statement ok
CREATE VIEW view_2_tab4_396 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 78))))

statement ok
CREATE VIEW view_3_tab4_396 AS SELECT pk FROM view_1_tab4_396

query II rowsort label-2000-1
SELECT pk, col0 FROM tab4 WHERE (((col0 = 78)))
----

query II rowsort label-2000-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2000-1
SELECT pk, col0 FROM view_1_tab4_396
----

query II rowsort label-2000-2
SELECT pk, col0 FROM view_2_tab4_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 = 78))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_396 UNION ALL SELECT pk, col0 FROM view_2_tab4_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 = 78))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 = 78))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_396 UNION SELECT pk, col0 FROM view_2_tab4_396
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 = 78))) ) AS tab4_396
----

query I rowsort label-2000-3
SELECT * FROM view_3_tab4_396
----

query I rowsort label-2000-3
SELECT pk FROM tab4 WHERE (((col0 = 78)))
----

statement ok
DROP VIEW view_1_tab4_396

statement ok
DROP VIEW view_2_tab4_396

statement ok
DROP VIEW view_3_tab4_396

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_397') DROP VIEW view_1_tab0_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_397') DROP VIEW view_2_tab0_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_397') DROP VIEW view_3_tab0_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_397

statement ok
CREATE VIEW view_1_tab0_397 AS SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) AND (col1 < 82.52)

statement ok
CREATE VIEW view_2_tab0_397 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))

statement ok
CREATE VIEW view_3_tab0_397 AS SELECT pk FROM view_1_tab0_397

query II rowsort label-2100-1
SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab0_397
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab0_397
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) AND (col1 < 82.52) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_397 UNION ALL SELECT pk, col0 FROM view_2_tab0_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) AND (col1 < 82.52) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_397 UNION SELECT pk, col0 FROM view_2_tab0_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 >= 91) AND (col1 < 82.52) ) AS tab0_397
----
0
9

query I rowsort label-2100-3
SELECT * FROM view_3_tab0_397
----
0
9

query I rowsort label-2100-3
SELECT pk FROM tab0 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
9

statement ok
DROP VIEW view_1_tab0_397

statement ok
DROP VIEW view_2_tab0_397

statement ok
DROP VIEW view_3_tab0_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_397') DROP VIEW view_1_tab1_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_397') DROP VIEW view_2_tab1_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_397') DROP VIEW view_3_tab1_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_397

statement ok
CREATE VIEW view_1_tab1_397 AS SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) AND (col1 < 82.52)

statement ok
CREATE VIEW view_2_tab1_397 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))

statement ok
CREATE VIEW view_3_tab1_397 AS SELECT pk FROM view_1_tab1_397

query II rowsort label-2100-1
SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab1_397
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab1_397
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) AND (col1 < 82.52) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_397 UNION ALL SELECT pk, col0 FROM view_2_tab1_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) AND (col1 < 82.52) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_397 UNION SELECT pk, col0 FROM view_2_tab1_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 >= 91) AND (col1 < 82.52) ) AS tab1_397
----
0
9

query I rowsort label-2100-3
SELECT * FROM view_3_tab1_397
----
0
9

query I rowsort label-2100-3
SELECT pk FROM tab1 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
9

statement ok
DROP VIEW view_1_tab1_397

statement ok
DROP VIEW view_2_tab1_397

statement ok
DROP VIEW view_3_tab1_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_397') DROP VIEW view_1_tab2_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_397') DROP VIEW view_2_tab2_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_397') DROP VIEW view_3_tab2_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_397

statement ok
CREATE VIEW view_1_tab2_397 AS SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) AND (col1 < 82.52)

statement ok
CREATE VIEW view_2_tab2_397 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))

statement ok
CREATE VIEW view_3_tab2_397 AS SELECT pk FROM view_1_tab2_397

query II rowsort label-2100-1
SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab2_397
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab2_397
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) AND (col1 < 82.52) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_397 UNION ALL SELECT pk, col0 FROM view_2_tab2_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) AND (col1 < 82.52) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_397 UNION SELECT pk, col0 FROM view_2_tab2_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 >= 91) AND (col1 < 82.52) ) AS tab2_397
----
0
9

query I rowsort label-2100-3
SELECT * FROM view_3_tab2_397
----
0
9

query I rowsort label-2100-3
SELECT pk FROM tab2 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
9

statement ok
DROP VIEW view_1_tab2_397

statement ok
DROP VIEW view_2_tab2_397

statement ok
DROP VIEW view_3_tab2_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_397') DROP VIEW view_1_tab3_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_397') DROP VIEW view_2_tab3_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_397') DROP VIEW view_3_tab3_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_397

statement ok
CREATE VIEW view_1_tab3_397 AS SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) AND (col1 < 82.52)

statement ok
CREATE VIEW view_2_tab3_397 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))

statement ok
CREATE VIEW view_3_tab3_397 AS SELECT pk FROM view_1_tab3_397

query II rowsort label-2100-1
SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab3_397
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab3_397
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) AND (col1 < 82.52) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_397 UNION ALL SELECT pk, col0 FROM view_2_tab3_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) AND (col1 < 82.52) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_397 UNION SELECT pk, col0 FROM view_2_tab3_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 >= 91) AND (col1 < 82.52) ) AS tab3_397
----
0
9

query I rowsort label-2100-3
SELECT * FROM view_3_tab3_397
----
0
9

query I rowsort label-2100-3
SELECT pk FROM tab3 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
9

statement ok
DROP VIEW view_1_tab3_397

statement ok
DROP VIEW view_2_tab3_397

statement ok
DROP VIEW view_3_tab3_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_397') DROP VIEW view_1_tab4_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_397') DROP VIEW view_2_tab4_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_397') DROP VIEW view_3_tab4_397

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_397

statement ok
CREATE VIEW view_1_tab4_397 AS SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) AND (col1 < 82.52)

statement ok
CREATE VIEW view_2_tab4_397 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))

statement ok
CREATE VIEW view_3_tab4_397 AS SELECT pk FROM view_1_tab4_397

query II rowsort label-2100-1
SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-2100-1
SELECT pk, col0 FROM view_1_tab4_397
----
0
60
9
95

query II rowsort label-2100-2
SELECT pk, col0 FROM view_2_tab4_397
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) AND (col1 < 82.52) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_397 UNION ALL SELECT pk, col0 FROM view_2_tab4_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) AND (col1 < 82.52) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 >= 91) AND (col1 < 82.52))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_397 UNION SELECT pk, col0 FROM view_2_tab4_397
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 >= 91) AND (col1 < 82.52) ) AS tab4_397
----
0
9

query I rowsort label-2100-3
SELECT * FROM view_3_tab4_397
----
0
9

query I rowsort label-2100-3
SELECT pk FROM tab4 WHERE (col3 >= 91) AND (col1 < 82.52)
----
0
9

statement ok
DROP VIEW view_1_tab4_397

statement ok
DROP VIEW view_2_tab4_397

statement ok
DROP VIEW view_3_tab4_397

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_398') DROP VIEW view_1_tab0_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_398') DROP VIEW view_2_tab0_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_398') DROP VIEW view_3_tab0_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_398

statement ok
CREATE VIEW view_1_tab0_398 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 16

statement ok
CREATE VIEW view_2_tab0_398 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 16)

statement ok
CREATE VIEW view_3_tab0_398 AS SELECT pk FROM view_1_tab0_398

query II rowsort label-2200-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 16
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 16)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab0_398
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab0_398
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 16 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_398 UNION ALL SELECT pk, col0 FROM view_2_tab0_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 16 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_398 UNION SELECT pk, col0 FROM view_2_tab0_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 16 ) AS tab0_398
----
2
7

query I rowsort label-2200-3
SELECT * FROM view_3_tab0_398
----
2
7

query I rowsort label-2200-3
SELECT pk FROM tab0 WHERE col3 <= 16
----
2
7

statement ok
DROP VIEW view_1_tab0_398

statement ok
DROP VIEW view_2_tab0_398

statement ok
DROP VIEW view_3_tab0_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_398') DROP VIEW view_1_tab1_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_398') DROP VIEW view_2_tab1_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_398') DROP VIEW view_3_tab1_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_398

statement ok
CREATE VIEW view_1_tab1_398 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 16

statement ok
CREATE VIEW view_2_tab1_398 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 16)

statement ok
CREATE VIEW view_3_tab1_398 AS SELECT pk FROM view_1_tab1_398

query II rowsort label-2200-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 16
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 16)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab1_398
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab1_398
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 16 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_398 UNION ALL SELECT pk, col0 FROM view_2_tab1_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 16 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_398 UNION SELECT pk, col0 FROM view_2_tab1_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 16 ) AS tab1_398
----
2
7

query I rowsort label-2200-3
SELECT * FROM view_3_tab1_398
----
2
7

query I rowsort label-2200-3
SELECT pk FROM tab1 WHERE col3 <= 16
----
2
7

statement ok
DROP VIEW view_1_tab1_398

statement ok
DROP VIEW view_2_tab1_398

statement ok
DROP VIEW view_3_tab1_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_398') DROP VIEW view_1_tab2_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_398') DROP VIEW view_2_tab2_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_398') DROP VIEW view_3_tab2_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_398

statement ok
CREATE VIEW view_1_tab2_398 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 16

statement ok
CREATE VIEW view_2_tab2_398 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 16)

statement ok
CREATE VIEW view_3_tab2_398 AS SELECT pk FROM view_1_tab2_398

query II rowsort label-2200-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 16
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 16)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab2_398
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab2_398
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 16 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_398 UNION ALL SELECT pk, col0 FROM view_2_tab2_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 16 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_398 UNION SELECT pk, col0 FROM view_2_tab2_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 16 ) AS tab2_398
----
2
7

query I rowsort label-2200-3
SELECT * FROM view_3_tab2_398
----
2
7

query I rowsort label-2200-3
SELECT pk FROM tab2 WHERE col3 <= 16
----
2
7

statement ok
DROP VIEW view_1_tab2_398

statement ok
DROP VIEW view_2_tab2_398

statement ok
DROP VIEW view_3_tab2_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_398') DROP VIEW view_1_tab3_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_398') DROP VIEW view_2_tab3_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_398') DROP VIEW view_3_tab3_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_398

statement ok
CREATE VIEW view_1_tab3_398 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 16

statement ok
CREATE VIEW view_2_tab3_398 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 16)

statement ok
CREATE VIEW view_3_tab3_398 AS SELECT pk FROM view_1_tab3_398

query II rowsort label-2200-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 16
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 16)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab3_398
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab3_398
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 16 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_398 UNION ALL SELECT pk, col0 FROM view_2_tab3_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 16 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_398 UNION SELECT pk, col0 FROM view_2_tab3_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 16 ) AS tab3_398
----
2
7

query I rowsort label-2200-3
SELECT * FROM view_3_tab3_398
----
2
7

query I rowsort label-2200-3
SELECT pk FROM tab3 WHERE col3 <= 16
----
2
7

statement ok
DROP VIEW view_1_tab3_398

statement ok
DROP VIEW view_2_tab3_398

statement ok
DROP VIEW view_3_tab3_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_398') DROP VIEW view_1_tab4_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_398') DROP VIEW view_2_tab4_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_398') DROP VIEW view_3_tab4_398

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_398

statement ok
CREATE VIEW view_1_tab4_398 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 16

statement ok
CREATE VIEW view_2_tab4_398 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 16)

statement ok
CREATE VIEW view_3_tab4_398 AS SELECT pk FROM view_1_tab4_398

query II rowsort label-2200-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 16
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 16)
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-2200-1
SELECT pk, col0 FROM view_1_tab4_398
----
2
52
7
17

query II rowsort label-2200-2
SELECT pk, col0 FROM view_2_tab4_398
----
16 values hashing to a2f61d2e3773f43aa1d09287311f640b

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 16 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_398 UNION ALL SELECT pk, col0 FROM view_2_tab4_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 16 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 16)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_398 UNION SELECT pk, col0 FROM view_2_tab4_398
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 16 ) AS tab4_398
----
2
7

query I rowsort label-2200-3
SELECT * FROM view_3_tab4_398
----
2
7

query I rowsort label-2200-3
SELECT pk FROM tab4 WHERE col3 <= 16
----
2
7

statement ok
DROP VIEW view_1_tab4_398

statement ok
DROP VIEW view_2_tab4_398

statement ok
DROP VIEW view_3_tab4_398

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_399') DROP VIEW view_1_tab0_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_399') DROP VIEW view_2_tab0_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_399') DROP VIEW view_3_tab0_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_399

statement ok
CREATE VIEW view_1_tab0_399 AS SELECT pk, col0 FROM tab0 WHERE (col0 >= 62)

statement ok
CREATE VIEW view_2_tab0_399 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 62))

statement ok
CREATE VIEW view_3_tab0_399 AS SELECT pk FROM view_1_tab0_399

query II rowsort label-2300-1
SELECT pk, col0 FROM tab0 WHERE (col0 >= 62)
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 62))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab0_399
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab0_399
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 62) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_399 UNION ALL SELECT pk, col0 FROM view_2_tab0_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col0 >= 62) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_399 UNION SELECT pk, col0 FROM view_2_tab0_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col0 >= 62) ) AS tab0_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab0_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT pk FROM tab0 WHERE (col0 >= 62)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab0_399

statement ok
DROP VIEW view_2_tab0_399

statement ok
DROP VIEW view_3_tab0_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_399') DROP VIEW view_1_tab1_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_399') DROP VIEW view_2_tab1_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_399') DROP VIEW view_3_tab1_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_399

statement ok
CREATE VIEW view_1_tab1_399 AS SELECT pk, col0 FROM tab1 WHERE (col0 >= 62)

statement ok
CREATE VIEW view_2_tab1_399 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 62))

statement ok
CREATE VIEW view_3_tab1_399 AS SELECT pk FROM view_1_tab1_399

query II rowsort label-2300-1
SELECT pk, col0 FROM tab1 WHERE (col0 >= 62)
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 62))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab1_399
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab1_399
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 62) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_399 UNION ALL SELECT pk, col0 FROM view_2_tab1_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col0 >= 62) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_399 UNION SELECT pk, col0 FROM view_2_tab1_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col0 >= 62) ) AS tab1_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab1_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT pk FROM tab1 WHERE (col0 >= 62)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab1_399

statement ok
DROP VIEW view_2_tab1_399

statement ok
DROP VIEW view_3_tab1_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_399') DROP VIEW view_1_tab2_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_399') DROP VIEW view_2_tab2_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_399') DROP VIEW view_3_tab2_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_399

statement ok
CREATE VIEW view_1_tab2_399 AS SELECT pk, col0 FROM tab2 WHERE (col0 >= 62)

statement ok
CREATE VIEW view_2_tab2_399 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 62))

statement ok
CREATE VIEW view_3_tab2_399 AS SELECT pk FROM view_1_tab2_399

query II rowsort label-2300-1
SELECT pk, col0 FROM tab2 WHERE (col0 >= 62)
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 62))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab2_399
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab2_399
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 62) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_399 UNION ALL SELECT pk, col0 FROM view_2_tab2_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col0 >= 62) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_399 UNION SELECT pk, col0 FROM view_2_tab2_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col0 >= 62) ) AS tab2_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab2_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT pk FROM tab2 WHERE (col0 >= 62)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab2_399

statement ok
DROP VIEW view_2_tab2_399

statement ok
DROP VIEW view_3_tab2_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_399') DROP VIEW view_1_tab3_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_399') DROP VIEW view_2_tab3_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_399') DROP VIEW view_3_tab3_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_399

statement ok
CREATE VIEW view_1_tab3_399 AS SELECT pk, col0 FROM tab3 WHERE (col0 >= 62)

statement ok
CREATE VIEW view_2_tab3_399 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 62))

statement ok
CREATE VIEW view_3_tab3_399 AS SELECT pk FROM view_1_tab3_399

query II rowsort label-2300-1
SELECT pk, col0 FROM tab3 WHERE (col0 >= 62)
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 62))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab3_399
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab3_399
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 62) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_399 UNION ALL SELECT pk, col0 FROM view_2_tab3_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col0 >= 62) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_399 UNION SELECT pk, col0 FROM view_2_tab3_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col0 >= 62) ) AS tab3_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab3_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT pk FROM tab3 WHERE (col0 >= 62)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab3_399

statement ok
DROP VIEW view_2_tab3_399

statement ok
DROP VIEW view_3_tab3_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_399') DROP VIEW view_1_tab4_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_399') DROP VIEW view_2_tab4_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_399') DROP VIEW view_3_tab4_399

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_399

statement ok
CREATE VIEW view_1_tab4_399 AS SELECT pk, col0 FROM tab4 WHERE (col0 >= 62)

statement ok
CREATE VIEW view_2_tab4_399 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 62))

statement ok
CREATE VIEW view_3_tab4_399 AS SELECT pk FROM view_1_tab4_399

query II rowsort label-2300-1
SELECT pk, col0 FROM tab4 WHERE (col0 >= 62)
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 62))
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-2300-1
SELECT pk, col0 FROM view_1_tab4_399
----
1
72
5
85
8
94
9
95

query II rowsort label-2300-2
SELECT pk, col0 FROM view_2_tab4_399
----
12 values hashing to 70c97fcc39ffda7092dcbd75849febc1

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 62) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_399 UNION ALL SELECT pk, col0 FROM view_2_tab4_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col0 >= 62) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col0 >= 62))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_399 UNION SELECT pk, col0 FROM view_2_tab4_399
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col0 >= 62) ) AS tab4_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT * FROM view_3_tab4_399
----
1
5
8
9

query I rowsort label-2300-3
SELECT pk FROM tab4 WHERE (col0 >= 62)
----
1
5
8
9

statement ok
DROP VIEW view_1_tab4_399

statement ok
DROP VIEW view_2_tab4_399

statement ok
DROP VIEW view_3_tab4_399

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_400') DROP VIEW view_1_tab0_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_400') DROP VIEW view_2_tab0_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_400') DROP VIEW view_3_tab0_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_400

statement ok
CREATE VIEW view_1_tab0_400 AS SELECT pk, col0 FROM tab0 WHERE col3 > 3

statement ok
CREATE VIEW view_2_tab0_400 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3)

statement ok
CREATE VIEW view_3_tab0_400 AS SELECT pk FROM view_1_tab0_400

query II rowsort label-2400-1
SELECT pk, col0 FROM tab0 WHERE col3 > 3
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3)
----
2
52

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab0_400
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab0_400
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 3 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_400 UNION ALL SELECT pk, col0 FROM view_2_tab0_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 3 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_400 UNION SELECT pk, col0 FROM view_2_tab0_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 3 ) AS tab0_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT * FROM view_3_tab0_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT pk FROM tab0 WHERE col3 > 3
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab0_400

statement ok
DROP VIEW view_2_tab0_400

statement ok
DROP VIEW view_3_tab0_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_400') DROP VIEW view_1_tab1_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_400') DROP VIEW view_2_tab1_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_400') DROP VIEW view_3_tab1_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_400

statement ok
CREATE VIEW view_1_tab1_400 AS SELECT pk, col0 FROM tab1 WHERE col3 > 3

statement ok
CREATE VIEW view_2_tab1_400 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3)

statement ok
CREATE VIEW view_3_tab1_400 AS SELECT pk FROM view_1_tab1_400

query II rowsort label-2400-1
SELECT pk, col0 FROM tab1 WHERE col3 > 3
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3)
----
2
52

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab1_400
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab1_400
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 3 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_400 UNION ALL SELECT pk, col0 FROM view_2_tab1_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 3 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_400 UNION SELECT pk, col0 FROM view_2_tab1_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 3 ) AS tab1_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT * FROM view_3_tab1_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT pk FROM tab1 WHERE col3 > 3
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab1_400

statement ok
DROP VIEW view_2_tab1_400

statement ok
DROP VIEW view_3_tab1_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_400') DROP VIEW view_1_tab2_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_400') DROP VIEW view_2_tab2_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_400') DROP VIEW view_3_tab2_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_400

statement ok
CREATE VIEW view_1_tab2_400 AS SELECT pk, col0 FROM tab2 WHERE col3 > 3

statement ok
CREATE VIEW view_2_tab2_400 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3)

statement ok
CREATE VIEW view_3_tab2_400 AS SELECT pk FROM view_1_tab2_400

query II rowsort label-2400-1
SELECT pk, col0 FROM tab2 WHERE col3 > 3
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3)
----
2
52

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab2_400
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab2_400
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 3 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_400 UNION ALL SELECT pk, col0 FROM view_2_tab2_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 3 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_400 UNION SELECT pk, col0 FROM view_2_tab2_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 3 ) AS tab2_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT * FROM view_3_tab2_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT pk FROM tab2 WHERE col3 > 3
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab2_400

statement ok
DROP VIEW view_2_tab2_400

statement ok
DROP VIEW view_3_tab2_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_400') DROP VIEW view_1_tab3_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_400') DROP VIEW view_2_tab3_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_400') DROP VIEW view_3_tab3_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_400

statement ok
CREATE VIEW view_1_tab3_400 AS SELECT pk, col0 FROM tab3 WHERE col3 > 3

statement ok
CREATE VIEW view_2_tab3_400 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3)

statement ok
CREATE VIEW view_3_tab3_400 AS SELECT pk FROM view_1_tab3_400

query II rowsort label-2400-1
SELECT pk, col0 FROM tab3 WHERE col3 > 3
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3)
----
2
52

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab3_400
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab3_400
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 3 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_400 UNION ALL SELECT pk, col0 FROM view_2_tab3_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 3 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_400 UNION SELECT pk, col0 FROM view_2_tab3_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 3 ) AS tab3_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT * FROM view_3_tab3_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT pk FROM tab3 WHERE col3 > 3
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab3_400

statement ok
DROP VIEW view_2_tab3_400

statement ok
DROP VIEW view_3_tab3_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_400') DROP VIEW view_1_tab4_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_400') DROP VIEW view_2_tab4_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_400') DROP VIEW view_3_tab4_400

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_400

statement ok
CREATE VIEW view_1_tab4_400 AS SELECT pk, col0 FROM tab4 WHERE col3 > 3

statement ok
CREATE VIEW view_2_tab4_400 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3)

statement ok
CREATE VIEW view_3_tab4_400 AS SELECT pk FROM view_1_tab4_400

query II rowsort label-2400-1
SELECT pk, col0 FROM tab4 WHERE col3 > 3
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3)
----
2
52

query II rowsort label-2400-1
SELECT pk, col0 FROM view_1_tab4_400
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-2400-2
SELECT pk, col0 FROM view_2_tab4_400
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 3 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_400 UNION ALL SELECT pk, col0 FROM view_2_tab4_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 3 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 3)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_400 UNION SELECT pk, col0 FROM view_2_tab4_400
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 3 ) AS tab4_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT * FROM view_3_tab4_400
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-2400-3
SELECT pk FROM tab4 WHERE col3 > 3
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab4_400

statement ok
DROP VIEW view_2_tab4_400

statement ok
DROP VIEW view_3_tab4_400

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_402') DROP VIEW view_1_tab0_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_402') DROP VIEW view_2_tab0_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_402') DROP VIEW view_3_tab0_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_402

statement ok
CREATE VIEW view_1_tab0_402 AS SELECT pk, col0 FROM tab0 WHERE col1 > 82.1

statement ok
CREATE VIEW view_2_tab0_402 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 82.1)

statement ok
CREATE VIEW view_3_tab0_402 AS SELECT pk FROM view_1_tab0_402

query II rowsort label-2500-1
SELECT pk, col0 FROM tab0 WHERE col1 > 82.1
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 82.1)
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab0_402
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab0_402
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 82.1 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_402 UNION ALL SELECT pk, col0 FROM view_2_tab0_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 > 82.1 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_402 UNION SELECT pk, col0 FROM view_2_tab0_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 > 82.1 ) AS tab0_402
----
4
5

query I rowsort label-2500-3
SELECT * FROM view_3_tab0_402
----
4
5

query I rowsort label-2500-3
SELECT pk FROM tab0 WHERE col1 > 82.1
----
4
5

statement ok
DROP VIEW view_1_tab0_402

statement ok
DROP VIEW view_2_tab0_402

statement ok
DROP VIEW view_3_tab0_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_402') DROP VIEW view_1_tab1_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_402') DROP VIEW view_2_tab1_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_402') DROP VIEW view_3_tab1_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_402

statement ok
CREATE VIEW view_1_tab1_402 AS SELECT pk, col0 FROM tab1 WHERE col1 > 82.1

statement ok
CREATE VIEW view_2_tab1_402 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 82.1)

statement ok
CREATE VIEW view_3_tab1_402 AS SELECT pk FROM view_1_tab1_402

query II rowsort label-2500-1
SELECT pk, col0 FROM tab1 WHERE col1 > 82.1
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 82.1)
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab1_402
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab1_402
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 82.1 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_402 UNION ALL SELECT pk, col0 FROM view_2_tab1_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 > 82.1 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_402 UNION SELECT pk, col0 FROM view_2_tab1_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 > 82.1 ) AS tab1_402
----
4
5

query I rowsort label-2500-3
SELECT * FROM view_3_tab1_402
----
4
5

query I rowsort label-2500-3
SELECT pk FROM tab1 WHERE col1 > 82.1
----
4
5

statement ok
DROP VIEW view_1_tab1_402

statement ok
DROP VIEW view_2_tab1_402

statement ok
DROP VIEW view_3_tab1_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_402') DROP VIEW view_1_tab2_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_402') DROP VIEW view_2_tab2_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_402') DROP VIEW view_3_tab2_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_402

statement ok
CREATE VIEW view_1_tab2_402 AS SELECT pk, col0 FROM tab2 WHERE col1 > 82.1

statement ok
CREATE VIEW view_2_tab2_402 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 82.1)

statement ok
CREATE VIEW view_3_tab2_402 AS SELECT pk FROM view_1_tab2_402

query II rowsort label-2500-1
SELECT pk, col0 FROM tab2 WHERE col1 > 82.1
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 82.1)
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab2_402
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab2_402
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 82.1 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_402 UNION ALL SELECT pk, col0 FROM view_2_tab2_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 > 82.1 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_402 UNION SELECT pk, col0 FROM view_2_tab2_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 > 82.1 ) AS tab2_402
----
4
5

query I rowsort label-2500-3
SELECT * FROM view_3_tab2_402
----
4
5

query I rowsort label-2500-3
SELECT pk FROM tab2 WHERE col1 > 82.1
----
4
5

statement ok
DROP VIEW view_1_tab2_402

statement ok
DROP VIEW view_2_tab2_402

statement ok
DROP VIEW view_3_tab2_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_402') DROP VIEW view_1_tab3_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_402') DROP VIEW view_2_tab3_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_402') DROP VIEW view_3_tab3_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_402

statement ok
CREATE VIEW view_1_tab3_402 AS SELECT pk, col0 FROM tab3 WHERE col1 > 82.1

statement ok
CREATE VIEW view_2_tab3_402 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 82.1)

statement ok
CREATE VIEW view_3_tab3_402 AS SELECT pk FROM view_1_tab3_402

query II rowsort label-2500-1
SELECT pk, col0 FROM tab3 WHERE col1 > 82.1
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 82.1)
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab3_402
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab3_402
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 82.1 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_402 UNION ALL SELECT pk, col0 FROM view_2_tab3_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 > 82.1 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_402 UNION SELECT pk, col0 FROM view_2_tab3_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 > 82.1 ) AS tab3_402
----
4
5

query I rowsort label-2500-3
SELECT * FROM view_3_tab3_402
----
4
5

query I rowsort label-2500-3
SELECT pk FROM tab3 WHERE col1 > 82.1
----
4
5

statement ok
DROP VIEW view_1_tab3_402

statement ok
DROP VIEW view_2_tab3_402

statement ok
DROP VIEW view_3_tab3_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_402') DROP VIEW view_1_tab4_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_402') DROP VIEW view_2_tab4_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_402') DROP VIEW view_3_tab4_402

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_402

statement ok
CREATE VIEW view_1_tab4_402 AS SELECT pk, col0 FROM tab4 WHERE col1 > 82.1

statement ok
CREATE VIEW view_2_tab4_402 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 82.1)

statement ok
CREATE VIEW view_3_tab4_402 AS SELECT pk FROM view_1_tab4_402

query II rowsort label-2500-1
SELECT pk, col0 FROM tab4 WHERE col1 > 82.1
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 82.1)
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-2500-1
SELECT pk, col0 FROM view_1_tab4_402
----
4
18
5
85

query II rowsort label-2500-2
SELECT pk, col0 FROM view_2_tab4_402
----
16 values hashing to 3820fb1c3787732f3e467bfee0829984

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 82.1 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_402 UNION ALL SELECT pk, col0 FROM view_2_tab4_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 > 82.1 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 > 82.1)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_402 UNION SELECT pk, col0 FROM view_2_tab4_402
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 > 82.1 ) AS tab4_402
----
4
5

query I rowsort label-2500-3
SELECT * FROM view_3_tab4_402
----
4
5

query I rowsort label-2500-3
SELECT pk FROM tab4 WHERE col1 > 82.1
----
4
5

statement ok
DROP VIEW view_1_tab4_402

statement ok
DROP VIEW view_2_tab4_402

statement ok
DROP VIEW view_3_tab4_402

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_403') DROP VIEW view_1_tab0_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_403') DROP VIEW view_2_tab0_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_403') DROP VIEW view_3_tab0_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_403

statement ok
CREATE VIEW view_1_tab0_403 AS SELECT pk, col0 FROM tab0 WHERE ((col1 > 94.32)) AND (col0 >= 92)

statement ok
CREATE VIEW view_2_tab0_403 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))

statement ok
CREATE VIEW view_3_tab0_403 AS SELECT pk FROM view_1_tab0_403

query II rowsort label-2600-1
SELECT pk, col0 FROM tab0 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab0_403
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab0_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_403 UNION ALL SELECT pk, col0 FROM view_2_tab0_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_403 UNION SELECT pk, col0 FROM view_2_tab0_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 > 94.32)) AND (col0 >= 92) ) AS tab0_403
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab0_403
----

query I rowsort label-2600-3
SELECT pk FROM tab0 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

statement ok
DROP VIEW view_1_tab0_403

statement ok
DROP VIEW view_2_tab0_403

statement ok
DROP VIEW view_3_tab0_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_403') DROP VIEW view_1_tab1_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_403') DROP VIEW view_2_tab1_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_403') DROP VIEW view_3_tab1_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_403

statement ok
CREATE VIEW view_1_tab1_403 AS SELECT pk, col0 FROM tab1 WHERE ((col1 > 94.32)) AND (col0 >= 92)

statement ok
CREATE VIEW view_2_tab1_403 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))

statement ok
CREATE VIEW view_3_tab1_403 AS SELECT pk FROM view_1_tab1_403

query II rowsort label-2600-1
SELECT pk, col0 FROM tab1 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab1_403
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab1_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_403 UNION ALL SELECT pk, col0 FROM view_2_tab1_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_403 UNION SELECT pk, col0 FROM view_2_tab1_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 > 94.32)) AND (col0 >= 92) ) AS tab1_403
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab1_403
----

query I rowsort label-2600-3
SELECT pk FROM tab1 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

statement ok
DROP VIEW view_1_tab1_403

statement ok
DROP VIEW view_2_tab1_403

statement ok
DROP VIEW view_3_tab1_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_403') DROP VIEW view_1_tab2_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_403') DROP VIEW view_2_tab2_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_403') DROP VIEW view_3_tab2_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_403

statement ok
CREATE VIEW view_1_tab2_403 AS SELECT pk, col0 FROM tab2 WHERE ((col1 > 94.32)) AND (col0 >= 92)

statement ok
CREATE VIEW view_2_tab2_403 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))

statement ok
CREATE VIEW view_3_tab2_403 AS SELECT pk FROM view_1_tab2_403

query II rowsort label-2600-1
SELECT pk, col0 FROM tab2 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab2_403
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab2_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_403 UNION ALL SELECT pk, col0 FROM view_2_tab2_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_403 UNION SELECT pk, col0 FROM view_2_tab2_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 > 94.32)) AND (col0 >= 92) ) AS tab2_403
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab2_403
----

query I rowsort label-2600-3
SELECT pk FROM tab2 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

statement ok
DROP VIEW view_1_tab2_403

statement ok
DROP VIEW view_2_tab2_403

statement ok
DROP VIEW view_3_tab2_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_403') DROP VIEW view_1_tab3_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_403') DROP VIEW view_2_tab3_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_403') DROP VIEW view_3_tab3_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_403

statement ok
CREATE VIEW view_1_tab3_403 AS SELECT pk, col0 FROM tab3 WHERE ((col1 > 94.32)) AND (col0 >= 92)

statement ok
CREATE VIEW view_2_tab3_403 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))

statement ok
CREATE VIEW view_3_tab3_403 AS SELECT pk FROM view_1_tab3_403

query II rowsort label-2600-1
SELECT pk, col0 FROM tab3 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab3_403
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab3_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_403 UNION ALL SELECT pk, col0 FROM view_2_tab3_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_403 UNION SELECT pk, col0 FROM view_2_tab3_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 > 94.32)) AND (col0 >= 92) ) AS tab3_403
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab3_403
----

query I rowsort label-2600-3
SELECT pk FROM tab3 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

statement ok
DROP VIEW view_1_tab3_403

statement ok
DROP VIEW view_2_tab3_403

statement ok
DROP VIEW view_3_tab3_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_403') DROP VIEW view_1_tab4_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_403') DROP VIEW view_2_tab4_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_403') DROP VIEW view_3_tab4_403

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_403

statement ok
CREATE VIEW view_1_tab4_403 AS SELECT pk, col0 FROM tab4 WHERE ((col1 > 94.32)) AND (col0 >= 92)

statement ok
CREATE VIEW view_2_tab4_403 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))

statement ok
CREATE VIEW view_3_tab4_403 AS SELECT pk FROM view_1_tab4_403

query II rowsort label-2600-1
SELECT pk, col0 FROM tab4 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

query II rowsort label-2600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-2600-1
SELECT pk, col0 FROM view_1_tab4_403
----

query II rowsort label-2600-2
SELECT pk, col0 FROM view_2_tab4_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_403 UNION ALL SELECT pk, col0 FROM view_2_tab4_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 > 94.32)) AND (col0 >= 92) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 > 94.32)) AND (col0 >= 92))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_403 UNION SELECT pk, col0 FROM view_2_tab4_403
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 > 94.32)) AND (col0 >= 92) ) AS tab4_403
----

query I rowsort label-2600-3
SELECT * FROM view_3_tab4_403
----

query I rowsort label-2600-3
SELECT pk FROM tab4 WHERE ((col1 > 94.32)) AND (col0 >= 92)
----

statement ok
DROP VIEW view_1_tab4_403

statement ok
DROP VIEW view_2_tab4_403

statement ok
DROP VIEW view_3_tab4_403

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_404') DROP VIEW view_1_tab0_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_404') DROP VIEW view_2_tab0_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_404') DROP VIEW view_3_tab0_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_404

statement ok
CREATE VIEW view_1_tab0_404 AS SELECT pk, col0 FROM tab0 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54

statement ok
CREATE VIEW view_2_tab0_404 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)

statement ok
CREATE VIEW view_3_tab0_404 AS SELECT pk FROM view_1_tab0_404

query II rowsort label-2700-1
SELECT pk, col0 FROM tab0 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
2
52
6
9
7
17

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab0_404
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab0_404
----
2
52
6
9
7
17

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_404 UNION ALL SELECT pk, col0 FROM view_2_tab0_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_404 UNION SELECT pk, col0 FROM view_2_tab0_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 ) AS tab0_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab0_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT pk FROM tab0 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
0
1
3
4
5
8
9

statement ok
DROP VIEW view_1_tab0_404

statement ok
DROP VIEW view_2_tab0_404

statement ok
DROP VIEW view_3_tab0_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_404') DROP VIEW view_1_tab1_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_404') DROP VIEW view_2_tab1_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_404') DROP VIEW view_3_tab1_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_404

statement ok
CREATE VIEW view_1_tab1_404 AS SELECT pk, col0 FROM tab1 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54

statement ok
CREATE VIEW view_2_tab1_404 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)

statement ok
CREATE VIEW view_3_tab1_404 AS SELECT pk FROM view_1_tab1_404

query II rowsort label-2700-1
SELECT pk, col0 FROM tab1 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
2
52
6
9
7
17

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab1_404
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab1_404
----
2
52
6
9
7
17

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_404 UNION ALL SELECT pk, col0 FROM view_2_tab1_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_404 UNION SELECT pk, col0 FROM view_2_tab1_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 ) AS tab1_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab1_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT pk FROM tab1 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
0
1
3
4
5
8
9

statement ok
DROP VIEW view_1_tab1_404

statement ok
DROP VIEW view_2_tab1_404

statement ok
DROP VIEW view_3_tab1_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_404') DROP VIEW view_1_tab2_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_404') DROP VIEW view_2_tab2_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_404') DROP VIEW view_3_tab2_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_404

statement ok
CREATE VIEW view_1_tab2_404 AS SELECT pk, col0 FROM tab2 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54

statement ok
CREATE VIEW view_2_tab2_404 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)

statement ok
CREATE VIEW view_3_tab2_404 AS SELECT pk FROM view_1_tab2_404

query II rowsort label-2700-1
SELECT pk, col0 FROM tab2 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
2
52
6
9
7
17

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab2_404
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab2_404
----
2
52
6
9
7
17

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_404 UNION ALL SELECT pk, col0 FROM view_2_tab2_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_404 UNION SELECT pk, col0 FROM view_2_tab2_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 ) AS tab2_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab2_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT pk FROM tab2 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
0
1
3
4
5
8
9

statement ok
DROP VIEW view_1_tab2_404

statement ok
DROP VIEW view_2_tab2_404

statement ok
DROP VIEW view_3_tab2_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_404') DROP VIEW view_1_tab3_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_404') DROP VIEW view_2_tab3_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_404') DROP VIEW view_3_tab3_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_404

statement ok
CREATE VIEW view_1_tab3_404 AS SELECT pk, col0 FROM tab3 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54

statement ok
CREATE VIEW view_2_tab3_404 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)

statement ok
CREATE VIEW view_3_tab3_404 AS SELECT pk FROM view_1_tab3_404

query II rowsort label-2700-1
SELECT pk, col0 FROM tab3 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
2
52
6
9
7
17

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab3_404
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab3_404
----
2
52
6
9
7
17

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_404 UNION ALL SELECT pk, col0 FROM view_2_tab3_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_404 UNION SELECT pk, col0 FROM view_2_tab3_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 ) AS tab3_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab3_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT pk FROM tab3 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
0
1
3
4
5
8
9

statement ok
DROP VIEW view_1_tab3_404

statement ok
DROP VIEW view_2_tab3_404

statement ok
DROP VIEW view_3_tab3_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_404') DROP VIEW view_1_tab4_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_404') DROP VIEW view_2_tab4_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_404') DROP VIEW view_3_tab4_404

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_404

statement ok
CREATE VIEW view_1_tab4_404 AS SELECT pk, col0 FROM tab4 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54

statement ok
CREATE VIEW view_2_tab4_404 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)

statement ok
CREATE VIEW view_3_tab4_404 AS SELECT pk FROM view_1_tab4_404

query II rowsort label-2700-1
SELECT pk, col0 FROM tab4 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
2
52
6
9
7
17

query II rowsort label-2700-1
SELECT pk, col0 FROM view_1_tab4_404
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2700-2
SELECT pk, col0 FROM view_2_tab4_404
----
2
52
6
9
7
17

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_404 UNION ALL SELECT pk, col0 FROM view_2_tab4_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 IN (85.32) AND (col0 = 48) OR col3 > 54)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_404 UNION SELECT pk, col0 FROM view_2_tab4_404
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54 ) AS tab4_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT * FROM view_3_tab4_404
----
0
1
3
4
5
8
9

query I rowsort label-2700-3
SELECT pk FROM tab4 WHERE col1 IN (85.32) AND (col0 = 48) OR col3 > 54
----
0
1
3
4
5
8
9

statement ok
DROP VIEW view_1_tab4_404

statement ok
DROP VIEW view_2_tab4_404

statement ok
DROP VIEW view_3_tab4_404

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_405') DROP VIEW view_1_tab0_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_405') DROP VIEW view_2_tab0_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_405') DROP VIEW view_3_tab0_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_405

statement ok
CREATE VIEW view_1_tab0_405 AS SELECT pk, col0 FROM tab0 WHERE (col3 < 50)

statement ok
CREATE VIEW view_2_tab0_405 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 50))

statement ok
CREATE VIEW view_3_tab0_405 AS SELECT pk FROM view_1_tab0_405

query II rowsort label-2800-1
SELECT pk, col0 FROM tab0 WHERE (col3 < 50)
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 50))
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab0_405
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab0_405
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 50) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_405 UNION ALL SELECT pk, col0 FROM view_2_tab0_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col3 < 50) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_405 UNION SELECT pk, col0 FROM view_2_tab0_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 < 50) ) AS tab0_405
----
2
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab0_405
----
2
6
7

query I rowsort label-2800-3
SELECT pk FROM tab0 WHERE (col3 < 50)
----
2
6
7

statement ok
DROP VIEW view_1_tab0_405

statement ok
DROP VIEW view_2_tab0_405

statement ok
DROP VIEW view_3_tab0_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_405') DROP VIEW view_1_tab1_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_405') DROP VIEW view_2_tab1_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_405') DROP VIEW view_3_tab1_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_405

statement ok
CREATE VIEW view_1_tab1_405 AS SELECT pk, col0 FROM tab1 WHERE (col3 < 50)

statement ok
CREATE VIEW view_2_tab1_405 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 50))

statement ok
CREATE VIEW view_3_tab1_405 AS SELECT pk FROM view_1_tab1_405

query II rowsort label-2800-1
SELECT pk, col0 FROM tab1 WHERE (col3 < 50)
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 50))
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab1_405
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab1_405
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 50) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_405 UNION ALL SELECT pk, col0 FROM view_2_tab1_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col3 < 50) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_405 UNION SELECT pk, col0 FROM view_2_tab1_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 < 50) ) AS tab1_405
----
2
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab1_405
----
2
6
7

query I rowsort label-2800-3
SELECT pk FROM tab1 WHERE (col3 < 50)
----
2
6
7

statement ok
DROP VIEW view_1_tab1_405

statement ok
DROP VIEW view_2_tab1_405

statement ok
DROP VIEW view_3_tab1_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_405') DROP VIEW view_1_tab2_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_405') DROP VIEW view_2_tab2_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_405') DROP VIEW view_3_tab2_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_405

statement ok
CREATE VIEW view_1_tab2_405 AS SELECT pk, col0 FROM tab2 WHERE (col3 < 50)

statement ok
CREATE VIEW view_2_tab2_405 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 50))

statement ok
CREATE VIEW view_3_tab2_405 AS SELECT pk FROM view_1_tab2_405

query II rowsort label-2800-1
SELECT pk, col0 FROM tab2 WHERE (col3 < 50)
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 50))
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab2_405
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab2_405
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 50) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_405 UNION ALL SELECT pk, col0 FROM view_2_tab2_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col3 < 50) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_405 UNION SELECT pk, col0 FROM view_2_tab2_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 < 50) ) AS tab2_405
----
2
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab2_405
----
2
6
7

query I rowsort label-2800-3
SELECT pk FROM tab2 WHERE (col3 < 50)
----
2
6
7

statement ok
DROP VIEW view_1_tab2_405

statement ok
DROP VIEW view_2_tab2_405

statement ok
DROP VIEW view_3_tab2_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_405') DROP VIEW view_1_tab3_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_405') DROP VIEW view_2_tab3_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_405') DROP VIEW view_3_tab3_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_405

statement ok
CREATE VIEW view_1_tab3_405 AS SELECT pk, col0 FROM tab3 WHERE (col3 < 50)

statement ok
CREATE VIEW view_2_tab3_405 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 50))

statement ok
CREATE VIEW view_3_tab3_405 AS SELECT pk FROM view_1_tab3_405

query II rowsort label-2800-1
SELECT pk, col0 FROM tab3 WHERE (col3 < 50)
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 50))
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab3_405
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab3_405
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 50) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_405 UNION ALL SELECT pk, col0 FROM view_2_tab3_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col3 < 50) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_405 UNION SELECT pk, col0 FROM view_2_tab3_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 < 50) ) AS tab3_405
----
2
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab3_405
----
2
6
7

query I rowsort label-2800-3
SELECT pk FROM tab3 WHERE (col3 < 50)
----
2
6
7

statement ok
DROP VIEW view_1_tab3_405

statement ok
DROP VIEW view_2_tab3_405

statement ok
DROP VIEW view_3_tab3_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_405') DROP VIEW view_1_tab4_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_405') DROP VIEW view_2_tab4_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_405') DROP VIEW view_3_tab4_405

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_405

statement ok
CREATE VIEW view_1_tab4_405 AS SELECT pk, col0 FROM tab4 WHERE (col3 < 50)

statement ok
CREATE VIEW view_2_tab4_405 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 50))

statement ok
CREATE VIEW view_3_tab4_405 AS SELECT pk FROM view_1_tab4_405

query II rowsort label-2800-1
SELECT pk, col0 FROM tab4 WHERE (col3 < 50)
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 50))
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-2800-1
SELECT pk, col0 FROM view_1_tab4_405
----
2
52
6
9
7
17

query II rowsort label-2800-2
SELECT pk, col0 FROM view_2_tab4_405
----
14 values hashing to 398c0f60b5aa98bf0f7a0e67e5194fbd

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 50) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_405 UNION ALL SELECT pk, col0 FROM view_2_tab4_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col3 < 50) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col3 < 50))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_405 UNION SELECT pk, col0 FROM view_2_tab4_405
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 < 50) ) AS tab4_405
----
2
6
7

query I rowsort label-2800-3
SELECT * FROM view_3_tab4_405
----
2
6
7

query I rowsort label-2800-3
SELECT pk FROM tab4 WHERE (col3 < 50)
----
2
6
7

statement ok
DROP VIEW view_1_tab4_405

statement ok
DROP VIEW view_2_tab4_405

statement ok
DROP VIEW view_3_tab4_405

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_406') DROP VIEW view_1_tab0_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_406') DROP VIEW view_2_tab0_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_406') DROP VIEW view_3_tab0_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_406

statement ok
CREATE VIEW view_1_tab0_406 AS SELECT pk, col0 FROM tab0 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69

statement ok
CREATE VIEW view_2_tab0_406 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)

statement ok
CREATE VIEW view_3_tab0_406 AS SELECT pk FROM view_1_tab0_406

query II rowsort label-2900-1
SELECT pk, col0 FROM tab0 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab0_406
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab0_406
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_406 UNION ALL SELECT pk, col0 FROM view_2_tab0_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_406 UNION SELECT pk, col0 FROM view_2_tab0_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 ) AS tab0_406
----
0
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab0_406
----
0
8

query I rowsort label-2900-3
SELECT pk FROM tab0 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
8

statement ok
DROP VIEW view_1_tab0_406

statement ok
DROP VIEW view_2_tab0_406

statement ok
DROP VIEW view_3_tab0_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_406') DROP VIEW view_1_tab1_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_406') DROP VIEW view_2_tab1_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_406') DROP VIEW view_3_tab1_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_406

statement ok
CREATE VIEW view_1_tab1_406 AS SELECT pk, col0 FROM tab1 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69

statement ok
CREATE VIEW view_2_tab1_406 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)

statement ok
CREATE VIEW view_3_tab1_406 AS SELECT pk FROM view_1_tab1_406

query II rowsort label-2900-1
SELECT pk, col0 FROM tab1 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab1_406
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab1_406
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_406 UNION ALL SELECT pk, col0 FROM view_2_tab1_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_406 UNION SELECT pk, col0 FROM view_2_tab1_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 ) AS tab1_406
----
0
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab1_406
----
0
8

query I rowsort label-2900-3
SELECT pk FROM tab1 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
8

statement ok
DROP VIEW view_1_tab1_406

statement ok
DROP VIEW view_2_tab1_406

statement ok
DROP VIEW view_3_tab1_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_406') DROP VIEW view_1_tab2_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_406') DROP VIEW view_2_tab2_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_406') DROP VIEW view_3_tab2_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_406

statement ok
CREATE VIEW view_1_tab2_406 AS SELECT pk, col0 FROM tab2 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69

statement ok
CREATE VIEW view_2_tab2_406 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)

statement ok
CREATE VIEW view_3_tab2_406 AS SELECT pk FROM view_1_tab2_406

query II rowsort label-2900-1
SELECT pk, col0 FROM tab2 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab2_406
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab2_406
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_406 UNION ALL SELECT pk, col0 FROM view_2_tab2_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_406 UNION SELECT pk, col0 FROM view_2_tab2_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 ) AS tab2_406
----
0
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab2_406
----
0
8

query I rowsort label-2900-3
SELECT pk FROM tab2 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
8

statement ok
DROP VIEW view_1_tab2_406

statement ok
DROP VIEW view_2_tab2_406

statement ok
DROP VIEW view_3_tab2_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_406') DROP VIEW view_1_tab3_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_406') DROP VIEW view_2_tab3_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_406') DROP VIEW view_3_tab3_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_406

statement ok
CREATE VIEW view_1_tab3_406 AS SELECT pk, col0 FROM tab3 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69

statement ok
CREATE VIEW view_2_tab3_406 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)

statement ok
CREATE VIEW view_3_tab3_406 AS SELECT pk FROM view_1_tab3_406

query II rowsort label-2900-1
SELECT pk, col0 FROM tab3 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab3_406
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab3_406
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_406 UNION ALL SELECT pk, col0 FROM view_2_tab3_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_406 UNION SELECT pk, col0 FROM view_2_tab3_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 ) AS tab3_406
----
0
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab3_406
----
0
8

query I rowsort label-2900-3
SELECT pk FROM tab3 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
8

statement ok
DROP VIEW view_1_tab3_406

statement ok
DROP VIEW view_2_tab3_406

statement ok
DROP VIEW view_3_tab3_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_406') DROP VIEW view_1_tab4_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_406') DROP VIEW view_2_tab4_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_406') DROP VIEW view_3_tab4_406

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_406

statement ok
CREATE VIEW view_1_tab4_406 AS SELECT pk, col0 FROM tab4 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69

statement ok
CREATE VIEW view_2_tab4_406 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)

statement ok
CREATE VIEW view_3_tab4_406 AS SELECT pk FROM view_1_tab4_406

query II rowsort label-2900-1
SELECT pk, col0 FROM tab4 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-2900-1
SELECT pk, col0 FROM view_1_tab4_406
----
0
60
8
94

query II rowsort label-2900-2
SELECT pk, col0 FROM view_2_tab4_406
----
16 values hashing to dc7ae175b6acce4af7263a6515d14027

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_406 UNION ALL SELECT pk, col0 FROM view_2_tab4_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_406 UNION SELECT pk, col0 FROM view_2_tab4_406
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-2900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69 ) AS tab4_406
----
0
8

query I rowsort label-2900-3
SELECT * FROM view_3_tab4_406
----
0
8

query I rowsort label-2900-3
SELECT pk FROM tab4 WHERE ((col0 > 21 AND col4 > 70.69 AND col4 > 33.45)) AND col3 >= 69
----
0
8

statement ok
DROP VIEW view_1_tab4_406

statement ok
DROP VIEW view_2_tab4_406

statement ok
DROP VIEW view_3_tab4_406

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_407') DROP VIEW view_1_tab0_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_407') DROP VIEW view_2_tab0_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_407') DROP VIEW view_3_tab0_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_407

statement ok
CREATE VIEW view_1_tab0_407 AS SELECT pk, col0 FROM tab0 WHERE col4 > 6.40

statement ok
CREATE VIEW view_2_tab0_407 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 6.40)

statement ok
CREATE VIEW view_3_tab0_407 AS SELECT pk FROM view_1_tab0_407

query II rowsort label-3000-1
SELECT pk, col0 FROM tab0 WHERE col4 > 6.40
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 6.40)
----

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab0_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab0_407
----

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 6.40 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_407 UNION ALL SELECT pk, col0 FROM view_2_tab0_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 6.40 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_407 UNION SELECT pk, col0 FROM view_2_tab0_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 6.40 ) AS tab0_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT * FROM view_3_tab0_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT pk FROM tab0 WHERE col4 > 6.40
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab0_407

statement ok
DROP VIEW view_2_tab0_407

statement ok
DROP VIEW view_3_tab0_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_407') DROP VIEW view_1_tab1_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_407') DROP VIEW view_2_tab1_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_407') DROP VIEW view_3_tab1_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_407

statement ok
CREATE VIEW view_1_tab1_407 AS SELECT pk, col0 FROM tab1 WHERE col4 > 6.40

statement ok
CREATE VIEW view_2_tab1_407 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 6.40)

statement ok
CREATE VIEW view_3_tab1_407 AS SELECT pk FROM view_1_tab1_407

query II rowsort label-3000-1
SELECT pk, col0 FROM tab1 WHERE col4 > 6.40
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 6.40)
----

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab1_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab1_407
----

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 6.40 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_407 UNION ALL SELECT pk, col0 FROM view_2_tab1_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 6.40 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_407 UNION SELECT pk, col0 FROM view_2_tab1_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 6.40 ) AS tab1_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT * FROM view_3_tab1_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT pk FROM tab1 WHERE col4 > 6.40
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab1_407

statement ok
DROP VIEW view_2_tab1_407

statement ok
DROP VIEW view_3_tab1_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_407') DROP VIEW view_1_tab2_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_407') DROP VIEW view_2_tab2_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_407') DROP VIEW view_3_tab2_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_407

statement ok
CREATE VIEW view_1_tab2_407 AS SELECT pk, col0 FROM tab2 WHERE col4 > 6.40

statement ok
CREATE VIEW view_2_tab2_407 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 6.40)

statement ok
CREATE VIEW view_3_tab2_407 AS SELECT pk FROM view_1_tab2_407

query II rowsort label-3000-1
SELECT pk, col0 FROM tab2 WHERE col4 > 6.40
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 6.40)
----

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab2_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab2_407
----

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 6.40 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_407 UNION ALL SELECT pk, col0 FROM view_2_tab2_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 6.40 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_407 UNION SELECT pk, col0 FROM view_2_tab2_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 6.40 ) AS tab2_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT * FROM view_3_tab2_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT pk FROM tab2 WHERE col4 > 6.40
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab2_407

statement ok
DROP VIEW view_2_tab2_407

statement ok
DROP VIEW view_3_tab2_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_407') DROP VIEW view_1_tab3_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_407') DROP VIEW view_2_tab3_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_407') DROP VIEW view_3_tab3_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_407

statement ok
CREATE VIEW view_1_tab3_407 AS SELECT pk, col0 FROM tab3 WHERE col4 > 6.40

statement ok
CREATE VIEW view_2_tab3_407 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 6.40)

statement ok
CREATE VIEW view_3_tab3_407 AS SELECT pk FROM view_1_tab3_407

query II rowsort label-3000-1
SELECT pk, col0 FROM tab3 WHERE col4 > 6.40
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 6.40)
----

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab3_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab3_407
----

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 6.40 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_407 UNION ALL SELECT pk, col0 FROM view_2_tab3_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 6.40 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_407 UNION SELECT pk, col0 FROM view_2_tab3_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 6.40 ) AS tab3_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT * FROM view_3_tab3_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT pk FROM tab3 WHERE col4 > 6.40
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab3_407

statement ok
DROP VIEW view_2_tab3_407

statement ok
DROP VIEW view_3_tab3_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_407') DROP VIEW view_1_tab4_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_407') DROP VIEW view_2_tab4_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_407') DROP VIEW view_3_tab4_407

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_407

statement ok
CREATE VIEW view_1_tab4_407 AS SELECT pk, col0 FROM tab4 WHERE col4 > 6.40

statement ok
CREATE VIEW view_2_tab4_407 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 6.40)

statement ok
CREATE VIEW view_3_tab4_407 AS SELECT pk FROM view_1_tab4_407

query II rowsort label-3000-1
SELECT pk, col0 FROM tab4 WHERE col4 > 6.40
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 6.40)
----

query II rowsort label-3000-1
SELECT pk, col0 FROM view_1_tab4_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3000-2
SELECT pk, col0 FROM view_2_tab4_407
----

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 6.40 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_407 UNION ALL SELECT pk, col0 FROM view_2_tab4_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 6.40 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 6.40)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_407 UNION SELECT pk, col0 FROM view_2_tab4_407
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 6.40 ) AS tab4_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT * FROM view_3_tab4_407
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

query I rowsort label-3000-3
SELECT pk FROM tab4 WHERE col4 > 6.40
----
10 values hashing to e20b902b49a98b1a05ed62804c757f94

statement ok
DROP VIEW view_1_tab4_407

statement ok
DROP VIEW view_2_tab4_407

statement ok
DROP VIEW view_3_tab4_407

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_408') DROP VIEW view_1_tab0_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_408') DROP VIEW view_2_tab0_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_408') DROP VIEW view_3_tab0_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_408

statement ok
CREATE VIEW view_1_tab0_408 AS SELECT pk, col0 FROM tab0 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5)))

statement ok
CREATE VIEW view_2_tab0_408 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))))

statement ok
CREATE VIEW view_3_tab0_408 AS SELECT pk FROM view_1_tab0_408

query II rowsort label-3100-1
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5)))
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab0_408
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab0_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_408 UNION ALL SELECT pk, col0 FROM view_2_tab0_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_408 UNION SELECT pk, col0 FROM view_2_tab0_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5))) ) AS tab0_408
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab0_408
----

query I rowsort label-3100-3
SELECT pk FROM tab0 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab0 WHERE col4 = 39.20 AND col3 <= 5)))
----

statement ok
DROP VIEW view_1_tab0_408

statement ok
DROP VIEW view_2_tab0_408

statement ok
DROP VIEW view_3_tab0_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_408') DROP VIEW view_1_tab1_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_408') DROP VIEW view_2_tab1_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_408') DROP VIEW view_3_tab1_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_408

statement ok
CREATE VIEW view_1_tab1_408 AS SELECT pk, col0 FROM tab1 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5)))

statement ok
CREATE VIEW view_2_tab1_408 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))))

statement ok
CREATE VIEW view_3_tab1_408 AS SELECT pk FROM view_1_tab1_408

query II rowsort label-3100-1
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5)))
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab1_408
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab1_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_408 UNION ALL SELECT pk, col0 FROM view_2_tab1_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_408 UNION SELECT pk, col0 FROM view_2_tab1_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5))) ) AS tab1_408
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab1_408
----

query I rowsort label-3100-3
SELECT pk FROM tab1 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab1 WHERE col4 = 39.20 AND col3 <= 5)))
----

statement ok
DROP VIEW view_1_tab1_408

statement ok
DROP VIEW view_2_tab1_408

statement ok
DROP VIEW view_3_tab1_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_408') DROP VIEW view_1_tab2_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_408') DROP VIEW view_2_tab2_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_408') DROP VIEW view_3_tab2_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_408

statement ok
CREATE VIEW view_1_tab2_408 AS SELECT pk, col0 FROM tab2 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5)))

statement ok
CREATE VIEW view_2_tab2_408 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))))

statement ok
CREATE VIEW view_3_tab2_408 AS SELECT pk FROM view_1_tab2_408

query II rowsort label-3100-1
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5)))
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab2_408
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab2_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_408 UNION ALL SELECT pk, col0 FROM view_2_tab2_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_408 UNION SELECT pk, col0 FROM view_2_tab2_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5))) ) AS tab2_408
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab2_408
----

query I rowsort label-3100-3
SELECT pk FROM tab2 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab2 WHERE col4 = 39.20 AND col3 <= 5)))
----

statement ok
DROP VIEW view_1_tab2_408

statement ok
DROP VIEW view_2_tab2_408

statement ok
DROP VIEW view_3_tab2_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_408') DROP VIEW view_1_tab3_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_408') DROP VIEW view_2_tab3_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_408') DROP VIEW view_3_tab3_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_408

statement ok
CREATE VIEW view_1_tab3_408 AS SELECT pk, col0 FROM tab3 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5)))

statement ok
CREATE VIEW view_2_tab3_408 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))))

statement ok
CREATE VIEW view_3_tab3_408 AS SELECT pk FROM view_1_tab3_408

query II rowsort label-3100-1
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5)))
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab3_408
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab3_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_408 UNION ALL SELECT pk, col0 FROM view_2_tab3_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_408 UNION SELECT pk, col0 FROM view_2_tab3_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5))) ) AS tab3_408
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab3_408
----

query I rowsort label-3100-3
SELECT pk FROM tab3 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab3 WHERE col4 = 39.20 AND col3 <= 5)))
----

statement ok
DROP VIEW view_1_tab3_408

statement ok
DROP VIEW view_2_tab3_408

statement ok
DROP VIEW view_3_tab3_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_408') DROP VIEW view_1_tab4_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_408') DROP VIEW view_2_tab4_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_408') DROP VIEW view_3_tab4_408

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_408

statement ok
CREATE VIEW view_1_tab4_408 AS SELECT pk, col0 FROM tab4 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5)))

statement ok
CREATE VIEW view_2_tab4_408 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))))

statement ok
CREATE VIEW view_3_tab4_408 AS SELECT pk FROM view_1_tab4_408

query II rowsort label-3100-1
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5)))
----

query II rowsort label-3100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3100-1
SELECT pk, col0 FROM view_1_tab4_408
----

query II rowsort label-3100-2
SELECT pk, col0 FROM view_2_tab4_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_408 UNION ALL SELECT pk, col0 FROM view_2_tab4_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_408 UNION SELECT pk, col0 FROM view_2_tab4_408
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5))) ) AS tab4_408
----

query I rowsort label-3100-3
SELECT * FROM view_3_tab4_408
----

query I rowsort label-3100-3
SELECT pk FROM tab4 WHERE col3 IS NULL AND (((((col1 < 63.79))) OR col0 >= 35 AND col4 > 76.20 AND col0 = 84 OR col0 <= 76 AND col3 IN (SELECT col0 FROM tab4 WHERE col4 = 39.20 AND col3 <= 5)))
----

statement ok
DROP VIEW view_1_tab4_408

statement ok
DROP VIEW view_2_tab4_408

statement ok
DROP VIEW view_3_tab4_408

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_409') DROP VIEW view_1_tab0_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_409') DROP VIEW view_2_tab0_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_409') DROP VIEW view_3_tab0_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_409

statement ok
CREATE VIEW view_1_tab0_409 AS SELECT pk, col0 FROM tab0 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25

statement ok
CREATE VIEW view_2_tab0_409 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)

statement ok
CREATE VIEW view_3_tab0_409 AS SELECT pk FROM view_1_tab0_409

query II rowsort label-3200-1
SELECT pk, col0 FROM tab0 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab0_409
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab0_409
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_409 UNION ALL SELECT pk, col0 FROM view_2_tab0_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_409 UNION SELECT pk, col0 FROM view_2_tab0_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 ) AS tab0_409
----
4
5
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab0_409
----
4
5
8

query I rowsort label-3200-3
SELECT pk FROM tab0 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab0 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
5
8

statement ok
DROP VIEW view_1_tab0_409

statement ok
DROP VIEW view_2_tab0_409

statement ok
DROP VIEW view_3_tab0_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_409') DROP VIEW view_1_tab1_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_409') DROP VIEW view_2_tab1_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_409') DROP VIEW view_3_tab1_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_409

statement ok
CREATE VIEW view_1_tab1_409 AS SELECT pk, col0 FROM tab1 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25

statement ok
CREATE VIEW view_2_tab1_409 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)

statement ok
CREATE VIEW view_3_tab1_409 AS SELECT pk FROM view_1_tab1_409

query II rowsort label-3200-1
SELECT pk, col0 FROM tab1 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab1_409
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab1_409
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_409 UNION ALL SELECT pk, col0 FROM view_2_tab1_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_409 UNION SELECT pk, col0 FROM view_2_tab1_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 ) AS tab1_409
----
4
5
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab1_409
----
4
5
8

query I rowsort label-3200-3
SELECT pk FROM tab1 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab1 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
5
8

statement ok
DROP VIEW view_1_tab1_409

statement ok
DROP VIEW view_2_tab1_409

statement ok
DROP VIEW view_3_tab1_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_409') DROP VIEW view_1_tab2_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_409') DROP VIEW view_2_tab2_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_409') DROP VIEW view_3_tab2_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_409

statement ok
CREATE VIEW view_1_tab2_409 AS SELECT pk, col0 FROM tab2 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25

statement ok
CREATE VIEW view_2_tab2_409 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)

statement ok
CREATE VIEW view_3_tab2_409 AS SELECT pk FROM view_1_tab2_409

query II rowsort label-3200-1
SELECT pk, col0 FROM tab2 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab2_409
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab2_409
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_409 UNION ALL SELECT pk, col0 FROM view_2_tab2_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_409 UNION SELECT pk, col0 FROM view_2_tab2_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 ) AS tab2_409
----
4
5
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab2_409
----
4
5
8

query I rowsort label-3200-3
SELECT pk FROM tab2 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab2 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
5
8

statement ok
DROP VIEW view_1_tab2_409

statement ok
DROP VIEW view_2_tab2_409

statement ok
DROP VIEW view_3_tab2_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_409') DROP VIEW view_1_tab3_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_409') DROP VIEW view_2_tab3_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_409') DROP VIEW view_3_tab3_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_409

statement ok
CREATE VIEW view_1_tab3_409 AS SELECT pk, col0 FROM tab3 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25

statement ok
CREATE VIEW view_2_tab3_409 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)

statement ok
CREATE VIEW view_3_tab3_409 AS SELECT pk FROM view_1_tab3_409

query II rowsort label-3200-1
SELECT pk, col0 FROM tab3 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab3_409
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab3_409
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_409 UNION ALL SELECT pk, col0 FROM view_2_tab3_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_409 UNION SELECT pk, col0 FROM view_2_tab3_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 ) AS tab3_409
----
4
5
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab3_409
----
4
5
8

query I rowsort label-3200-3
SELECT pk FROM tab3 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab3 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
5
8

statement ok
DROP VIEW view_1_tab3_409

statement ok
DROP VIEW view_2_tab3_409

statement ok
DROP VIEW view_3_tab3_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_409') DROP VIEW view_1_tab4_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_409') DROP VIEW view_2_tab4_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_409') DROP VIEW view_3_tab4_409

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_409

statement ok
CREATE VIEW view_1_tab4_409 AS SELECT pk, col0 FROM tab4 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25

statement ok
CREATE VIEW view_2_tab4_409 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)

statement ok
CREATE VIEW view_3_tab4_409 AS SELECT pk FROM view_1_tab4_409

query II rowsort label-3200-1
SELECT pk, col0 FROM tab4 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-3200-1
SELECT pk, col0 FROM view_1_tab4_409
----
4
18
5
85
8
94

query II rowsort label-3200-2
SELECT pk, col0 FROM view_2_tab4_409
----
14 values hashing to f9bbb7fa1c7f086aafca67d46c875aea

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_409 UNION ALL SELECT pk, col0 FROM view_2_tab4_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_409 UNION SELECT pk, col0 FROM view_2_tab4_409
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25 ) AS tab4_409
----
4
5
8

query I rowsort label-3200-3
SELECT * FROM view_3_tab4_409
----
4
5
8

query I rowsort label-3200-3
SELECT pk FROM tab4 WHERE ((((col1 >= 65.44)))) OR ((col3 > 70 AND ((col0 < 62)) AND col4 >= 89.36 OR (col3 >= 98 OR col4 >= 21.28 OR (col1 IN (52.93,89.6,99.79,20.53,93.94))) OR col3 > 47)) AND col3 IS NULL OR col3 > 66 AND (((col3 = 15))) AND col4 > 59.22 OR ((((col0 IN (11) OR ((((col4 < 35.77))))))) AND col1 >= 6.83 OR ((col3 < 74 OR col4 < 50.68 OR col0 >= 69 AND ((col1 = 33.73) OR col4 IS NULL) OR ((col0 IN (SELECT col3 FROM tab4 WHERE (col0 > 32)) OR col3 = 34)) AND col3 IN (89) AND col3 = 75 AND col4 = 2.93 AND ((col1 = 15.25) AND col4 = 91.37 AND col3 >= 92 OR (col0 < 47 OR col4 >= 43.76 OR ((col1 > 13.13)) OR (col0 = 1) OR col0 < 74))) AND (col3 >= 41)) AND col3 <= 78 AND (col3 IS NULL)) AND col0 >= 77 AND col4 = 56.25
----
4
5
8

statement ok
DROP VIEW view_1_tab4_409

statement ok
DROP VIEW view_2_tab4_409

statement ok
DROP VIEW view_3_tab4_409

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_410') DROP VIEW view_1_tab0_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_410') DROP VIEW view_2_tab0_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_410') DROP VIEW view_3_tab0_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_410

statement ok
CREATE VIEW view_1_tab0_410 AS SELECT pk, col0 FROM tab0 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))

statement ok
CREATE VIEW view_2_tab0_410 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))

statement ok
CREATE VIEW view_3_tab0_410 AS SELECT pk FROM view_1_tab0_410

query II rowsort label-3300-1
SELECT pk, col0 FROM tab0 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
5
85

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab0_410
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab0_410
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_410 UNION ALL SELECT pk, col0 FROM view_2_tab0_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_410 UNION SELECT pk, col0 FROM view_2_tab0_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) ) AS tab0_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT * FROM view_3_tab0_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT pk FROM tab0 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab0 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab0 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab0_410

statement ok
DROP VIEW view_2_tab0_410

statement ok
DROP VIEW view_3_tab0_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_410') DROP VIEW view_1_tab1_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_410') DROP VIEW view_2_tab1_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_410') DROP VIEW view_3_tab1_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_410

statement ok
CREATE VIEW view_1_tab1_410 AS SELECT pk, col0 FROM tab1 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))

statement ok
CREATE VIEW view_2_tab1_410 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))

statement ok
CREATE VIEW view_3_tab1_410 AS SELECT pk FROM view_1_tab1_410

query II rowsort label-3300-1
SELECT pk, col0 FROM tab1 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
5
85

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab1_410
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab1_410
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_410 UNION ALL SELECT pk, col0 FROM view_2_tab1_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_410 UNION SELECT pk, col0 FROM view_2_tab1_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) ) AS tab1_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT * FROM view_3_tab1_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT pk FROM tab1 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab1 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab1 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab1_410

statement ok
DROP VIEW view_2_tab1_410

statement ok
DROP VIEW view_3_tab1_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_410') DROP VIEW view_1_tab2_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_410') DROP VIEW view_2_tab2_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_410') DROP VIEW view_3_tab2_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_410

statement ok
CREATE VIEW view_1_tab2_410 AS SELECT pk, col0 FROM tab2 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))

statement ok
CREATE VIEW view_2_tab2_410 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))

statement ok
CREATE VIEW view_3_tab2_410 AS SELECT pk FROM view_1_tab2_410

query II rowsort label-3300-1
SELECT pk, col0 FROM tab2 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
5
85

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab2_410
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab2_410
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_410 UNION ALL SELECT pk, col0 FROM view_2_tab2_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_410 UNION SELECT pk, col0 FROM view_2_tab2_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) ) AS tab2_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT * FROM view_3_tab2_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT pk FROM tab2 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab2 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab2 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab2_410

statement ok
DROP VIEW view_2_tab2_410

statement ok
DROP VIEW view_3_tab2_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_410') DROP VIEW view_1_tab3_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_410') DROP VIEW view_2_tab3_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_410') DROP VIEW view_3_tab3_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_410

statement ok
CREATE VIEW view_1_tab3_410 AS SELECT pk, col0 FROM tab3 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))

statement ok
CREATE VIEW view_2_tab3_410 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))

statement ok
CREATE VIEW view_3_tab3_410 AS SELECT pk FROM view_1_tab3_410

query II rowsort label-3300-1
SELECT pk, col0 FROM tab3 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
5
85

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab3_410
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab3_410
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_410 UNION ALL SELECT pk, col0 FROM view_2_tab3_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_410 UNION SELECT pk, col0 FROM view_2_tab3_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) ) AS tab3_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT * FROM view_3_tab3_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT pk FROM tab3 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab3 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab3 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab3_410

statement ok
DROP VIEW view_2_tab3_410

statement ok
DROP VIEW view_3_tab3_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_410') DROP VIEW view_1_tab4_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_410') DROP VIEW view_2_tab4_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_410') DROP VIEW view_3_tab4_410

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_410

statement ok
CREATE VIEW view_1_tab4_410 AS SELECT pk, col0 FROM tab4 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))

statement ok
CREATE VIEW view_2_tab4_410 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))

statement ok
CREATE VIEW view_3_tab4_410 AS SELECT pk FROM view_1_tab4_410

query II rowsort label-3300-1
SELECT pk, col0 FROM tab4 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
5
85

query II rowsort label-3300-1
SELECT pk, col0 FROM view_1_tab4_410
----
18 values hashing to 2742395c9ed61633e6f7ba4dbd02a9db

query II rowsort label-3300-2
SELECT pk, col0 FROM view_2_tab4_410
----
5
85

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_410 UNION ALL SELECT pk, col0 FROM view_2_tab4_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_410 UNION SELECT pk, col0 FROM view_2_tab4_410
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58)) ) AS tab4_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT * FROM view_3_tab4_410
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

query I rowsort label-3300-3
SELECT pk FROM tab4 WHERE col3 <= 67 AND ((col4 < 56.31 AND (col3 < 40) AND (col0 > 12 OR ((col0 > 16 AND (col3 < 4)) AND (((((col1 = 27.19)) AND (col0 <= 96 OR ((col3 = 28))) AND (((col3 >= 57 AND (col3 <= 88)))) AND (col4 = 54.2))) OR col1 > 15.58) AND (((((col0 IN (41,52,87,23,92) AND (((((col4 >= 0.42))) AND (col3 < 48)))))) AND col0 >= 85)) AND col0 < 48)) OR (col3 < 1 OR (((col0 IS NULL OR col0 <= 19 OR col0 > 47 AND (col4 < 16.27) AND col4 > 36.78 AND col3 = 86 AND col0 > 68) AND col0 > 37) OR (col3 < 54) AND col3 <= 90 OR (col1 > 17.61) OR col3 <= 95 AND col3 BETWEEN 39 AND 15) AND (col3 = 76)) AND col3 > 59 AND (((col1 < 16.27))))) AND col3 > 49 AND ((col0 <= 34 AND col0 > 65)) AND (col4 >= 15.10) OR col1 <= 80.69 OR (col0 = 8) AND col1 IN (48.30) OR col1 < 44.95 OR col3 < 15 AND (col3 <= 98 OR col4 < 64.94) OR ((col4 >= 60.48)) AND col3 IN (17,13,81,2) AND col0 > 92 AND col0 > 57 AND (col4 = 88.82 OR col3 IN (SELECT col0 FROM tab4 WHERE col4 < 67.97)) AND col0 < 58 OR (col0 > 85 OR col0 = 48 OR (((col0 IN (77,78,25) OR col4 < 62.60 OR (col0 < 90))) AND (((col3 < 9) AND col1 = 17.55) AND col3 > 10 AND ((col1 >= 31.81 AND col0 BETWEEN 31 AND 70)) OR (col1 >= 52.28 AND col0 >= 61)) AND (col0 >= 48) AND col0 IS NULL AND (col1 <= 44.89) OR col3 < 26 OR col0 <= 71) AND ((col3 = 83 OR col3 = 0 OR (col0 >= 37 OR col3 > 5 AND col0 > 14 OR col4 = 20.74) AND col1 = 35.38))) OR col0 < 73 OR col3 IN (2,59) OR (col4 = 49.45) AND col4 >= 96.0 OR col1 <= 72.38 OR col4 > 46.20 OR (col1 IS NULL) OR ((col3 IN (SELECT col0 FROM tab4 WHERE (col0 <= 30) OR (((col0 >= 46 OR col0 = 9)) AND col0 >= 3)))) AND ((col3 > 67) OR col4 < 69.51) OR ((col0 IN (10,79,35)) OR col0 = 77 OR col3 <= 41 OR col3 > 19 AND (col0 <= 58))
----
9 values hashing to 7c052a6f22ec636843783dd115badb9d

statement ok
DROP VIEW view_1_tab4_410

statement ok
DROP VIEW view_2_tab4_410

statement ok
DROP VIEW view_3_tab4_410

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_411') DROP VIEW view_1_tab0_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_411') DROP VIEW view_2_tab0_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_411') DROP VIEW view_3_tab0_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_411

statement ok
CREATE VIEW view_1_tab0_411 AS SELECT pk, col0 FROM tab0 WHERE (((col0 > 57 OR col1 <= 75.61)))

statement ok
CREATE VIEW view_2_tab0_411 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))

statement ok
CREATE VIEW view_3_tab0_411 AS SELECT pk FROM view_1_tab0_411

query II rowsort label-3400-1
SELECT pk, col0 FROM tab0 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
4
18

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab0_411
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab0_411
----
4
18

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_411 UNION ALL SELECT pk, col0 FROM view_2_tab0_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_411 UNION SELECT pk, col0 FROM view_2_tab0_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col0 > 57 OR col1 <= 75.61))) ) AS tab0_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT * FROM view_3_tab0_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT pk FROM tab0 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab0_411

statement ok
DROP VIEW view_2_tab0_411

statement ok
DROP VIEW view_3_tab0_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_411') DROP VIEW view_1_tab1_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_411') DROP VIEW view_2_tab1_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_411') DROP VIEW view_3_tab1_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_411

statement ok
CREATE VIEW view_1_tab1_411 AS SELECT pk, col0 FROM tab1 WHERE (((col0 > 57 OR col1 <= 75.61)))

statement ok
CREATE VIEW view_2_tab1_411 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))

statement ok
CREATE VIEW view_3_tab1_411 AS SELECT pk FROM view_1_tab1_411

query II rowsort label-3400-1
SELECT pk, col0 FROM tab1 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
4
18

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab1_411
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab1_411
----
4
18

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_411 UNION ALL SELECT pk, col0 FROM view_2_tab1_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_411 UNION SELECT pk, col0 FROM view_2_tab1_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col0 > 57 OR col1 <= 75.61))) ) AS tab1_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT * FROM view_3_tab1_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT pk FROM tab1 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab1_411

statement ok
DROP VIEW view_2_tab1_411

statement ok
DROP VIEW view_3_tab1_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_411') DROP VIEW view_1_tab2_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_411') DROP VIEW view_2_tab2_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_411') DROP VIEW view_3_tab2_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_411

statement ok
CREATE VIEW view_1_tab2_411 AS SELECT pk, col0 FROM tab2 WHERE (((col0 > 57 OR col1 <= 75.61)))

statement ok
CREATE VIEW view_2_tab2_411 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))

statement ok
CREATE VIEW view_3_tab2_411 AS SELECT pk FROM view_1_tab2_411

query II rowsort label-3400-1
SELECT pk, col0 FROM tab2 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
4
18

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab2_411
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab2_411
----
4
18

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_411 UNION ALL SELECT pk, col0 FROM view_2_tab2_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_411 UNION SELECT pk, col0 FROM view_2_tab2_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col0 > 57 OR col1 <= 75.61))) ) AS tab2_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT * FROM view_3_tab2_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT pk FROM tab2 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab2_411

statement ok
DROP VIEW view_2_tab2_411

statement ok
DROP VIEW view_3_tab2_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_411') DROP VIEW view_1_tab3_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_411') DROP VIEW view_2_tab3_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_411') DROP VIEW view_3_tab3_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_411

statement ok
CREATE VIEW view_1_tab3_411 AS SELECT pk, col0 FROM tab3 WHERE (((col0 > 57 OR col1 <= 75.61)))

statement ok
CREATE VIEW view_2_tab3_411 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))

statement ok
CREATE VIEW view_3_tab3_411 AS SELECT pk FROM view_1_tab3_411

query II rowsort label-3400-1
SELECT pk, col0 FROM tab3 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
4
18

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab3_411
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab3_411
----
4
18

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_411 UNION ALL SELECT pk, col0 FROM view_2_tab3_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_411 UNION SELECT pk, col0 FROM view_2_tab3_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col0 > 57 OR col1 <= 75.61))) ) AS tab3_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT * FROM view_3_tab3_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT pk FROM tab3 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab3_411

statement ok
DROP VIEW view_2_tab3_411

statement ok
DROP VIEW view_3_tab3_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_411') DROP VIEW view_1_tab4_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_411') DROP VIEW view_2_tab4_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_411') DROP VIEW view_3_tab4_411

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_411

statement ok
CREATE VIEW view_1_tab4_411 AS SELECT pk, col0 FROM tab4 WHERE (((col0 > 57 OR col1 <= 75.61)))

statement ok
CREATE VIEW view_2_tab4_411 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))

statement ok
CREATE VIEW view_3_tab4_411 AS SELECT pk FROM view_1_tab4_411

query II rowsort label-3400-1
SELECT pk, col0 FROM tab4 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
4
18

query II rowsort label-3400-1
SELECT pk, col0 FROM view_1_tab4_411
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-3400-2
SELECT pk, col0 FROM view_2_tab4_411
----
4
18

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_411 UNION ALL SELECT pk, col0 FROM view_2_tab4_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col0 > 57 OR col1 <= 75.61))) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col0 > 57 OR col1 <= 75.61))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_411 UNION SELECT pk, col0 FROM view_2_tab4_411
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col0 > 57 OR col1 <= 75.61))) ) AS tab4_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT * FROM view_3_tab4_411
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

query I rowsort label-3400-3
SELECT pk FROM tab4 WHERE (((col0 > 57 OR col1 <= 75.61)))
----
9 values hashing to 4290bd41ca7ca69dc280e33882d8e9de

statement ok
DROP VIEW view_1_tab4_411

statement ok
DROP VIEW view_2_tab4_411

statement ok
DROP VIEW view_3_tab4_411

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_412') DROP VIEW view_1_tab0_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_412') DROP VIEW view_2_tab0_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_412') DROP VIEW view_3_tab0_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_412

statement ok
CREATE VIEW view_1_tab0_412 AS SELECT pk, col0 FROM tab0 WHERE col0 > 94

statement ok
CREATE VIEW view_2_tab0_412 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 94)

statement ok
CREATE VIEW view_3_tab0_412 AS SELECT pk FROM view_1_tab0_412

query II rowsort label-3500-1
SELECT pk, col0 FROM tab0 WHERE col0 > 94
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 > 94)
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab0_412
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab0_412
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_412 UNION ALL SELECT pk, col0 FROM view_2_tab0_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_412 UNION SELECT pk, col0 FROM view_2_tab0_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 > 94 ) AS tab0_412
----
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab0_412
----
9

query I rowsort label-3500-3
SELECT pk FROM tab0 WHERE col0 > 94
----
9

statement ok
DROP VIEW view_1_tab0_412

statement ok
DROP VIEW view_2_tab0_412

statement ok
DROP VIEW view_3_tab0_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_412') DROP VIEW view_1_tab1_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_412') DROP VIEW view_2_tab1_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_412') DROP VIEW view_3_tab1_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_412

statement ok
CREATE VIEW view_1_tab1_412 AS SELECT pk, col0 FROM tab1 WHERE col0 > 94

statement ok
CREATE VIEW view_2_tab1_412 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 94)

statement ok
CREATE VIEW view_3_tab1_412 AS SELECT pk FROM view_1_tab1_412

query II rowsort label-3500-1
SELECT pk, col0 FROM tab1 WHERE col0 > 94
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 > 94)
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab1_412
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab1_412
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_412 UNION ALL SELECT pk, col0 FROM view_2_tab1_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_412 UNION SELECT pk, col0 FROM view_2_tab1_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 > 94 ) AS tab1_412
----
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab1_412
----
9

query I rowsort label-3500-3
SELECT pk FROM tab1 WHERE col0 > 94
----
9

statement ok
DROP VIEW view_1_tab1_412

statement ok
DROP VIEW view_2_tab1_412

statement ok
DROP VIEW view_3_tab1_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_412') DROP VIEW view_1_tab2_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_412') DROP VIEW view_2_tab2_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_412') DROP VIEW view_3_tab2_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_412

statement ok
CREATE VIEW view_1_tab2_412 AS SELECT pk, col0 FROM tab2 WHERE col0 > 94

statement ok
CREATE VIEW view_2_tab2_412 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 94)

statement ok
CREATE VIEW view_3_tab2_412 AS SELECT pk FROM view_1_tab2_412

query II rowsort label-3500-1
SELECT pk, col0 FROM tab2 WHERE col0 > 94
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 > 94)
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab2_412
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab2_412
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_412 UNION ALL SELECT pk, col0 FROM view_2_tab2_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_412 UNION SELECT pk, col0 FROM view_2_tab2_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 > 94 ) AS tab2_412
----
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab2_412
----
9

query I rowsort label-3500-3
SELECT pk FROM tab2 WHERE col0 > 94
----
9

statement ok
DROP VIEW view_1_tab2_412

statement ok
DROP VIEW view_2_tab2_412

statement ok
DROP VIEW view_3_tab2_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_412') DROP VIEW view_1_tab3_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_412') DROP VIEW view_2_tab3_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_412') DROP VIEW view_3_tab3_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_412

statement ok
CREATE VIEW view_1_tab3_412 AS SELECT pk, col0 FROM tab3 WHERE col0 > 94

statement ok
CREATE VIEW view_2_tab3_412 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 94)

statement ok
CREATE VIEW view_3_tab3_412 AS SELECT pk FROM view_1_tab3_412

query II rowsort label-3500-1
SELECT pk, col0 FROM tab3 WHERE col0 > 94
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 > 94)
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab3_412
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab3_412
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_412 UNION ALL SELECT pk, col0 FROM view_2_tab3_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_412 UNION SELECT pk, col0 FROM view_2_tab3_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 > 94 ) AS tab3_412
----
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab3_412
----
9

query I rowsort label-3500-3
SELECT pk FROM tab3 WHERE col0 > 94
----
9

statement ok
DROP VIEW view_1_tab3_412

statement ok
DROP VIEW view_2_tab3_412

statement ok
DROP VIEW view_3_tab3_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_412') DROP VIEW view_1_tab4_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_412') DROP VIEW view_2_tab4_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_412') DROP VIEW view_3_tab4_412

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_412

statement ok
CREATE VIEW view_1_tab4_412 AS SELECT pk, col0 FROM tab4 WHERE col0 > 94

statement ok
CREATE VIEW view_2_tab4_412 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 94)

statement ok
CREATE VIEW view_3_tab4_412 AS SELECT pk FROM view_1_tab4_412

query II rowsort label-3500-1
SELECT pk, col0 FROM tab4 WHERE col0 > 94
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 > 94)
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

query II rowsort label-3500-1
SELECT pk, col0 FROM view_1_tab4_412
----
9
95

query II rowsort label-3500-2
SELECT pk, col0 FROM view_2_tab4_412
----
18 values hashing to 8a13f14531ae78e98064db3feb3040e9

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_412 UNION ALL SELECT pk, col0 FROM view_2_tab4_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_412 UNION SELECT pk, col0 FROM view_2_tab4_412
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 > 94 ) AS tab4_412
----
9

query I rowsort label-3500-3
SELECT * FROM view_3_tab4_412
----
9

query I rowsort label-3500-3
SELECT pk FROM tab4 WHERE col0 > 94
----
9

statement ok
DROP VIEW view_1_tab4_412

statement ok
DROP VIEW view_2_tab4_412

statement ok
DROP VIEW view_3_tab4_412

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_413') DROP VIEW view_1_tab0_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_413') DROP VIEW view_2_tab0_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_413') DROP VIEW view_3_tab0_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_413

statement ok
CREATE VIEW view_1_tab0_413 AS SELECT pk, col0 FROM tab0 WHERE (col1 <= 40.38)

statement ok
CREATE VIEW view_2_tab0_413 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 40.38))

statement ok
CREATE VIEW view_3_tab0_413 AS SELECT pk FROM view_1_tab0_413

query II rowsort label-3600-1
SELECT pk, col0 FROM tab0 WHERE (col1 <= 40.38)
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 40.38))
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab0_413
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab0_413
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 <= 40.38) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_413 UNION ALL SELECT pk, col0 FROM view_2_tab0_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 <= 40.38) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_413 UNION SELECT pk, col0 FROM view_2_tab0_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 <= 40.38) ) AS tab0_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT * FROM view_3_tab0_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT pk FROM tab0 WHERE (col1 <= 40.38)
----
0
2
7
9

statement ok
DROP VIEW view_1_tab0_413

statement ok
DROP VIEW view_2_tab0_413

statement ok
DROP VIEW view_3_tab0_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_413') DROP VIEW view_1_tab1_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_413') DROP VIEW view_2_tab1_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_413') DROP VIEW view_3_tab1_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_413

statement ok
CREATE VIEW view_1_tab1_413 AS SELECT pk, col0 FROM tab1 WHERE (col1 <= 40.38)

statement ok
CREATE VIEW view_2_tab1_413 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 40.38))

statement ok
CREATE VIEW view_3_tab1_413 AS SELECT pk FROM view_1_tab1_413

query II rowsort label-3600-1
SELECT pk, col0 FROM tab1 WHERE (col1 <= 40.38)
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 40.38))
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab1_413
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab1_413
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 <= 40.38) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_413 UNION ALL SELECT pk, col0 FROM view_2_tab1_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 <= 40.38) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_413 UNION SELECT pk, col0 FROM view_2_tab1_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 <= 40.38) ) AS tab1_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT * FROM view_3_tab1_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT pk FROM tab1 WHERE (col1 <= 40.38)
----
0
2
7
9

statement ok
DROP VIEW view_1_tab1_413

statement ok
DROP VIEW view_2_tab1_413

statement ok
DROP VIEW view_3_tab1_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_413') DROP VIEW view_1_tab2_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_413') DROP VIEW view_2_tab2_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_413') DROP VIEW view_3_tab2_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_413

statement ok
CREATE VIEW view_1_tab2_413 AS SELECT pk, col0 FROM tab2 WHERE (col1 <= 40.38)

statement ok
CREATE VIEW view_2_tab2_413 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 40.38))

statement ok
CREATE VIEW view_3_tab2_413 AS SELECT pk FROM view_1_tab2_413

query II rowsort label-3600-1
SELECT pk, col0 FROM tab2 WHERE (col1 <= 40.38)
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 40.38))
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab2_413
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab2_413
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 <= 40.38) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_413 UNION ALL SELECT pk, col0 FROM view_2_tab2_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 <= 40.38) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_413 UNION SELECT pk, col0 FROM view_2_tab2_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 <= 40.38) ) AS tab2_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT * FROM view_3_tab2_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT pk FROM tab2 WHERE (col1 <= 40.38)
----
0
2
7
9

statement ok
DROP VIEW view_1_tab2_413

statement ok
DROP VIEW view_2_tab2_413

statement ok
DROP VIEW view_3_tab2_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_413') DROP VIEW view_1_tab3_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_413') DROP VIEW view_2_tab3_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_413') DROP VIEW view_3_tab3_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_413

statement ok
CREATE VIEW view_1_tab3_413 AS SELECT pk, col0 FROM tab3 WHERE (col1 <= 40.38)

statement ok
CREATE VIEW view_2_tab3_413 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 40.38))

statement ok
CREATE VIEW view_3_tab3_413 AS SELECT pk FROM view_1_tab3_413

query II rowsort label-3600-1
SELECT pk, col0 FROM tab3 WHERE (col1 <= 40.38)
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 40.38))
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab3_413
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab3_413
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 <= 40.38) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_413 UNION ALL SELECT pk, col0 FROM view_2_tab3_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 <= 40.38) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_413 UNION SELECT pk, col0 FROM view_2_tab3_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 <= 40.38) ) AS tab3_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT * FROM view_3_tab3_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT pk FROM tab3 WHERE (col1 <= 40.38)
----
0
2
7
9

statement ok
DROP VIEW view_1_tab3_413

statement ok
DROP VIEW view_2_tab3_413

statement ok
DROP VIEW view_3_tab3_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_413') DROP VIEW view_1_tab4_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_413') DROP VIEW view_2_tab4_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_413') DROP VIEW view_3_tab4_413

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_413

statement ok
CREATE VIEW view_1_tab4_413 AS SELECT pk, col0 FROM tab4 WHERE (col1 <= 40.38)

statement ok
CREATE VIEW view_2_tab4_413 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 40.38))

statement ok
CREATE VIEW view_3_tab4_413 AS SELECT pk FROM view_1_tab4_413

query II rowsort label-3600-1
SELECT pk, col0 FROM tab4 WHERE (col1 <= 40.38)
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 40.38))
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-3600-1
SELECT pk, col0 FROM view_1_tab4_413
----
0
60
2
52
7
17
9
95

query II rowsort label-3600-2
SELECT pk, col0 FROM view_2_tab4_413
----
12 values hashing to dcd747cdf24cfa1452f711a9be0aa3ca

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 <= 40.38) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_413 UNION ALL SELECT pk, col0 FROM view_2_tab4_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 <= 40.38) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 <= 40.38))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_413 UNION SELECT pk, col0 FROM view_2_tab4_413
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 <= 40.38) ) AS tab4_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT * FROM view_3_tab4_413
----
0
2
7
9

query I rowsort label-3600-3
SELECT pk FROM tab4 WHERE (col1 <= 40.38)
----
0
2
7
9

statement ok
DROP VIEW view_1_tab4_413

statement ok
DROP VIEW view_2_tab4_413

statement ok
DROP VIEW view_3_tab4_413

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_414') DROP VIEW view_1_tab0_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_414') DROP VIEW view_2_tab0_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_414') DROP VIEW view_3_tab0_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_414

statement ok
CREATE VIEW view_1_tab0_414 AS SELECT pk, col0 FROM tab0 WHERE col1 < 57.24

statement ok
CREATE VIEW view_2_tab0_414 AS SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 57.24)

statement ok
CREATE VIEW view_3_tab0_414 AS SELECT pk FROM view_1_tab0_414

query II rowsort label-3700-1
SELECT pk, col0 FROM tab0 WHERE col1 < 57.24
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 57.24)
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab0_414
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab0_414
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 57.24 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_414 UNION ALL SELECT pk, col0 FROM view_2_tab0_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col1 < 57.24 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_414 UNION SELECT pk, col0 FROM view_2_tab0_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col1 < 57.24 ) AS tab0_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab0_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT pk FROM tab0 WHERE col1 < 57.24
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab0_414

statement ok
DROP VIEW view_2_tab0_414

statement ok
DROP VIEW view_3_tab0_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_414') DROP VIEW view_1_tab1_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_414') DROP VIEW view_2_tab1_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_414') DROP VIEW view_3_tab1_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_414

statement ok
CREATE VIEW view_1_tab1_414 AS SELECT pk, col0 FROM tab1 WHERE col1 < 57.24

statement ok
CREATE VIEW view_2_tab1_414 AS SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 57.24)

statement ok
CREATE VIEW view_3_tab1_414 AS SELECT pk FROM view_1_tab1_414

query II rowsort label-3700-1
SELECT pk, col0 FROM tab1 WHERE col1 < 57.24
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 57.24)
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab1_414
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab1_414
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 57.24 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_414 UNION ALL SELECT pk, col0 FROM view_2_tab1_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col1 < 57.24 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_414 UNION SELECT pk, col0 FROM view_2_tab1_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col1 < 57.24 ) AS tab1_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab1_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT pk FROM tab1 WHERE col1 < 57.24
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab1_414

statement ok
DROP VIEW view_2_tab1_414

statement ok
DROP VIEW view_3_tab1_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_414') DROP VIEW view_1_tab2_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_414') DROP VIEW view_2_tab2_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_414') DROP VIEW view_3_tab2_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_414

statement ok
CREATE VIEW view_1_tab2_414 AS SELECT pk, col0 FROM tab2 WHERE col1 < 57.24

statement ok
CREATE VIEW view_2_tab2_414 AS SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 57.24)

statement ok
CREATE VIEW view_3_tab2_414 AS SELECT pk FROM view_1_tab2_414

query II rowsort label-3700-1
SELECT pk, col0 FROM tab2 WHERE col1 < 57.24
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 57.24)
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab2_414
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab2_414
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 57.24 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_414 UNION ALL SELECT pk, col0 FROM view_2_tab2_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col1 < 57.24 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_414 UNION SELECT pk, col0 FROM view_2_tab2_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col1 < 57.24 ) AS tab2_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab2_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT pk FROM tab2 WHERE col1 < 57.24
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab2_414

statement ok
DROP VIEW view_2_tab2_414

statement ok
DROP VIEW view_3_tab2_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_414') DROP VIEW view_1_tab3_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_414') DROP VIEW view_2_tab3_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_414') DROP VIEW view_3_tab3_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_414

statement ok
CREATE VIEW view_1_tab3_414 AS SELECT pk, col0 FROM tab3 WHERE col1 < 57.24

statement ok
CREATE VIEW view_2_tab3_414 AS SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 57.24)

statement ok
CREATE VIEW view_3_tab3_414 AS SELECT pk FROM view_1_tab3_414

query II rowsort label-3700-1
SELECT pk, col0 FROM tab3 WHERE col1 < 57.24
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 57.24)
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab3_414
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab3_414
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 57.24 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_414 UNION ALL SELECT pk, col0 FROM view_2_tab3_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col1 < 57.24 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_414 UNION SELECT pk, col0 FROM view_2_tab3_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col1 < 57.24 ) AS tab3_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab3_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT pk FROM tab3 WHERE col1 < 57.24
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab3_414

statement ok
DROP VIEW view_2_tab3_414

statement ok
DROP VIEW view_3_tab3_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_414') DROP VIEW view_1_tab4_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_414') DROP VIEW view_2_tab4_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_414') DROP VIEW view_3_tab4_414

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_414

statement ok
CREATE VIEW view_1_tab4_414 AS SELECT pk, col0 FROM tab4 WHERE col1 < 57.24

statement ok
CREATE VIEW view_2_tab4_414 AS SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 57.24)

statement ok
CREATE VIEW view_3_tab4_414 AS SELECT pk FROM view_1_tab4_414

query II rowsort label-3700-1
SELECT pk, col0 FROM tab4 WHERE col1 < 57.24
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 57.24)
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-3700-1
SELECT pk, col0 FROM view_1_tab4_414
----
10 values hashing to e40ab77489dd7928b8d0452867407dfc

query II rowsort label-3700-2
SELECT pk, col0 FROM view_2_tab4_414
----
10 values hashing to 3d0b50f12c21a6404f0d15d876150739

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 57.24 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_414 UNION ALL SELECT pk, col0 FROM view_2_tab4_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col1 < 57.24 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col1 < 57.24)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_414 UNION SELECT pk, col0 FROM view_2_tab4_414
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col1 < 57.24 ) AS tab4_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT * FROM view_3_tab4_414
----
0
2
3
7
9

query I rowsort label-3700-3
SELECT pk FROM tab4 WHERE col1 < 57.24
----
0
2
3
7
9

statement ok
DROP VIEW view_1_tab4_414

statement ok
DROP VIEW view_2_tab4_414

statement ok
DROP VIEW view_3_tab4_414

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_415') DROP VIEW view_1_tab0_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_415') DROP VIEW view_2_tab0_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_415') DROP VIEW view_3_tab0_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_415

statement ok
CREATE VIEW view_1_tab0_415 AS SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71)))))

statement ok
CREATE VIEW view_2_tab0_415 AS SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))))

statement ok
CREATE VIEW view_3_tab0_415 AS SELECT pk FROM view_1_tab0_415

query II rowsort label-3800-1
SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71)))))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab0_415
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab0_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_415 UNION ALL SELECT pk, col0 FROM view_2_tab0_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_415 UNION SELECT pk, col0 FROM view_2_tab0_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71))))) ) AS tab0_415
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab0_415
----

query I rowsort label-3800-3
SELECT pk FROM tab0 WHERE col0 IN (SELECT col3 FROM tab0 WHERE ((((col0 > 71)))))
----

statement ok
DROP VIEW view_1_tab0_415

statement ok
DROP VIEW view_2_tab0_415

statement ok
DROP VIEW view_3_tab0_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_415') DROP VIEW view_1_tab1_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_415') DROP VIEW view_2_tab1_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_415') DROP VIEW view_3_tab1_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_415

statement ok
CREATE VIEW view_1_tab1_415 AS SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71)))))

statement ok
CREATE VIEW view_2_tab1_415 AS SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))))

statement ok
CREATE VIEW view_3_tab1_415 AS SELECT pk FROM view_1_tab1_415

query II rowsort label-3800-1
SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71)))))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab1_415
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab1_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_415 UNION ALL SELECT pk, col0 FROM view_2_tab1_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_415 UNION SELECT pk, col0 FROM view_2_tab1_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71))))) ) AS tab1_415
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab1_415
----

query I rowsort label-3800-3
SELECT pk FROM tab1 WHERE col0 IN (SELECT col3 FROM tab1 WHERE ((((col0 > 71)))))
----

statement ok
DROP VIEW view_1_tab1_415

statement ok
DROP VIEW view_2_tab1_415

statement ok
DROP VIEW view_3_tab1_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_415') DROP VIEW view_1_tab2_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_415') DROP VIEW view_2_tab2_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_415') DROP VIEW view_3_tab2_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_415

statement ok
CREATE VIEW view_1_tab2_415 AS SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71)))))

statement ok
CREATE VIEW view_2_tab2_415 AS SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))))

statement ok
CREATE VIEW view_3_tab2_415 AS SELECT pk FROM view_1_tab2_415

query II rowsort label-3800-1
SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71)))))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab2_415
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab2_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_415 UNION ALL SELECT pk, col0 FROM view_2_tab2_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_415 UNION SELECT pk, col0 FROM view_2_tab2_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71))))) ) AS tab2_415
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab2_415
----

query I rowsort label-3800-3
SELECT pk FROM tab2 WHERE col0 IN (SELECT col3 FROM tab2 WHERE ((((col0 > 71)))))
----

statement ok
DROP VIEW view_1_tab2_415

statement ok
DROP VIEW view_2_tab2_415

statement ok
DROP VIEW view_3_tab2_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_415') DROP VIEW view_1_tab3_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_415') DROP VIEW view_2_tab3_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_415') DROP VIEW view_3_tab3_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_415

statement ok
CREATE VIEW view_1_tab3_415 AS SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71)))))

statement ok
CREATE VIEW view_2_tab3_415 AS SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))))

statement ok
CREATE VIEW view_3_tab3_415 AS SELECT pk FROM view_1_tab3_415

query II rowsort label-3800-1
SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71)))))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab3_415
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab3_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_415 UNION ALL SELECT pk, col0 FROM view_2_tab3_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_415 UNION SELECT pk, col0 FROM view_2_tab3_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71))))) ) AS tab3_415
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab3_415
----

query I rowsort label-3800-3
SELECT pk FROM tab3 WHERE col0 IN (SELECT col3 FROM tab3 WHERE ((((col0 > 71)))))
----

statement ok
DROP VIEW view_1_tab3_415

statement ok
DROP VIEW view_2_tab3_415

statement ok
DROP VIEW view_3_tab3_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_415') DROP VIEW view_1_tab4_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_415') DROP VIEW view_2_tab4_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_415') DROP VIEW view_3_tab4_415

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_415

statement ok
CREATE VIEW view_1_tab4_415 AS SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71)))))

statement ok
CREATE VIEW view_2_tab4_415 AS SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))))

statement ok
CREATE VIEW view_3_tab4_415 AS SELECT pk FROM view_1_tab4_415

query II rowsort label-3800-1
SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71)))))
----

query II rowsort label-3800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-3800-1
SELECT pk, col0 FROM view_1_tab4_415
----

query II rowsort label-3800-2
SELECT pk, col0 FROM view_2_tab4_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_415 UNION ALL SELECT pk, col0 FROM view_2_tab4_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_415 UNION SELECT pk, col0 FROM view_2_tab4_415
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71))))) ) AS tab4_415
----

query I rowsort label-3800-3
SELECT * FROM view_3_tab4_415
----

query I rowsort label-3800-3
SELECT pk FROM tab4 WHERE col0 IN (SELECT col3 FROM tab4 WHERE ((((col0 > 71)))))
----

statement ok
DROP VIEW view_1_tab4_415

statement ok
DROP VIEW view_2_tab4_415

statement ok
DROP VIEW view_3_tab4_415

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_416') DROP VIEW view_1_tab0_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_416') DROP VIEW view_2_tab0_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_416') DROP VIEW view_3_tab0_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_416

statement ok
CREATE VIEW view_1_tab0_416 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)

statement ok
CREATE VIEW view_2_tab0_416 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))

statement ok
CREATE VIEW view_3_tab0_416 AS SELECT pk FROM view_1_tab0_416

query II rowsort label-3900-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
0
60

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab0_416
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab0_416
----
0
60

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_416 UNION ALL SELECT pk, col0 FROM view_2_tab0_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_416 UNION SELECT pk, col0 FROM view_2_tab0_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) ) AS tab0_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT * FROM view_3_tab0_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT pk FROM tab0 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab0_416

statement ok
DROP VIEW view_2_tab0_416

statement ok
DROP VIEW view_3_tab0_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_416') DROP VIEW view_1_tab1_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_416') DROP VIEW view_2_tab1_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_416') DROP VIEW view_3_tab1_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_416

statement ok
CREATE VIEW view_1_tab1_416 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)

statement ok
CREATE VIEW view_2_tab1_416 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))

statement ok
CREATE VIEW view_3_tab1_416 AS SELECT pk FROM view_1_tab1_416

query II rowsort label-3900-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
0
60

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab1_416
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab1_416
----
0
60

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_416 UNION ALL SELECT pk, col0 FROM view_2_tab1_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_416 UNION SELECT pk, col0 FROM view_2_tab1_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) ) AS tab1_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT * FROM view_3_tab1_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT pk FROM tab1 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab1_416

statement ok
DROP VIEW view_2_tab1_416

statement ok
DROP VIEW view_3_tab1_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_416') DROP VIEW view_1_tab2_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_416') DROP VIEW view_2_tab2_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_416') DROP VIEW view_3_tab2_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_416

statement ok
CREATE VIEW view_1_tab2_416 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)

statement ok
CREATE VIEW view_2_tab2_416 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))

statement ok
CREATE VIEW view_3_tab2_416 AS SELECT pk FROM view_1_tab2_416

query II rowsort label-3900-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
0
60

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab2_416
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab2_416
----
0
60

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_416 UNION ALL SELECT pk, col0 FROM view_2_tab2_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_416 UNION SELECT pk, col0 FROM view_2_tab2_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) ) AS tab2_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT * FROM view_3_tab2_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT pk FROM tab2 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab2_416

statement ok
DROP VIEW view_2_tab2_416

statement ok
DROP VIEW view_3_tab2_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_416') DROP VIEW view_1_tab3_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_416') DROP VIEW view_2_tab3_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_416') DROP VIEW view_3_tab3_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_416

statement ok
CREATE VIEW view_1_tab3_416 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)

statement ok
CREATE VIEW view_2_tab3_416 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))

statement ok
CREATE VIEW view_3_tab3_416 AS SELECT pk FROM view_1_tab3_416

query II rowsort label-3900-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
0
60

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab3_416
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab3_416
----
0
60

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_416 UNION ALL SELECT pk, col0 FROM view_2_tab3_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_416 UNION SELECT pk, col0 FROM view_2_tab3_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) ) AS tab3_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT * FROM view_3_tab3_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT pk FROM tab3 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab3_416

statement ok
DROP VIEW view_2_tab3_416

statement ok
DROP VIEW view_3_tab3_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_416') DROP VIEW view_1_tab4_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_416') DROP VIEW view_2_tab4_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_416') DROP VIEW view_3_tab4_416

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_416

statement ok
CREATE VIEW view_1_tab4_416 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)

statement ok
CREATE VIEW view_2_tab4_416 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))

statement ok
CREATE VIEW view_3_tab4_416 AS SELECT pk FROM view_1_tab4_416

query II rowsort label-3900-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
0
60

query II rowsort label-3900-1
SELECT pk, col0 FROM view_1_tab4_416
----
18 values hashing to 146ad9b2cd178a2ae75c6a623bfa4a86

query II rowsort label-3900-2
SELECT pk, col0 FROM view_2_tab4_416
----
0
60

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_416 UNION ALL SELECT pk, col0 FROM view_2_tab4_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_416 UNION SELECT pk, col0 FROM view_2_tab4_416
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-3900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19) ) AS tab4_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT * FROM view_3_tab4_416
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

query I rowsort label-3900-3
SELECT pk FROM tab4 WHERE col4 >= 23.12 AND (((((col3 <= 73) AND col0 >= 3 OR col0 < 34 OR ((col3 = 35)) AND (col0 < 90 AND (col3 >= 86 OR col3 IS NULL)) OR col1 >= 24.8)))) OR col4 < 66.43 AND ((col1 > 3.47 AND (col4 <= 12.35) AND ((((col0 = 91 OR (col3 <= 38))))))) OR col0 >= 67 OR col0 >= 90 AND (col0 >= 19)
----
9 values hashing to 22e400a2ddbb013acf2a5852d6ab69fc

statement ok
DROP VIEW view_1_tab4_416

statement ok
DROP VIEW view_2_tab4_416

statement ok
DROP VIEW view_3_tab4_416

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_417') DROP VIEW view_1_tab0_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_417') DROP VIEW view_2_tab0_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_417') DROP VIEW view_3_tab0_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_417

statement ok
CREATE VIEW view_1_tab0_417 AS SELECT pk, col0 FROM tab0 WHERE col4 >= 12.94

statement ok
CREATE VIEW view_2_tab0_417 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 12.94)

statement ok
CREATE VIEW view_3_tab0_417 AS SELECT pk FROM view_1_tab0_417

query II rowsort label-4000-1
SELECT pk, col0 FROM tab0 WHERE col4 >= 12.94
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 12.94)
----
5
85
9
95

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab0_417
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab0_417
----
5
85
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 12.94 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_417 UNION ALL SELECT pk, col0 FROM view_2_tab0_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 >= 12.94 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_417 UNION SELECT pk, col0 FROM view_2_tab0_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 >= 12.94 ) AS tab0_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab0_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT pk FROM tab0 WHERE col4 >= 12.94
----
0
1
2
3
4
6
7
8

statement ok
DROP VIEW view_1_tab0_417

statement ok
DROP VIEW view_2_tab0_417

statement ok
DROP VIEW view_3_tab0_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_417') DROP VIEW view_1_tab1_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_417') DROP VIEW view_2_tab1_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_417') DROP VIEW view_3_tab1_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_417

statement ok
CREATE VIEW view_1_tab1_417 AS SELECT pk, col0 FROM tab1 WHERE col4 >= 12.94

statement ok
CREATE VIEW view_2_tab1_417 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 12.94)

statement ok
CREATE VIEW view_3_tab1_417 AS SELECT pk FROM view_1_tab1_417

query II rowsort label-4000-1
SELECT pk, col0 FROM tab1 WHERE col4 >= 12.94
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 12.94)
----
5
85
9
95

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab1_417
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab1_417
----
5
85
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 12.94 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_417 UNION ALL SELECT pk, col0 FROM view_2_tab1_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 >= 12.94 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_417 UNION SELECT pk, col0 FROM view_2_tab1_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 >= 12.94 ) AS tab1_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab1_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT pk FROM tab1 WHERE col4 >= 12.94
----
0
1
2
3
4
6
7
8

statement ok
DROP VIEW view_1_tab1_417

statement ok
DROP VIEW view_2_tab1_417

statement ok
DROP VIEW view_3_tab1_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_417') DROP VIEW view_1_tab2_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_417') DROP VIEW view_2_tab2_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_417') DROP VIEW view_3_tab2_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_417

statement ok
CREATE VIEW view_1_tab2_417 AS SELECT pk, col0 FROM tab2 WHERE col4 >= 12.94

statement ok
CREATE VIEW view_2_tab2_417 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 12.94)

statement ok
CREATE VIEW view_3_tab2_417 AS SELECT pk FROM view_1_tab2_417

query II rowsort label-4000-1
SELECT pk, col0 FROM tab2 WHERE col4 >= 12.94
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 12.94)
----
5
85
9
95

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab2_417
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab2_417
----
5
85
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 12.94 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_417 UNION ALL SELECT pk, col0 FROM view_2_tab2_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 >= 12.94 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_417 UNION SELECT pk, col0 FROM view_2_tab2_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 >= 12.94 ) AS tab2_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab2_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT pk FROM tab2 WHERE col4 >= 12.94
----
0
1
2
3
4
6
7
8

statement ok
DROP VIEW view_1_tab2_417

statement ok
DROP VIEW view_2_tab2_417

statement ok
DROP VIEW view_3_tab2_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_417') DROP VIEW view_1_tab3_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_417') DROP VIEW view_2_tab3_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_417') DROP VIEW view_3_tab3_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_417

statement ok
CREATE VIEW view_1_tab3_417 AS SELECT pk, col0 FROM tab3 WHERE col4 >= 12.94

statement ok
CREATE VIEW view_2_tab3_417 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 12.94)

statement ok
CREATE VIEW view_3_tab3_417 AS SELECT pk FROM view_1_tab3_417

query II rowsort label-4000-1
SELECT pk, col0 FROM tab3 WHERE col4 >= 12.94
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 12.94)
----
5
85
9
95

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab3_417
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab3_417
----
5
85
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 12.94 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_417 UNION ALL SELECT pk, col0 FROM view_2_tab3_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 >= 12.94 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_417 UNION SELECT pk, col0 FROM view_2_tab3_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 >= 12.94 ) AS tab3_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab3_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT pk FROM tab3 WHERE col4 >= 12.94
----
0
1
2
3
4
6
7
8

statement ok
DROP VIEW view_1_tab3_417

statement ok
DROP VIEW view_2_tab3_417

statement ok
DROP VIEW view_3_tab3_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_417') DROP VIEW view_1_tab4_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_417') DROP VIEW view_2_tab4_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_417') DROP VIEW view_3_tab4_417

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_417

statement ok
CREATE VIEW view_1_tab4_417 AS SELECT pk, col0 FROM tab4 WHERE col4 >= 12.94

statement ok
CREATE VIEW view_2_tab4_417 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 12.94)

statement ok
CREATE VIEW view_3_tab4_417 AS SELECT pk FROM view_1_tab4_417

query II rowsort label-4000-1
SELECT pk, col0 FROM tab4 WHERE col4 >= 12.94
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 12.94)
----
5
85
9
95

query II rowsort label-4000-1
SELECT pk, col0 FROM view_1_tab4_417
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-4000-2
SELECT pk, col0 FROM view_2_tab4_417
----
5
85
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 12.94 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_417 UNION ALL SELECT pk, col0 FROM view_2_tab4_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 >= 12.94 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 >= 12.94)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_417 UNION SELECT pk, col0 FROM view_2_tab4_417
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 >= 12.94 ) AS tab4_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT * FROM view_3_tab4_417
----
0
1
2
3
4
6
7
8

query I rowsort label-4000-3
SELECT pk FROM tab4 WHERE col4 >= 12.94
----
0
1
2
3
4
6
7
8

statement ok
DROP VIEW view_1_tab4_417

statement ok
DROP VIEW view_2_tab4_417

statement ok
DROP VIEW view_3_tab4_417

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_418') DROP VIEW view_1_tab0_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_418') DROP VIEW view_2_tab0_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_418') DROP VIEW view_3_tab0_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_418

statement ok
CREATE VIEW view_1_tab0_418 AS SELECT pk, col0 FROM tab0 WHERE (col1 < 28.37)

statement ok
CREATE VIEW view_2_tab0_418 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 28.37))

statement ok
CREATE VIEW view_3_tab0_418 AS SELECT pk FROM view_1_tab0_418

query II rowsort label-4100-1
SELECT pk, col0 FROM tab0 WHERE (col1 < 28.37)
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 28.37))
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab0_418
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab0_418
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 < 28.37) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_418 UNION ALL SELECT pk, col0 FROM view_2_tab0_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 < 28.37) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_418 UNION SELECT pk, col0 FROM view_2_tab0_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 < 28.37) ) AS tab0_418
----
0
7

query I rowsort label-4100-3
SELECT * FROM view_3_tab0_418
----
0
7

query I rowsort label-4100-3
SELECT pk FROM tab0 WHERE (col1 < 28.37)
----
0
7

statement ok
DROP VIEW view_1_tab0_418

statement ok
DROP VIEW view_2_tab0_418

statement ok
DROP VIEW view_3_tab0_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_418') DROP VIEW view_1_tab1_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_418') DROP VIEW view_2_tab1_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_418') DROP VIEW view_3_tab1_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_418

statement ok
CREATE VIEW view_1_tab1_418 AS SELECT pk, col0 FROM tab1 WHERE (col1 < 28.37)

statement ok
CREATE VIEW view_2_tab1_418 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 28.37))

statement ok
CREATE VIEW view_3_tab1_418 AS SELECT pk FROM view_1_tab1_418

query II rowsort label-4100-1
SELECT pk, col0 FROM tab1 WHERE (col1 < 28.37)
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 28.37))
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab1_418
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab1_418
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 < 28.37) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_418 UNION ALL SELECT pk, col0 FROM view_2_tab1_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 < 28.37) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_418 UNION SELECT pk, col0 FROM view_2_tab1_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 < 28.37) ) AS tab1_418
----
0
7

query I rowsort label-4100-3
SELECT * FROM view_3_tab1_418
----
0
7

query I rowsort label-4100-3
SELECT pk FROM tab1 WHERE (col1 < 28.37)
----
0
7

statement ok
DROP VIEW view_1_tab1_418

statement ok
DROP VIEW view_2_tab1_418

statement ok
DROP VIEW view_3_tab1_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_418') DROP VIEW view_1_tab2_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_418') DROP VIEW view_2_tab2_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_418') DROP VIEW view_3_tab2_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_418

statement ok
CREATE VIEW view_1_tab2_418 AS SELECT pk, col0 FROM tab2 WHERE (col1 < 28.37)

statement ok
CREATE VIEW view_2_tab2_418 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 28.37))

statement ok
CREATE VIEW view_3_tab2_418 AS SELECT pk FROM view_1_tab2_418

query II rowsort label-4100-1
SELECT pk, col0 FROM tab2 WHERE (col1 < 28.37)
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 28.37))
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab2_418
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab2_418
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 < 28.37) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_418 UNION ALL SELECT pk, col0 FROM view_2_tab2_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 < 28.37) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_418 UNION SELECT pk, col0 FROM view_2_tab2_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 < 28.37) ) AS tab2_418
----
0
7

query I rowsort label-4100-3
SELECT * FROM view_3_tab2_418
----
0
7

query I rowsort label-4100-3
SELECT pk FROM tab2 WHERE (col1 < 28.37)
----
0
7

statement ok
DROP VIEW view_1_tab2_418

statement ok
DROP VIEW view_2_tab2_418

statement ok
DROP VIEW view_3_tab2_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_418') DROP VIEW view_1_tab3_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_418') DROP VIEW view_2_tab3_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_418') DROP VIEW view_3_tab3_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_418

statement ok
CREATE VIEW view_1_tab3_418 AS SELECT pk, col0 FROM tab3 WHERE (col1 < 28.37)

statement ok
CREATE VIEW view_2_tab3_418 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 28.37))

statement ok
CREATE VIEW view_3_tab3_418 AS SELECT pk FROM view_1_tab3_418

query II rowsort label-4100-1
SELECT pk, col0 FROM tab3 WHERE (col1 < 28.37)
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 28.37))
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab3_418
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab3_418
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 < 28.37) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_418 UNION ALL SELECT pk, col0 FROM view_2_tab3_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 < 28.37) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_418 UNION SELECT pk, col0 FROM view_2_tab3_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 < 28.37) ) AS tab3_418
----
0
7

query I rowsort label-4100-3
SELECT * FROM view_3_tab3_418
----
0
7

query I rowsort label-4100-3
SELECT pk FROM tab3 WHERE (col1 < 28.37)
----
0
7

statement ok
DROP VIEW view_1_tab3_418

statement ok
DROP VIEW view_2_tab3_418

statement ok
DROP VIEW view_3_tab3_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_418') DROP VIEW view_1_tab4_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_418') DROP VIEW view_2_tab4_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_418') DROP VIEW view_3_tab4_418

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_418

statement ok
CREATE VIEW view_1_tab4_418 AS SELECT pk, col0 FROM tab4 WHERE (col1 < 28.37)

statement ok
CREATE VIEW view_2_tab4_418 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 28.37))

statement ok
CREATE VIEW view_3_tab4_418 AS SELECT pk FROM view_1_tab4_418

query II rowsort label-4100-1
SELECT pk, col0 FROM tab4 WHERE (col1 < 28.37)
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 28.37))
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-4100-1
SELECT pk, col0 FROM view_1_tab4_418
----
0
60
7
17

query II rowsort label-4100-2
SELECT pk, col0 FROM view_2_tab4_418
----
16 values hashing to 157a5ab9b92933f3c9c25ee179ade4ad

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 < 28.37) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_418 UNION ALL SELECT pk, col0 FROM view_2_tab4_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 < 28.37) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 < 28.37))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_418 UNION SELECT pk, col0 FROM view_2_tab4_418
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 < 28.37) ) AS tab4_418
----
0
7

query I rowsort label-4100-3
SELECT * FROM view_3_tab4_418
----
0
7

query I rowsort label-4100-3
SELECT pk FROM tab4 WHERE (col1 < 28.37)
----
0
7

statement ok
DROP VIEW view_1_tab4_418

statement ok
DROP VIEW view_2_tab4_418

statement ok
DROP VIEW view_3_tab4_418

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_419') DROP VIEW view_1_tab0_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_419') DROP VIEW view_2_tab0_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_419') DROP VIEW view_3_tab0_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_419

statement ok
CREATE VIEW view_1_tab0_419 AS SELECT pk, col0 FROM tab0 WHERE ((((col3 BETWEEN 91 AND 87))))

statement ok
CREATE VIEW view_2_tab0_419 AS SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))

statement ok
CREATE VIEW view_3_tab0_419 AS SELECT pk FROM view_1_tab0_419

query II rowsort label-4200-1
SELECT pk, col0 FROM tab0 WHERE ((((col3 BETWEEN 91 AND 87))))
----

query II rowsort label-4200-2
SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab0_419
----

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab0_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_419 UNION ALL SELECT pk, col0 FROM view_2_tab0_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_419 UNION SELECT pk, col0 FROM view_2_tab0_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((((col3 BETWEEN 91 AND 87)))) ) AS tab0_419
----

query I rowsort label-4200-3
SELECT * FROM view_3_tab0_419
----

query I rowsort label-4200-3
SELECT pk FROM tab0 WHERE ((((col3 BETWEEN 91 AND 87))))
----

statement ok
DROP VIEW view_1_tab0_419

statement ok
DROP VIEW view_2_tab0_419

statement ok
DROP VIEW view_3_tab0_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_419') DROP VIEW view_1_tab1_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_419') DROP VIEW view_2_tab1_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_419') DROP VIEW view_3_tab1_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_419

statement ok
CREATE VIEW view_1_tab1_419 AS SELECT pk, col0 FROM tab1 WHERE ((((col3 BETWEEN 91 AND 87))))

statement ok
CREATE VIEW view_2_tab1_419 AS SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))

statement ok
CREATE VIEW view_3_tab1_419 AS SELECT pk FROM view_1_tab1_419

query II rowsort label-4200-1
SELECT pk, col0 FROM tab1 WHERE ((((col3 BETWEEN 91 AND 87))))
----

query II rowsort label-4200-2
SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab1_419
----

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab1_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_419 UNION ALL SELECT pk, col0 FROM view_2_tab1_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_419 UNION SELECT pk, col0 FROM view_2_tab1_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((((col3 BETWEEN 91 AND 87)))) ) AS tab1_419
----

query I rowsort label-4200-3
SELECT * FROM view_3_tab1_419
----

query I rowsort label-4200-3
SELECT pk FROM tab1 WHERE ((((col3 BETWEEN 91 AND 87))))
----

statement ok
DROP VIEW view_1_tab1_419

statement ok
DROP VIEW view_2_tab1_419

statement ok
DROP VIEW view_3_tab1_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_419') DROP VIEW view_1_tab2_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_419') DROP VIEW view_2_tab2_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_419') DROP VIEW view_3_tab2_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_419

statement ok
CREATE VIEW view_1_tab2_419 AS SELECT pk, col0 FROM tab2 WHERE ((((col3 BETWEEN 91 AND 87))))

statement ok
CREATE VIEW view_2_tab2_419 AS SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))

statement ok
CREATE VIEW view_3_tab2_419 AS SELECT pk FROM view_1_tab2_419

query II rowsort label-4200-1
SELECT pk, col0 FROM tab2 WHERE ((((col3 BETWEEN 91 AND 87))))
----

query II rowsort label-4200-2
SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab2_419
----

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab2_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_419 UNION ALL SELECT pk, col0 FROM view_2_tab2_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_419 UNION SELECT pk, col0 FROM view_2_tab2_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((((col3 BETWEEN 91 AND 87)))) ) AS tab2_419
----

query I rowsort label-4200-3
SELECT * FROM view_3_tab2_419
----

query I rowsort label-4200-3
SELECT pk FROM tab2 WHERE ((((col3 BETWEEN 91 AND 87))))
----

statement ok
DROP VIEW view_1_tab2_419

statement ok
DROP VIEW view_2_tab2_419

statement ok
DROP VIEW view_3_tab2_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_419') DROP VIEW view_1_tab3_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_419') DROP VIEW view_2_tab3_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_419') DROP VIEW view_3_tab3_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_419

statement ok
CREATE VIEW view_1_tab3_419 AS SELECT pk, col0 FROM tab3 WHERE ((((col3 BETWEEN 91 AND 87))))

statement ok
CREATE VIEW view_2_tab3_419 AS SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))

statement ok
CREATE VIEW view_3_tab3_419 AS SELECT pk FROM view_1_tab3_419

query II rowsort label-4200-1
SELECT pk, col0 FROM tab3 WHERE ((((col3 BETWEEN 91 AND 87))))
----

query II rowsort label-4200-2
SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab3_419
----

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab3_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_419 UNION ALL SELECT pk, col0 FROM view_2_tab3_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_419 UNION SELECT pk, col0 FROM view_2_tab3_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((((col3 BETWEEN 91 AND 87)))) ) AS tab3_419
----

query I rowsort label-4200-3
SELECT * FROM view_3_tab3_419
----

query I rowsort label-4200-3
SELECT pk FROM tab3 WHERE ((((col3 BETWEEN 91 AND 87))))
----

statement ok
DROP VIEW view_1_tab3_419

statement ok
DROP VIEW view_2_tab3_419

statement ok
DROP VIEW view_3_tab3_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_419') DROP VIEW view_1_tab4_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_419') DROP VIEW view_2_tab4_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_419') DROP VIEW view_3_tab4_419

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_419

statement ok
CREATE VIEW view_1_tab4_419 AS SELECT pk, col0 FROM tab4 WHERE ((((col3 BETWEEN 91 AND 87))))

statement ok
CREATE VIEW view_2_tab4_419 AS SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))

statement ok
CREATE VIEW view_3_tab4_419 AS SELECT pk FROM view_1_tab4_419

query II rowsort label-4200-1
SELECT pk, col0 FROM tab4 WHERE ((((col3 BETWEEN 91 AND 87))))
----

query II rowsort label-4200-2
SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4200-1
SELECT pk, col0 FROM view_1_tab4_419
----

query II rowsort label-4200-2
SELECT pk, col0 FROM view_2_tab4_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_419 UNION ALL SELECT pk, col0 FROM view_2_tab4_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((((col3 BETWEEN 91 AND 87)))) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((((col3 BETWEEN 91 AND 87)))))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_419 UNION SELECT pk, col0 FROM view_2_tab4_419
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((((col3 BETWEEN 91 AND 87)))) ) AS tab4_419
----

query I rowsort label-4200-3
SELECT * FROM view_3_tab4_419
----

query I rowsort label-4200-3
SELECT pk FROM tab4 WHERE ((((col3 BETWEEN 91 AND 87))))
----

statement ok
DROP VIEW view_1_tab4_419

statement ok
DROP VIEW view_2_tab4_419

statement ok
DROP VIEW view_3_tab4_419

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_420') DROP VIEW view_1_tab0_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_420') DROP VIEW view_2_tab0_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_420') DROP VIEW view_3_tab0_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_420

statement ok
CREATE VIEW view_1_tab0_420 AS SELECT pk, col0 FROM tab0 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22

statement ok
CREATE VIEW view_2_tab0_420 AS SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)

statement ok
CREATE VIEW view_3_tab0_420 AS SELECT pk FROM view_1_tab0_420

query II rowsort label-4300-1
SELECT pk, col0 FROM tab0 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab0_420
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab0_420
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_420 UNION ALL SELECT pk, col0 FROM view_2_tab0_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_420 UNION SELECT pk, col0 FROM view_2_tab0_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 ) AS tab0_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT * FROM view_3_tab0_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT pk FROM tab0 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
3
4
6

statement ok
DROP VIEW view_1_tab0_420

statement ok
DROP VIEW view_2_tab0_420

statement ok
DROP VIEW view_3_tab0_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_420') DROP VIEW view_1_tab1_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_420') DROP VIEW view_2_tab1_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_420') DROP VIEW view_3_tab1_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_420

statement ok
CREATE VIEW view_1_tab1_420 AS SELECT pk, col0 FROM tab1 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22

statement ok
CREATE VIEW view_2_tab1_420 AS SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)

statement ok
CREATE VIEW view_3_tab1_420 AS SELECT pk FROM view_1_tab1_420

query II rowsort label-4300-1
SELECT pk, col0 FROM tab1 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab1_420
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab1_420
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_420 UNION ALL SELECT pk, col0 FROM view_2_tab1_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_420 UNION SELECT pk, col0 FROM view_2_tab1_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 ) AS tab1_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT * FROM view_3_tab1_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT pk FROM tab1 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
3
4
6

statement ok
DROP VIEW view_1_tab1_420

statement ok
DROP VIEW view_2_tab1_420

statement ok
DROP VIEW view_3_tab1_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_420') DROP VIEW view_1_tab2_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_420') DROP VIEW view_2_tab2_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_420') DROP VIEW view_3_tab2_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_420

statement ok
CREATE VIEW view_1_tab2_420 AS SELECT pk, col0 FROM tab2 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22

statement ok
CREATE VIEW view_2_tab2_420 AS SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)

statement ok
CREATE VIEW view_3_tab2_420 AS SELECT pk FROM view_1_tab2_420

query II rowsort label-4300-1
SELECT pk, col0 FROM tab2 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab2_420
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab2_420
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_420 UNION ALL SELECT pk, col0 FROM view_2_tab2_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_420 UNION SELECT pk, col0 FROM view_2_tab2_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 ) AS tab2_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT * FROM view_3_tab2_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT pk FROM tab2 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
3
4
6

statement ok
DROP VIEW view_1_tab2_420

statement ok
DROP VIEW view_2_tab2_420

statement ok
DROP VIEW view_3_tab2_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_420') DROP VIEW view_1_tab3_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_420') DROP VIEW view_2_tab3_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_420') DROP VIEW view_3_tab3_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_420

statement ok
CREATE VIEW view_1_tab3_420 AS SELECT pk, col0 FROM tab3 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22

statement ok
CREATE VIEW view_2_tab3_420 AS SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)

statement ok
CREATE VIEW view_3_tab3_420 AS SELECT pk FROM view_1_tab3_420

query II rowsort label-4300-1
SELECT pk, col0 FROM tab3 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab3_420
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab3_420
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_420 UNION ALL SELECT pk, col0 FROM view_2_tab3_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_420 UNION SELECT pk, col0 FROM view_2_tab3_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 ) AS tab3_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT * FROM view_3_tab3_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT pk FROM tab3 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
3
4
6

statement ok
DROP VIEW view_1_tab3_420

statement ok
DROP VIEW view_2_tab3_420

statement ok
DROP VIEW view_3_tab3_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_420') DROP VIEW view_1_tab4_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_420') DROP VIEW view_2_tab4_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_420') DROP VIEW view_3_tab4_420

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_420

statement ok
CREATE VIEW view_1_tab4_420 AS SELECT pk, col0 FROM tab4 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22

statement ok
CREATE VIEW view_2_tab4_420 AS SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)

statement ok
CREATE VIEW view_3_tab4_420 AS SELECT pk FROM view_1_tab4_420

query II rowsort label-4300-1
SELECT pk, col0 FROM tab4 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-4300-1
SELECT pk, col0 FROM view_1_tab4_420
----
1
72
3
23
4
18
6
9

query II rowsort label-4300-2
SELECT pk, col0 FROM view_2_tab4_420
----
12 values hashing to c4e2367271c4464b465ac726f9af0fd0

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_420 UNION ALL SELECT pk, col0 FROM view_2_tab4_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_420 UNION SELECT pk, col0 FROM view_2_tab4_420
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22 ) AS tab4_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT * FROM view_3_tab4_420
----
1
3
4
6

query I rowsort label-4300-3
SELECT pk FROM tab4 WHERE col4 > 18.48 AND (col4 <= 77.3) AND col3 > 22
----
1
3
4
6

statement ok
DROP VIEW view_1_tab4_420

statement ok
DROP VIEW view_2_tab4_420

statement ok
DROP VIEW view_3_tab4_420

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_421') DROP VIEW view_1_tab0_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_421') DROP VIEW view_2_tab0_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_421') DROP VIEW view_3_tab0_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_421

statement ok
CREATE VIEW view_1_tab0_421 AS SELECT pk, col0 FROM tab0 WHERE col3 >= 4

statement ok
CREATE VIEW view_2_tab0_421 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 4)

statement ok
CREATE VIEW view_3_tab0_421 AS SELECT pk FROM view_1_tab0_421

query II rowsort label-4400-1
SELECT pk, col0 FROM tab0 WHERE col3 >= 4
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 4)
----
2
52

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab0_421
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab0_421
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 4 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_421 UNION ALL SELECT pk, col0 FROM view_2_tab0_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 >= 4 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_421 UNION SELECT pk, col0 FROM view_2_tab0_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 >= 4 ) AS tab0_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT * FROM view_3_tab0_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT pk FROM tab0 WHERE col3 >= 4
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab0_421

statement ok
DROP VIEW view_2_tab0_421

statement ok
DROP VIEW view_3_tab0_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_421') DROP VIEW view_1_tab1_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_421') DROP VIEW view_2_tab1_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_421') DROP VIEW view_3_tab1_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_421

statement ok
CREATE VIEW view_1_tab1_421 AS SELECT pk, col0 FROM tab1 WHERE col3 >= 4

statement ok
CREATE VIEW view_2_tab1_421 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 4)

statement ok
CREATE VIEW view_3_tab1_421 AS SELECT pk FROM view_1_tab1_421

query II rowsort label-4400-1
SELECT pk, col0 FROM tab1 WHERE col3 >= 4
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 4)
----
2
52

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab1_421
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab1_421
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 4 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_421 UNION ALL SELECT pk, col0 FROM view_2_tab1_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 >= 4 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_421 UNION SELECT pk, col0 FROM view_2_tab1_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 >= 4 ) AS tab1_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT * FROM view_3_tab1_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT pk FROM tab1 WHERE col3 >= 4
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab1_421

statement ok
DROP VIEW view_2_tab1_421

statement ok
DROP VIEW view_3_tab1_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_421') DROP VIEW view_1_tab2_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_421') DROP VIEW view_2_tab2_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_421') DROP VIEW view_3_tab2_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_421

statement ok
CREATE VIEW view_1_tab2_421 AS SELECT pk, col0 FROM tab2 WHERE col3 >= 4

statement ok
CREATE VIEW view_2_tab2_421 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 4)

statement ok
CREATE VIEW view_3_tab2_421 AS SELECT pk FROM view_1_tab2_421

query II rowsort label-4400-1
SELECT pk, col0 FROM tab2 WHERE col3 >= 4
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 4)
----
2
52

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab2_421
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab2_421
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 4 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_421 UNION ALL SELECT pk, col0 FROM view_2_tab2_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 >= 4 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_421 UNION SELECT pk, col0 FROM view_2_tab2_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 >= 4 ) AS tab2_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT * FROM view_3_tab2_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT pk FROM tab2 WHERE col3 >= 4
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab2_421

statement ok
DROP VIEW view_2_tab2_421

statement ok
DROP VIEW view_3_tab2_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_421') DROP VIEW view_1_tab3_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_421') DROP VIEW view_2_tab3_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_421') DROP VIEW view_3_tab3_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_421

statement ok
CREATE VIEW view_1_tab3_421 AS SELECT pk, col0 FROM tab3 WHERE col3 >= 4

statement ok
CREATE VIEW view_2_tab3_421 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 4)

statement ok
CREATE VIEW view_3_tab3_421 AS SELECT pk FROM view_1_tab3_421

query II rowsort label-4400-1
SELECT pk, col0 FROM tab3 WHERE col3 >= 4
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 4)
----
2
52

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab3_421
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab3_421
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 4 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_421 UNION ALL SELECT pk, col0 FROM view_2_tab3_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 >= 4 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_421 UNION SELECT pk, col0 FROM view_2_tab3_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 >= 4 ) AS tab3_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT * FROM view_3_tab3_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT pk FROM tab3 WHERE col3 >= 4
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab3_421

statement ok
DROP VIEW view_2_tab3_421

statement ok
DROP VIEW view_3_tab3_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_421') DROP VIEW view_1_tab4_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_421') DROP VIEW view_2_tab4_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_421') DROP VIEW view_3_tab4_421

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_421

statement ok
CREATE VIEW view_1_tab4_421 AS SELECT pk, col0 FROM tab4 WHERE col3 >= 4

statement ok
CREATE VIEW view_2_tab4_421 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 4)

statement ok
CREATE VIEW view_3_tab4_421 AS SELECT pk FROM view_1_tab4_421

query II rowsort label-4400-1
SELECT pk, col0 FROM tab4 WHERE col3 >= 4
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 4)
----
2
52

query II rowsort label-4400-1
SELECT pk, col0 FROM view_1_tab4_421
----
18 values hashing to 224abcca1aad152d93cb3591015fc782

query II rowsort label-4400-2
SELECT pk, col0 FROM view_2_tab4_421
----
2
52

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 4 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_421 UNION ALL SELECT pk, col0 FROM view_2_tab4_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 >= 4 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 >= 4)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_421 UNION SELECT pk, col0 FROM view_2_tab4_421
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 >= 4 ) AS tab4_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT * FROM view_3_tab4_421
----
9 values hashing to 502f27eec143c19418cc601be1d35451

query I rowsort label-4400-3
SELECT pk FROM tab4 WHERE col3 >= 4
----
9 values hashing to 502f27eec143c19418cc601be1d35451

statement ok
DROP VIEW view_1_tab4_421

statement ok
DROP VIEW view_2_tab4_421

statement ok
DROP VIEW view_3_tab4_421

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_422') DROP VIEW view_1_tab0_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_422') DROP VIEW view_2_tab0_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_422') DROP VIEW view_3_tab0_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_422

statement ok
CREATE VIEW view_1_tab0_422 AS SELECT pk, col0 FROM tab0 WHERE ((col3 = 57))

statement ok
CREATE VIEW view_2_tab0_422 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 57)))

statement ok
CREATE VIEW view_3_tab0_422 AS SELECT pk FROM view_1_tab0_422

query II rowsort label-4500-1
SELECT pk, col0 FROM tab0 WHERE ((col3 = 57))
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab0_422
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab0_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 = 57)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_422 UNION ALL SELECT pk, col0 FROM view_2_tab0_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col3 = 57)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_422 UNION SELECT pk, col0 FROM view_2_tab0_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col3 = 57)) ) AS tab0_422
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab0_422
----

query I rowsort label-4500-3
SELECT pk FROM tab0 WHERE ((col3 = 57))
----

statement ok
DROP VIEW view_1_tab0_422

statement ok
DROP VIEW view_2_tab0_422

statement ok
DROP VIEW view_3_tab0_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_422') DROP VIEW view_1_tab1_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_422') DROP VIEW view_2_tab1_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_422') DROP VIEW view_3_tab1_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_422

statement ok
CREATE VIEW view_1_tab1_422 AS SELECT pk, col0 FROM tab1 WHERE ((col3 = 57))

statement ok
CREATE VIEW view_2_tab1_422 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 57)))

statement ok
CREATE VIEW view_3_tab1_422 AS SELECT pk FROM view_1_tab1_422

query II rowsort label-4500-1
SELECT pk, col0 FROM tab1 WHERE ((col3 = 57))
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab1_422
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab1_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 = 57)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_422 UNION ALL SELECT pk, col0 FROM view_2_tab1_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col3 = 57)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_422 UNION SELECT pk, col0 FROM view_2_tab1_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col3 = 57)) ) AS tab1_422
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab1_422
----

query I rowsort label-4500-3
SELECT pk FROM tab1 WHERE ((col3 = 57))
----

statement ok
DROP VIEW view_1_tab1_422

statement ok
DROP VIEW view_2_tab1_422

statement ok
DROP VIEW view_3_tab1_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_422') DROP VIEW view_1_tab2_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_422') DROP VIEW view_2_tab2_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_422') DROP VIEW view_3_tab2_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_422

statement ok
CREATE VIEW view_1_tab2_422 AS SELECT pk, col0 FROM tab2 WHERE ((col3 = 57))

statement ok
CREATE VIEW view_2_tab2_422 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 57)))

statement ok
CREATE VIEW view_3_tab2_422 AS SELECT pk FROM view_1_tab2_422

query II rowsort label-4500-1
SELECT pk, col0 FROM tab2 WHERE ((col3 = 57))
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab2_422
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab2_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 = 57)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_422 UNION ALL SELECT pk, col0 FROM view_2_tab2_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col3 = 57)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_422 UNION SELECT pk, col0 FROM view_2_tab2_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col3 = 57)) ) AS tab2_422
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab2_422
----

query I rowsort label-4500-3
SELECT pk FROM tab2 WHERE ((col3 = 57))
----

statement ok
DROP VIEW view_1_tab2_422

statement ok
DROP VIEW view_2_tab2_422

statement ok
DROP VIEW view_3_tab2_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_422') DROP VIEW view_1_tab3_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_422') DROP VIEW view_2_tab3_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_422') DROP VIEW view_3_tab3_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_422

statement ok
CREATE VIEW view_1_tab3_422 AS SELECT pk, col0 FROM tab3 WHERE ((col3 = 57))

statement ok
CREATE VIEW view_2_tab3_422 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 57)))

statement ok
CREATE VIEW view_3_tab3_422 AS SELECT pk FROM view_1_tab3_422

query II rowsort label-4500-1
SELECT pk, col0 FROM tab3 WHERE ((col3 = 57))
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab3_422
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab3_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 = 57)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_422 UNION ALL SELECT pk, col0 FROM view_2_tab3_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col3 = 57)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_422 UNION SELECT pk, col0 FROM view_2_tab3_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col3 = 57)) ) AS tab3_422
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab3_422
----

query I rowsort label-4500-3
SELECT pk FROM tab3 WHERE ((col3 = 57))
----

statement ok
DROP VIEW view_1_tab3_422

statement ok
DROP VIEW view_2_tab3_422

statement ok
DROP VIEW view_3_tab3_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_422') DROP VIEW view_1_tab4_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_422') DROP VIEW view_2_tab4_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_422') DROP VIEW view_3_tab4_422

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_422

statement ok
CREATE VIEW view_1_tab4_422 AS SELECT pk, col0 FROM tab4 WHERE ((col3 = 57))

statement ok
CREATE VIEW view_2_tab4_422 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 57)))

statement ok
CREATE VIEW view_3_tab4_422 AS SELECT pk FROM view_1_tab4_422

query II rowsort label-4500-1
SELECT pk, col0 FROM tab4 WHERE ((col3 = 57))
----

query II rowsort label-4500-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4500-1
SELECT pk, col0 FROM view_1_tab4_422
----

query II rowsort label-4500-2
SELECT pk, col0 FROM view_2_tab4_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 = 57)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_422 UNION ALL SELECT pk, col0 FROM view_2_tab4_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col3 = 57)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col3 = 57)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_422 UNION SELECT pk, col0 FROM view_2_tab4_422
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col3 = 57)) ) AS tab4_422
----

query I rowsort label-4500-3
SELECT * FROM view_3_tab4_422
----

query I rowsort label-4500-3
SELECT pk FROM tab4 WHERE ((col3 = 57))
----

statement ok
DROP VIEW view_1_tab4_422

statement ok
DROP VIEW view_2_tab4_422

statement ok
DROP VIEW view_3_tab4_422

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_423') DROP VIEW view_1_tab0_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_423') DROP VIEW view_2_tab0_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_423') DROP VIEW view_3_tab0_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_423

statement ok
CREATE VIEW view_1_tab0_423 AS SELECT pk, col0 FROM tab0 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))

statement ok
CREATE VIEW view_2_tab0_423 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))

statement ok
CREATE VIEW view_3_tab0_423 AS SELECT pk FROM view_1_tab0_423

query II rowsort label-4600-1
SELECT pk, col0 FROM tab0 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab0_423
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab0_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_423 UNION ALL SELECT pk, col0 FROM view_2_tab0_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_423 UNION SELECT pk, col0 FROM view_2_tab0_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) ) AS tab0_423
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab0_423
----

query I rowsort label-4600-3
SELECT pk FROM tab0 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

statement ok
DROP VIEW view_1_tab0_423

statement ok
DROP VIEW view_2_tab0_423

statement ok
DROP VIEW view_3_tab0_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_423') DROP VIEW view_1_tab1_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_423') DROP VIEW view_2_tab1_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_423') DROP VIEW view_3_tab1_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_423

statement ok
CREATE VIEW view_1_tab1_423 AS SELECT pk, col0 FROM tab1 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))

statement ok
CREATE VIEW view_2_tab1_423 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))

statement ok
CREATE VIEW view_3_tab1_423 AS SELECT pk FROM view_1_tab1_423

query II rowsort label-4600-1
SELECT pk, col0 FROM tab1 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab1_423
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab1_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_423 UNION ALL SELECT pk, col0 FROM view_2_tab1_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_423 UNION SELECT pk, col0 FROM view_2_tab1_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) ) AS tab1_423
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab1_423
----

query I rowsort label-4600-3
SELECT pk FROM tab1 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

statement ok
DROP VIEW view_1_tab1_423

statement ok
DROP VIEW view_2_tab1_423

statement ok
DROP VIEW view_3_tab1_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_423') DROP VIEW view_1_tab2_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_423') DROP VIEW view_2_tab2_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_423') DROP VIEW view_3_tab2_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_423

statement ok
CREATE VIEW view_1_tab2_423 AS SELECT pk, col0 FROM tab2 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))

statement ok
CREATE VIEW view_2_tab2_423 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))

statement ok
CREATE VIEW view_3_tab2_423 AS SELECT pk FROM view_1_tab2_423

query II rowsort label-4600-1
SELECT pk, col0 FROM tab2 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab2_423
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab2_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_423 UNION ALL SELECT pk, col0 FROM view_2_tab2_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_423 UNION SELECT pk, col0 FROM view_2_tab2_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) ) AS tab2_423
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab2_423
----

query I rowsort label-4600-3
SELECT pk FROM tab2 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

statement ok
DROP VIEW view_1_tab2_423

statement ok
DROP VIEW view_2_tab2_423

statement ok
DROP VIEW view_3_tab2_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_423') DROP VIEW view_1_tab3_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_423') DROP VIEW view_2_tab3_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_423') DROP VIEW view_3_tab3_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_423

statement ok
CREATE VIEW view_1_tab3_423 AS SELECT pk, col0 FROM tab3 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))

statement ok
CREATE VIEW view_2_tab3_423 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))

statement ok
CREATE VIEW view_3_tab3_423 AS SELECT pk FROM view_1_tab3_423

query II rowsort label-4600-1
SELECT pk, col0 FROM tab3 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab3_423
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab3_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_423 UNION ALL SELECT pk, col0 FROM view_2_tab3_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_423 UNION SELECT pk, col0 FROM view_2_tab3_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) ) AS tab3_423
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab3_423
----

query I rowsort label-4600-3
SELECT pk FROM tab3 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

statement ok
DROP VIEW view_1_tab3_423

statement ok
DROP VIEW view_2_tab3_423

statement ok
DROP VIEW view_3_tab3_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_423') DROP VIEW view_1_tab4_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_423') DROP VIEW view_2_tab4_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_423') DROP VIEW view_3_tab4_423

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_423

statement ok
CREATE VIEW view_1_tab4_423 AS SELECT pk, col0 FROM tab4 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))

statement ok
CREATE VIEW view_2_tab4_423 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))

statement ok
CREATE VIEW view_3_tab4_423 AS SELECT pk FROM view_1_tab4_423

query II rowsort label-4600-1
SELECT pk, col0 FROM tab4 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

query II rowsort label-4600-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4600-1
SELECT pk, col0 FROM view_1_tab4_423
----

query II rowsort label-4600-2
SELECT pk, col0 FROM view_2_tab4_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_423 UNION ALL SELECT pk, col0 FROM view_2_tab4_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_423 UNION SELECT pk, col0 FROM view_2_tab4_423
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11)) ) AS tab4_423
----

query I rowsort label-4600-3
SELECT * FROM view_3_tab4_423
----

query I rowsort label-4600-3
SELECT pk FROM tab4 WHERE ((col1 BETWEEN 55.18 AND 10.36 AND col3 >= 11))
----

statement ok
DROP VIEW view_1_tab4_423

statement ok
DROP VIEW view_2_tab4_423

statement ok
DROP VIEW view_3_tab4_423

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_424') DROP VIEW view_1_tab0_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_424') DROP VIEW view_2_tab0_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_424') DROP VIEW view_3_tab0_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_424

statement ok
CREATE VIEW view_1_tab0_424 AS SELECT pk, col0 FROM tab0 WHERE ((col1 = 42.8))

statement ok
CREATE VIEW view_2_tab0_424 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 42.8)))

statement ok
CREATE VIEW view_3_tab0_424 AS SELECT pk FROM view_1_tab0_424

query II rowsort label-4700-1
SELECT pk, col0 FROM tab0 WHERE ((col1 = 42.8))
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab0_424
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab0_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 = 42.8)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_424 UNION ALL SELECT pk, col0 FROM view_2_tab0_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col1 = 42.8)) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_424 UNION SELECT pk, col0 FROM view_2_tab0_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col1 = 42.8)) ) AS tab0_424
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab0_424
----

query I rowsort label-4700-3
SELECT pk FROM tab0 WHERE ((col1 = 42.8))
----

statement ok
DROP VIEW view_1_tab0_424

statement ok
DROP VIEW view_2_tab0_424

statement ok
DROP VIEW view_3_tab0_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_424') DROP VIEW view_1_tab1_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_424') DROP VIEW view_2_tab1_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_424') DROP VIEW view_3_tab1_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_424

statement ok
CREATE VIEW view_1_tab1_424 AS SELECT pk, col0 FROM tab1 WHERE ((col1 = 42.8))

statement ok
CREATE VIEW view_2_tab1_424 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 42.8)))

statement ok
CREATE VIEW view_3_tab1_424 AS SELECT pk FROM view_1_tab1_424

query II rowsort label-4700-1
SELECT pk, col0 FROM tab1 WHERE ((col1 = 42.8))
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab1_424
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab1_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 = 42.8)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_424 UNION ALL SELECT pk, col0 FROM view_2_tab1_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col1 = 42.8)) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_424 UNION SELECT pk, col0 FROM view_2_tab1_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col1 = 42.8)) ) AS tab1_424
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab1_424
----

query I rowsort label-4700-3
SELECT pk FROM tab1 WHERE ((col1 = 42.8))
----

statement ok
DROP VIEW view_1_tab1_424

statement ok
DROP VIEW view_2_tab1_424

statement ok
DROP VIEW view_3_tab1_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_424') DROP VIEW view_1_tab2_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_424') DROP VIEW view_2_tab2_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_424') DROP VIEW view_3_tab2_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_424

statement ok
CREATE VIEW view_1_tab2_424 AS SELECT pk, col0 FROM tab2 WHERE ((col1 = 42.8))

statement ok
CREATE VIEW view_2_tab2_424 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 42.8)))

statement ok
CREATE VIEW view_3_tab2_424 AS SELECT pk FROM view_1_tab2_424

query II rowsort label-4700-1
SELECT pk, col0 FROM tab2 WHERE ((col1 = 42.8))
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab2_424
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab2_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 = 42.8)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_424 UNION ALL SELECT pk, col0 FROM view_2_tab2_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col1 = 42.8)) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_424 UNION SELECT pk, col0 FROM view_2_tab2_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col1 = 42.8)) ) AS tab2_424
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab2_424
----

query I rowsort label-4700-3
SELECT pk FROM tab2 WHERE ((col1 = 42.8))
----

statement ok
DROP VIEW view_1_tab2_424

statement ok
DROP VIEW view_2_tab2_424

statement ok
DROP VIEW view_3_tab2_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_424') DROP VIEW view_1_tab3_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_424') DROP VIEW view_2_tab3_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_424') DROP VIEW view_3_tab3_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_424

statement ok
CREATE VIEW view_1_tab3_424 AS SELECT pk, col0 FROM tab3 WHERE ((col1 = 42.8))

statement ok
CREATE VIEW view_2_tab3_424 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 42.8)))

statement ok
CREATE VIEW view_3_tab3_424 AS SELECT pk FROM view_1_tab3_424

query II rowsort label-4700-1
SELECT pk, col0 FROM tab3 WHERE ((col1 = 42.8))
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab3_424
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab3_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 = 42.8)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_424 UNION ALL SELECT pk, col0 FROM view_2_tab3_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col1 = 42.8)) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_424 UNION SELECT pk, col0 FROM view_2_tab3_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col1 = 42.8)) ) AS tab3_424
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab3_424
----

query I rowsort label-4700-3
SELECT pk FROM tab3 WHERE ((col1 = 42.8))
----

statement ok
DROP VIEW view_1_tab3_424

statement ok
DROP VIEW view_2_tab3_424

statement ok
DROP VIEW view_3_tab3_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_424') DROP VIEW view_1_tab4_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_424') DROP VIEW view_2_tab4_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_424') DROP VIEW view_3_tab4_424

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_424

statement ok
CREATE VIEW view_1_tab4_424 AS SELECT pk, col0 FROM tab4 WHERE ((col1 = 42.8))

statement ok
CREATE VIEW view_2_tab4_424 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 42.8)))

statement ok
CREATE VIEW view_3_tab4_424 AS SELECT pk FROM view_1_tab4_424

query II rowsort label-4700-1
SELECT pk, col0 FROM tab4 WHERE ((col1 = 42.8))
----

query II rowsort label-4700-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4700-1
SELECT pk, col0 FROM view_1_tab4_424
----

query II rowsort label-4700-2
SELECT pk, col0 FROM view_2_tab4_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 = 42.8)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_424 UNION ALL SELECT pk, col0 FROM view_2_tab4_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col1 = 42.8)) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col1 = 42.8)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_424 UNION SELECT pk, col0 FROM view_2_tab4_424
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4700-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col1 = 42.8)) ) AS tab4_424
----

query I rowsort label-4700-3
SELECT * FROM view_3_tab4_424
----

query I rowsort label-4700-3
SELECT pk FROM tab4 WHERE ((col1 = 42.8))
----

statement ok
DROP VIEW view_1_tab4_424

statement ok
DROP VIEW view_2_tab4_424

statement ok
DROP VIEW view_3_tab4_424

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_425') DROP VIEW view_1_tab0_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_425') DROP VIEW view_2_tab0_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_425') DROP VIEW view_3_tab0_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_425

statement ok
CREATE VIEW view_1_tab0_425 AS SELECT pk, col0 FROM tab0 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35

statement ok
CREATE VIEW view_2_tab0_425 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)

statement ok
CREATE VIEW view_3_tab0_425 AS SELECT pk FROM view_1_tab0_425

query II rowsort label-4800-1
SELECT pk, col0 FROM tab0 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab0_425
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab0_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_425 UNION ALL SELECT pk, col0 FROM view_2_tab0_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_425 UNION SELECT pk, col0 FROM view_2_tab0_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 ) AS tab0_425
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab0_425
----

query I rowsort label-4800-3
SELECT pk FROM tab0 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

statement ok
DROP VIEW view_1_tab0_425

statement ok
DROP VIEW view_2_tab0_425

statement ok
DROP VIEW view_3_tab0_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_425') DROP VIEW view_1_tab1_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_425') DROP VIEW view_2_tab1_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_425') DROP VIEW view_3_tab1_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_425

statement ok
CREATE VIEW view_1_tab1_425 AS SELECT pk, col0 FROM tab1 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35

statement ok
CREATE VIEW view_2_tab1_425 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)

statement ok
CREATE VIEW view_3_tab1_425 AS SELECT pk FROM view_1_tab1_425

query II rowsort label-4800-1
SELECT pk, col0 FROM tab1 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab1_425
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab1_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_425 UNION ALL SELECT pk, col0 FROM view_2_tab1_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_425 UNION SELECT pk, col0 FROM view_2_tab1_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 ) AS tab1_425
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab1_425
----

query I rowsort label-4800-3
SELECT pk FROM tab1 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

statement ok
DROP VIEW view_1_tab1_425

statement ok
DROP VIEW view_2_tab1_425

statement ok
DROP VIEW view_3_tab1_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_425') DROP VIEW view_1_tab2_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_425') DROP VIEW view_2_tab2_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_425') DROP VIEW view_3_tab2_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_425

statement ok
CREATE VIEW view_1_tab2_425 AS SELECT pk, col0 FROM tab2 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35

statement ok
CREATE VIEW view_2_tab2_425 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)

statement ok
CREATE VIEW view_3_tab2_425 AS SELECT pk FROM view_1_tab2_425

query II rowsort label-4800-1
SELECT pk, col0 FROM tab2 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab2_425
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab2_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_425 UNION ALL SELECT pk, col0 FROM view_2_tab2_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_425 UNION SELECT pk, col0 FROM view_2_tab2_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 ) AS tab2_425
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab2_425
----

query I rowsort label-4800-3
SELECT pk FROM tab2 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

statement ok
DROP VIEW view_1_tab2_425

statement ok
DROP VIEW view_2_tab2_425

statement ok
DROP VIEW view_3_tab2_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_425') DROP VIEW view_1_tab3_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_425') DROP VIEW view_2_tab3_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_425') DROP VIEW view_3_tab3_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_425

statement ok
CREATE VIEW view_1_tab3_425 AS SELECT pk, col0 FROM tab3 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35

statement ok
CREATE VIEW view_2_tab3_425 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)

statement ok
CREATE VIEW view_3_tab3_425 AS SELECT pk FROM view_1_tab3_425

query II rowsort label-4800-1
SELECT pk, col0 FROM tab3 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab3_425
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab3_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_425 UNION ALL SELECT pk, col0 FROM view_2_tab3_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_425 UNION SELECT pk, col0 FROM view_2_tab3_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 ) AS tab3_425
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab3_425
----

query I rowsort label-4800-3
SELECT pk FROM tab3 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

statement ok
DROP VIEW view_1_tab3_425

statement ok
DROP VIEW view_2_tab3_425

statement ok
DROP VIEW view_3_tab3_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_425') DROP VIEW view_1_tab4_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_425') DROP VIEW view_2_tab4_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_425') DROP VIEW view_3_tab4_425

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_425

statement ok
CREATE VIEW view_1_tab4_425 AS SELECT pk, col0 FROM tab4 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35

statement ok
CREATE VIEW view_2_tab4_425 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)

statement ok
CREATE VIEW view_3_tab4_425 AS SELECT pk FROM view_1_tab4_425

query II rowsort label-4800-1
SELECT pk, col0 FROM tab4 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

query II rowsort label-4800-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4800-1
SELECT pk, col0 FROM view_1_tab4_425
----

query II rowsort label-4800-2
SELECT pk, col0 FROM view_2_tab4_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_425 UNION ALL SELECT pk, col0 FROM view_2_tab4_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_425 UNION SELECT pk, col0 FROM view_2_tab4_425
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4800-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35 ) AS tab4_425
----

query I rowsort label-4800-3
SELECT * FROM view_3_tab4_425
----

query I rowsort label-4800-3
SELECT pk FROM tab4 WHERE col3 > 37 AND ((col3 BETWEEN 83 AND 89)) AND col0 > 23 AND col1 > 1.35
----

statement ok
DROP VIEW view_1_tab4_425

statement ok
DROP VIEW view_2_tab4_425

statement ok
DROP VIEW view_3_tab4_425

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_426') DROP VIEW view_1_tab0_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_426') DROP VIEW view_2_tab0_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_426') DROP VIEW view_3_tab0_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_426

statement ok
CREATE VIEW view_1_tab0_426 AS SELECT pk, col0 FROM tab0 WHERE (col3 = 64)

statement ok
CREATE VIEW view_2_tab0_426 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 64))

statement ok
CREATE VIEW view_3_tab0_426 AS SELECT pk FROM view_1_tab0_426

query II rowsort label-4900-1
SELECT pk, col0 FROM tab0 WHERE (col3 = 64)
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col3 = 64))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab0_426
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab0_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_426 UNION ALL SELECT pk, col0 FROM view_2_tab0_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_426 UNION SELECT pk, col0 FROM view_2_tab0_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col3 = 64) ) AS tab0_426
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab0_426
----

query I rowsort label-4900-3
SELECT pk FROM tab0 WHERE (col3 = 64)
----

statement ok
DROP VIEW view_1_tab0_426

statement ok
DROP VIEW view_2_tab0_426

statement ok
DROP VIEW view_3_tab0_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_426') DROP VIEW view_1_tab1_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_426') DROP VIEW view_2_tab1_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_426') DROP VIEW view_3_tab1_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_426

statement ok
CREATE VIEW view_1_tab1_426 AS SELECT pk, col0 FROM tab1 WHERE (col3 = 64)

statement ok
CREATE VIEW view_2_tab1_426 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 64))

statement ok
CREATE VIEW view_3_tab1_426 AS SELECT pk FROM view_1_tab1_426

query II rowsort label-4900-1
SELECT pk, col0 FROM tab1 WHERE (col3 = 64)
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col3 = 64))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab1_426
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab1_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_426 UNION ALL SELECT pk, col0 FROM view_2_tab1_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_426 UNION SELECT pk, col0 FROM view_2_tab1_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col3 = 64) ) AS tab1_426
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab1_426
----

query I rowsort label-4900-3
SELECT pk FROM tab1 WHERE (col3 = 64)
----

statement ok
DROP VIEW view_1_tab1_426

statement ok
DROP VIEW view_2_tab1_426

statement ok
DROP VIEW view_3_tab1_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_426') DROP VIEW view_1_tab2_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_426') DROP VIEW view_2_tab2_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_426') DROP VIEW view_3_tab2_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_426

statement ok
CREATE VIEW view_1_tab2_426 AS SELECT pk, col0 FROM tab2 WHERE (col3 = 64)

statement ok
CREATE VIEW view_2_tab2_426 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 64))

statement ok
CREATE VIEW view_3_tab2_426 AS SELECT pk FROM view_1_tab2_426

query II rowsort label-4900-1
SELECT pk, col0 FROM tab2 WHERE (col3 = 64)
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col3 = 64))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab2_426
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab2_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_426 UNION ALL SELECT pk, col0 FROM view_2_tab2_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_426 UNION SELECT pk, col0 FROM view_2_tab2_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col3 = 64) ) AS tab2_426
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab2_426
----

query I rowsort label-4900-3
SELECT pk FROM tab2 WHERE (col3 = 64)
----

statement ok
DROP VIEW view_1_tab2_426

statement ok
DROP VIEW view_2_tab2_426

statement ok
DROP VIEW view_3_tab2_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_426') DROP VIEW view_1_tab3_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_426') DROP VIEW view_2_tab3_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_426') DROP VIEW view_3_tab3_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_426

statement ok
CREATE VIEW view_1_tab3_426 AS SELECT pk, col0 FROM tab3 WHERE (col3 = 64)

statement ok
CREATE VIEW view_2_tab3_426 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 64))

statement ok
CREATE VIEW view_3_tab3_426 AS SELECT pk FROM view_1_tab3_426

query II rowsort label-4900-1
SELECT pk, col0 FROM tab3 WHERE (col3 = 64)
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col3 = 64))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab3_426
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab3_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_426 UNION ALL SELECT pk, col0 FROM view_2_tab3_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_426 UNION SELECT pk, col0 FROM view_2_tab3_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col3 = 64) ) AS tab3_426
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab3_426
----

query I rowsort label-4900-3
SELECT pk FROM tab3 WHERE (col3 = 64)
----

statement ok
DROP VIEW view_1_tab3_426

statement ok
DROP VIEW view_2_tab3_426

statement ok
DROP VIEW view_3_tab3_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_426') DROP VIEW view_1_tab4_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_426') DROP VIEW view_2_tab4_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_426') DROP VIEW view_3_tab4_426

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_426

statement ok
CREATE VIEW view_1_tab4_426 AS SELECT pk, col0 FROM tab4 WHERE (col3 = 64)

statement ok
CREATE VIEW view_2_tab4_426 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 64))

statement ok
CREATE VIEW view_3_tab4_426 AS SELECT pk FROM view_1_tab4_426

query II rowsort label-4900-1
SELECT pk, col0 FROM tab4 WHERE (col3 = 64)
----

query II rowsort label-4900-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col3 = 64))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-4900-1
SELECT pk, col0 FROM view_1_tab4_426
----

query II rowsort label-4900-2
SELECT pk, col0 FROM view_2_tab4_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_426 UNION ALL SELECT pk, col0 FROM view_2_tab4_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

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 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_426 UNION SELECT pk, col0 FROM view_2_tab4_426
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-4900-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col3 = 64) ) AS tab4_426
----

query I rowsort label-4900-3
SELECT * FROM view_3_tab4_426
----

query I rowsort label-4900-3
SELECT pk FROM tab4 WHERE (col3 = 64)
----

statement ok
DROP VIEW view_1_tab4_426

statement ok
DROP VIEW view_2_tab4_426

statement ok
DROP VIEW view_3_tab4_426

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_427') DROP VIEW view_1_tab0_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_427') DROP VIEW view_2_tab0_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_427') DROP VIEW view_3_tab0_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_427

statement ok
CREATE VIEW view_1_tab0_427 AS SELECT pk, col0 FROM tab0 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)

statement ok
CREATE VIEW view_2_tab0_427 AS SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))

statement ok
CREATE VIEW view_3_tab0_427 AS SELECT pk FROM view_1_tab0_427

query II rowsort label-5000-1
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
5
85
8
94
9
95

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab0_427
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab0_427
----
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_427 UNION ALL SELECT pk, col0 FROM view_2_tab0_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION SELECT pk, col0 FROM tab0 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_427 UNION SELECT pk, col0 FROM view_2_tab0_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) ) AS tab0_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT * FROM view_3_tab0_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT pk FROM tab0 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
0
1
2
3
4
6
7

statement ok
DROP VIEW view_1_tab0_427

statement ok
DROP VIEW view_2_tab0_427

statement ok
DROP VIEW view_3_tab0_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_427') DROP VIEW view_1_tab1_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_427') DROP VIEW view_2_tab1_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_427') DROP VIEW view_3_tab1_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_427

statement ok
CREATE VIEW view_1_tab1_427 AS SELECT pk, col0 FROM tab1 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)

statement ok
CREATE VIEW view_2_tab1_427 AS SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))

statement ok
CREATE VIEW view_3_tab1_427 AS SELECT pk FROM view_1_tab1_427

query II rowsort label-5000-1
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
5
85
8
94
9
95

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab1_427
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab1_427
----
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_427 UNION ALL SELECT pk, col0 FROM view_2_tab1_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION SELECT pk, col0 FROM tab1 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_427 UNION SELECT pk, col0 FROM view_2_tab1_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) ) AS tab1_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT * FROM view_3_tab1_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT pk FROM tab1 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
0
1
2
3
4
6
7

statement ok
DROP VIEW view_1_tab1_427

statement ok
DROP VIEW view_2_tab1_427

statement ok
DROP VIEW view_3_tab1_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_427') DROP VIEW view_1_tab2_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_427') DROP VIEW view_2_tab2_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_427') DROP VIEW view_3_tab2_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_427

statement ok
CREATE VIEW view_1_tab2_427 AS SELECT pk, col0 FROM tab2 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)

statement ok
CREATE VIEW view_2_tab2_427 AS SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))

statement ok
CREATE VIEW view_3_tab2_427 AS SELECT pk FROM view_1_tab2_427

query II rowsort label-5000-1
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
5
85
8
94
9
95

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab2_427
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab2_427
----
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_427 UNION ALL SELECT pk, col0 FROM view_2_tab2_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION SELECT pk, col0 FROM tab2 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_427 UNION SELECT pk, col0 FROM view_2_tab2_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) ) AS tab2_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT * FROM view_3_tab2_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT pk FROM tab2 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
0
1
2
3
4
6
7

statement ok
DROP VIEW view_1_tab2_427

statement ok
DROP VIEW view_2_tab2_427

statement ok
DROP VIEW view_3_tab2_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_427') DROP VIEW view_1_tab3_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_427') DROP VIEW view_2_tab3_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_427') DROP VIEW view_3_tab3_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_427

statement ok
CREATE VIEW view_1_tab3_427 AS SELECT pk, col0 FROM tab3 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)

statement ok
CREATE VIEW view_2_tab3_427 AS SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))

statement ok
CREATE VIEW view_3_tab3_427 AS SELECT pk FROM view_1_tab3_427

query II rowsort label-5000-1
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
5
85
8
94
9
95

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab3_427
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab3_427
----
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_427 UNION ALL SELECT pk, col0 FROM view_2_tab3_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION SELECT pk, col0 FROM tab3 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_427 UNION SELECT pk, col0 FROM view_2_tab3_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) ) AS tab3_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT * FROM view_3_tab3_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT pk FROM tab3 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
0
1
2
3
4
6
7

statement ok
DROP VIEW view_1_tab3_427

statement ok
DROP VIEW view_2_tab3_427

statement ok
DROP VIEW view_3_tab3_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_427') DROP VIEW view_1_tab4_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_427') DROP VIEW view_2_tab4_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_427') DROP VIEW view_3_tab4_427

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_427

statement ok
CREATE VIEW view_1_tab4_427 AS SELECT pk, col0 FROM tab4 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)

statement ok
CREATE VIEW view_2_tab4_427 AS SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))

statement ok
CREATE VIEW view_3_tab4_427 AS SELECT pk FROM view_1_tab4_427

query II rowsort label-5000-1
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
5
85
8
94
9
95

query II rowsort label-5000-1
SELECT pk, col0 FROM view_1_tab4_427
----
14 values hashing to 2b092d8ed19a0d816b31a0d9b3e0cc46

query II rowsort label-5000-2
SELECT pk, col0 FROM view_2_tab4_427
----
5
85
8
94
9
95

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_427 UNION ALL SELECT pk, col0 FROM view_2_tab4_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) UNION SELECT pk, col0 FROM tab4 WHERE NOT (((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_427 UNION SELECT pk, col0 FROM view_2_tab4_427
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5000-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82) ) AS tab4_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT * FROM view_3_tab4_427
----
0
1
2
3
4
6
7

query I rowsort label-5000-3
SELECT pk FROM tab4 WHERE ((col0 >= 15) AND (col3 = 64) AND col3 >= 78) OR (col3 > 91 AND col3 <= 64 OR col0 < 82)
----
0
1
2
3
4
6
7

statement ok
DROP VIEW view_1_tab4_427

statement ok
DROP VIEW view_2_tab4_427

statement ok
DROP VIEW view_3_tab4_427

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_428') DROP VIEW view_1_tab0_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_428') DROP VIEW view_2_tab0_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_428') DROP VIEW view_3_tab0_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_428

statement ok
CREATE VIEW view_1_tab0_428 AS SELECT pk, col0 FROM tab0 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0

statement ok
CREATE VIEW view_2_tab0_428 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)

statement ok
CREATE VIEW view_3_tab0_428 AS SELECT pk FROM view_1_tab0_428

query II rowsort label-5100-1
SELECT pk, col0 FROM tab0 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab0_428
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab0_428
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_428 UNION ALL SELECT pk, col0 FROM view_2_tab0_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_428 UNION SELECT pk, col0 FROM view_2_tab0_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 ) AS tab0_428
----
0
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab0_428
----
0
9

query I rowsort label-5100-3
SELECT pk FROM tab0 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
9

statement ok
DROP VIEW view_1_tab0_428

statement ok
DROP VIEW view_2_tab0_428

statement ok
DROP VIEW view_3_tab0_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_428') DROP VIEW view_1_tab1_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_428') DROP VIEW view_2_tab1_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_428') DROP VIEW view_3_tab1_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_428

statement ok
CREATE VIEW view_1_tab1_428 AS SELECT pk, col0 FROM tab1 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0

statement ok
CREATE VIEW view_2_tab1_428 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)

statement ok
CREATE VIEW view_3_tab1_428 AS SELECT pk FROM view_1_tab1_428

query II rowsort label-5100-1
SELECT pk, col0 FROM tab1 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab1_428
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab1_428
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_428 UNION ALL SELECT pk, col0 FROM view_2_tab1_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_428 UNION SELECT pk, col0 FROM view_2_tab1_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 ) AS tab1_428
----
0
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab1_428
----
0
9

query I rowsort label-5100-3
SELECT pk FROM tab1 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
9

statement ok
DROP VIEW view_1_tab1_428

statement ok
DROP VIEW view_2_tab1_428

statement ok
DROP VIEW view_3_tab1_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_428') DROP VIEW view_1_tab2_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_428') DROP VIEW view_2_tab2_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_428') DROP VIEW view_3_tab2_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_428

statement ok
CREATE VIEW view_1_tab2_428 AS SELECT pk, col0 FROM tab2 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0

statement ok
CREATE VIEW view_2_tab2_428 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)

statement ok
CREATE VIEW view_3_tab2_428 AS SELECT pk FROM view_1_tab2_428

query II rowsort label-5100-1
SELECT pk, col0 FROM tab2 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab2_428
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab2_428
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_428 UNION ALL SELECT pk, col0 FROM view_2_tab2_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_428 UNION SELECT pk, col0 FROM view_2_tab2_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 ) AS tab2_428
----
0
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab2_428
----
0
9

query I rowsort label-5100-3
SELECT pk FROM tab2 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
9

statement ok
DROP VIEW view_1_tab2_428

statement ok
DROP VIEW view_2_tab2_428

statement ok
DROP VIEW view_3_tab2_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_428') DROP VIEW view_1_tab3_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_428') DROP VIEW view_2_tab3_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_428') DROP VIEW view_3_tab3_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_428

statement ok
CREATE VIEW view_1_tab3_428 AS SELECT pk, col0 FROM tab3 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0

statement ok
CREATE VIEW view_2_tab3_428 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)

statement ok
CREATE VIEW view_3_tab3_428 AS SELECT pk FROM view_1_tab3_428

query II rowsort label-5100-1
SELECT pk, col0 FROM tab3 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab3_428
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab3_428
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_428 UNION ALL SELECT pk, col0 FROM view_2_tab3_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_428 UNION SELECT pk, col0 FROM view_2_tab3_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 ) AS tab3_428
----
0
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab3_428
----
0
9

query I rowsort label-5100-3
SELECT pk FROM tab3 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
9

statement ok
DROP VIEW view_1_tab3_428

statement ok
DROP VIEW view_2_tab3_428

statement ok
DROP VIEW view_3_tab3_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_428') DROP VIEW view_1_tab4_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_428') DROP VIEW view_2_tab4_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_428') DROP VIEW view_3_tab4_428

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_428

statement ok
CREATE VIEW view_1_tab4_428 AS SELECT pk, col0 FROM tab4 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0

statement ok
CREATE VIEW view_2_tab4_428 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)

statement ok
CREATE VIEW view_3_tab4_428 AS SELECT pk FROM view_1_tab4_428

query II rowsort label-5100-1
SELECT pk, col0 FROM tab4 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-5100-1
SELECT pk, col0 FROM view_1_tab4_428
----
0
60
9
95

query II rowsort label-5100-2
SELECT pk, col0 FROM view_2_tab4_428
----
16 values hashing to 134d89f2f0d45e79305ce5b1a9ce8f08

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_428 UNION ALL SELECT pk, col0 FROM view_2_tab4_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_428 UNION SELECT pk, col0 FROM view_2_tab4_428
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5100-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0 ) AS tab4_428
----
0
9

query I rowsort label-5100-3
SELECT * FROM view_3_tab4_428
----
0
9

query I rowsort label-5100-3
SELECT pk FROM tab4 WHERE col3 > 94 OR col1 IS NULL AND col0 >= 89 AND col1 < 1.0
----
0
9

statement ok
DROP VIEW view_1_tab4_428

statement ok
DROP VIEW view_2_tab4_428

statement ok
DROP VIEW view_3_tab4_428

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_429') DROP VIEW view_1_tab0_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_429') DROP VIEW view_2_tab0_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_429') DROP VIEW view_3_tab0_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_429

statement ok
CREATE VIEW view_1_tab0_429 AS SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)

statement ok
CREATE VIEW view_2_tab0_429 AS SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))

statement ok
CREATE VIEW view_3_tab0_429 AS SELECT pk FROM view_1_tab0_429

query II rowsort label-5200-1
SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab0_429
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab0_429
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_429 UNION ALL SELECT pk, col0 FROM view_2_tab0_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_429 UNION SELECT pk, col0 FROM view_2_tab0_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) ) AS tab0_429
----
5
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab0_429
----
5
9

query I rowsort label-5200-3
SELECT pk FROM tab0 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
9

statement ok
DROP VIEW view_1_tab0_429

statement ok
DROP VIEW view_2_tab0_429

statement ok
DROP VIEW view_3_tab0_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_429') DROP VIEW view_1_tab1_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_429') DROP VIEW view_2_tab1_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_429') DROP VIEW view_3_tab1_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_429

statement ok
CREATE VIEW view_1_tab1_429 AS SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)

statement ok
CREATE VIEW view_2_tab1_429 AS SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))

statement ok
CREATE VIEW view_3_tab1_429 AS SELECT pk FROM view_1_tab1_429

query II rowsort label-5200-1
SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab1_429
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab1_429
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_429 UNION ALL SELECT pk, col0 FROM view_2_tab1_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_429 UNION SELECT pk, col0 FROM view_2_tab1_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) ) AS tab1_429
----
5
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab1_429
----
5
9

query I rowsort label-5200-3
SELECT pk FROM tab1 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
9

statement ok
DROP VIEW view_1_tab1_429

statement ok
DROP VIEW view_2_tab1_429

statement ok
DROP VIEW view_3_tab1_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_429') DROP VIEW view_1_tab2_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_429') DROP VIEW view_2_tab2_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_429') DROP VIEW view_3_tab2_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_429

statement ok
CREATE VIEW view_1_tab2_429 AS SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)

statement ok
CREATE VIEW view_2_tab2_429 AS SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))

statement ok
CREATE VIEW view_3_tab2_429 AS SELECT pk FROM view_1_tab2_429

query II rowsort label-5200-1
SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab2_429
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab2_429
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_429 UNION ALL SELECT pk, col0 FROM view_2_tab2_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_429 UNION SELECT pk, col0 FROM view_2_tab2_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) ) AS tab2_429
----
5
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab2_429
----
5
9

query I rowsort label-5200-3
SELECT pk FROM tab2 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
9

statement ok
DROP VIEW view_1_tab2_429

statement ok
DROP VIEW view_2_tab2_429

statement ok
DROP VIEW view_3_tab2_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_429') DROP VIEW view_1_tab3_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_429') DROP VIEW view_2_tab3_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_429') DROP VIEW view_3_tab3_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_429

statement ok
CREATE VIEW view_1_tab3_429 AS SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)

statement ok
CREATE VIEW view_2_tab3_429 AS SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))

statement ok
CREATE VIEW view_3_tab3_429 AS SELECT pk FROM view_1_tab3_429

query II rowsort label-5200-1
SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab3_429
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab3_429
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_429 UNION ALL SELECT pk, col0 FROM view_2_tab3_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_429 UNION SELECT pk, col0 FROM view_2_tab3_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) ) AS tab3_429
----
5
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab3_429
----
5
9

query I rowsort label-5200-3
SELECT pk FROM tab3 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
9

statement ok
DROP VIEW view_1_tab3_429

statement ok
DROP VIEW view_2_tab3_429

statement ok
DROP VIEW view_3_tab3_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_429') DROP VIEW view_1_tab4_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_429') DROP VIEW view_2_tab4_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_429') DROP VIEW view_3_tab4_429

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_429

statement ok
CREATE VIEW view_1_tab4_429 AS SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)

statement ok
CREATE VIEW view_2_tab4_429 AS SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))

statement ok
CREATE VIEW view_3_tab4_429 AS SELECT pk FROM view_1_tab4_429

query II rowsort label-5200-1
SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-5200-1
SELECT pk, col0 FROM view_1_tab4_429
----
5
85
9
95

query II rowsort label-5200-2
SELECT pk, col0 FROM view_2_tab4_429
----
16 values hashing to 51a2a550c6b6bc2719c16e743b44c507

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_429 UNION ALL SELECT pk, col0 FROM view_2_tab4_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_429 UNION SELECT pk, col0 FROM view_2_tab4_429
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5200-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54) ) AS tab4_429
----
5
9

query I rowsort label-5200-3
SELECT * FROM view_3_tab4_429
----
5
9

query I rowsort label-5200-3
SELECT pk FROM tab4 WHERE (col1 >= 43.61 AND col4 IN (42.11,97.9,46.38) OR col3 IN (73) AND col3 > 79 OR col0 >= 63 AND ((col1 <= 18.0)) OR col4 <= 22.54)
----
5
9

statement ok
DROP VIEW view_1_tab4_429

statement ok
DROP VIEW view_2_tab4_429

statement ok
DROP VIEW view_3_tab4_429

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_430') DROP VIEW view_1_tab0_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_430') DROP VIEW view_2_tab0_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_430') DROP VIEW view_3_tab0_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_430

statement ok
CREATE VIEW view_1_tab0_430 AS SELECT pk, col0 FROM tab0 WHERE col3 < 23 AND col3 > 15

statement ok
CREATE VIEW view_2_tab0_430 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 23 AND col3 > 15)

statement ok
CREATE VIEW view_3_tab0_430 AS SELECT pk FROM view_1_tab0_430

query II rowsort label-5300-1
SELECT pk, col0 FROM tab0 WHERE col3 < 23 AND col3 > 15
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab0_430
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab0_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 23 AND col3 > 15 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_430 UNION ALL SELECT pk, col0 FROM view_2_tab0_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 23 AND col3 > 15 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_430 UNION SELECT pk, col0 FROM view_2_tab0_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 23 AND col3 > 15 ) AS tab0_430
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab0_430
----

query I rowsort label-5300-3
SELECT pk FROM tab0 WHERE col3 < 23 AND col3 > 15
----

statement ok
DROP VIEW view_1_tab0_430

statement ok
DROP VIEW view_2_tab0_430

statement ok
DROP VIEW view_3_tab0_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_430') DROP VIEW view_1_tab1_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_430') DROP VIEW view_2_tab1_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_430') DROP VIEW view_3_tab1_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_430

statement ok
CREATE VIEW view_1_tab1_430 AS SELECT pk, col0 FROM tab1 WHERE col3 < 23 AND col3 > 15

statement ok
CREATE VIEW view_2_tab1_430 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 23 AND col3 > 15)

statement ok
CREATE VIEW view_3_tab1_430 AS SELECT pk FROM view_1_tab1_430

query II rowsort label-5300-1
SELECT pk, col0 FROM tab1 WHERE col3 < 23 AND col3 > 15
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab1_430
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab1_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 23 AND col3 > 15 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_430 UNION ALL SELECT pk, col0 FROM view_2_tab1_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 23 AND col3 > 15 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_430 UNION SELECT pk, col0 FROM view_2_tab1_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 23 AND col3 > 15 ) AS tab1_430
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab1_430
----

query I rowsort label-5300-3
SELECT pk FROM tab1 WHERE col3 < 23 AND col3 > 15
----

statement ok
DROP VIEW view_1_tab1_430

statement ok
DROP VIEW view_2_tab1_430

statement ok
DROP VIEW view_3_tab1_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_430') DROP VIEW view_1_tab2_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_430') DROP VIEW view_2_tab2_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_430') DROP VIEW view_3_tab2_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_430

statement ok
CREATE VIEW view_1_tab2_430 AS SELECT pk, col0 FROM tab2 WHERE col3 < 23 AND col3 > 15

statement ok
CREATE VIEW view_2_tab2_430 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 23 AND col3 > 15)

statement ok
CREATE VIEW view_3_tab2_430 AS SELECT pk FROM view_1_tab2_430

query II rowsort label-5300-1
SELECT pk, col0 FROM tab2 WHERE col3 < 23 AND col3 > 15
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab2_430
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab2_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 23 AND col3 > 15 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_430 UNION ALL SELECT pk, col0 FROM view_2_tab2_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 23 AND col3 > 15 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_430 UNION SELECT pk, col0 FROM view_2_tab2_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 23 AND col3 > 15 ) AS tab2_430
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab2_430
----

query I rowsort label-5300-3
SELECT pk FROM tab2 WHERE col3 < 23 AND col3 > 15
----

statement ok
DROP VIEW view_1_tab2_430

statement ok
DROP VIEW view_2_tab2_430

statement ok
DROP VIEW view_3_tab2_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_430') DROP VIEW view_1_tab3_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_430') DROP VIEW view_2_tab3_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_430') DROP VIEW view_3_tab3_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_430

statement ok
CREATE VIEW view_1_tab3_430 AS SELECT pk, col0 FROM tab3 WHERE col3 < 23 AND col3 > 15

statement ok
CREATE VIEW view_2_tab3_430 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 23 AND col3 > 15)

statement ok
CREATE VIEW view_3_tab3_430 AS SELECT pk FROM view_1_tab3_430

query II rowsort label-5300-1
SELECT pk, col0 FROM tab3 WHERE col3 < 23 AND col3 > 15
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab3_430
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab3_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 23 AND col3 > 15 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_430 UNION ALL SELECT pk, col0 FROM view_2_tab3_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 23 AND col3 > 15 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_430 UNION SELECT pk, col0 FROM view_2_tab3_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 23 AND col3 > 15 ) AS tab3_430
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab3_430
----

query I rowsort label-5300-3
SELECT pk FROM tab3 WHERE col3 < 23 AND col3 > 15
----

statement ok
DROP VIEW view_1_tab3_430

statement ok
DROP VIEW view_2_tab3_430

statement ok
DROP VIEW view_3_tab3_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_430') DROP VIEW view_1_tab4_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_430') DROP VIEW view_2_tab4_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_430') DROP VIEW view_3_tab4_430

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_430

statement ok
CREATE VIEW view_1_tab4_430 AS SELECT pk, col0 FROM tab4 WHERE col3 < 23 AND col3 > 15

statement ok
CREATE VIEW view_2_tab4_430 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 23 AND col3 > 15)

statement ok
CREATE VIEW view_3_tab4_430 AS SELECT pk FROM view_1_tab4_430

query II rowsort label-5300-1
SELECT pk, col0 FROM tab4 WHERE col3 < 23 AND col3 > 15
----

query II rowsort label-5300-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-5300-1
SELECT pk, col0 FROM view_1_tab4_430
----

query II rowsort label-5300-2
SELECT pk, col0 FROM view_2_tab4_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 23 AND col3 > 15 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_430 UNION ALL SELECT pk, col0 FROM view_2_tab4_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 23 AND col3 > 15 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 23 AND col3 > 15)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_430 UNION SELECT pk, col0 FROM view_2_tab4_430
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5300-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 23 AND col3 > 15 ) AS tab4_430
----

query I rowsort label-5300-3
SELECT * FROM view_3_tab4_430
----

query I rowsort label-5300-3
SELECT pk FROM tab4 WHERE col3 < 23 AND col3 > 15
----

statement ok
DROP VIEW view_1_tab4_430

statement ok
DROP VIEW view_2_tab4_430

statement ok
DROP VIEW view_3_tab4_430

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_431') DROP VIEW view_1_tab0_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_431') DROP VIEW view_2_tab0_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_431') DROP VIEW view_3_tab0_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_431

statement ok
CREATE VIEW view_1_tab0_431 AS SELECT pk, col0 FROM tab0 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29

statement ok
CREATE VIEW view_2_tab0_431 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)

statement ok
CREATE VIEW view_3_tab0_431 AS SELECT pk FROM view_1_tab0_431

query II rowsort label-5400-1
SELECT pk, col0 FROM tab0 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
3
23

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab0_431
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab0_431
----
3
23

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_431 UNION ALL SELECT pk, col0 FROM view_2_tab0_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_431 UNION SELECT pk, col0 FROM view_2_tab0_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 ) AS tab0_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT * FROM view_3_tab0_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT pk FROM tab0 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab0_431

statement ok
DROP VIEW view_2_tab0_431

statement ok
DROP VIEW view_3_tab0_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_431') DROP VIEW view_1_tab1_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_431') DROP VIEW view_2_tab1_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_431') DROP VIEW view_3_tab1_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_431

statement ok
CREATE VIEW view_1_tab1_431 AS SELECT pk, col0 FROM tab1 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29

statement ok
CREATE VIEW view_2_tab1_431 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)

statement ok
CREATE VIEW view_3_tab1_431 AS SELECT pk FROM view_1_tab1_431

query II rowsort label-5400-1
SELECT pk, col0 FROM tab1 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
3
23

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab1_431
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab1_431
----
3
23

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_431 UNION ALL SELECT pk, col0 FROM view_2_tab1_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_431 UNION SELECT pk, col0 FROM view_2_tab1_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 ) AS tab1_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT * FROM view_3_tab1_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT pk FROM tab1 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab1_431

statement ok
DROP VIEW view_2_tab1_431

statement ok
DROP VIEW view_3_tab1_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_431') DROP VIEW view_1_tab2_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_431') DROP VIEW view_2_tab2_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_431') DROP VIEW view_3_tab2_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_431

statement ok
CREATE VIEW view_1_tab2_431 AS SELECT pk, col0 FROM tab2 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29

statement ok
CREATE VIEW view_2_tab2_431 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)

statement ok
CREATE VIEW view_3_tab2_431 AS SELECT pk FROM view_1_tab2_431

query II rowsort label-5400-1
SELECT pk, col0 FROM tab2 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
3
23

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab2_431
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab2_431
----
3
23

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_431 UNION ALL SELECT pk, col0 FROM view_2_tab2_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_431 UNION SELECT pk, col0 FROM view_2_tab2_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 ) AS tab2_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT * FROM view_3_tab2_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT pk FROM tab2 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab2_431

statement ok
DROP VIEW view_2_tab2_431

statement ok
DROP VIEW view_3_tab2_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_431') DROP VIEW view_1_tab3_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_431') DROP VIEW view_2_tab3_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_431') DROP VIEW view_3_tab3_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_431

statement ok
CREATE VIEW view_1_tab3_431 AS SELECT pk, col0 FROM tab3 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29

statement ok
CREATE VIEW view_2_tab3_431 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)

statement ok
CREATE VIEW view_3_tab3_431 AS SELECT pk FROM view_1_tab3_431

query II rowsort label-5400-1
SELECT pk, col0 FROM tab3 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
3
23

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab3_431
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab3_431
----
3
23

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_431 UNION ALL SELECT pk, col0 FROM view_2_tab3_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_431 UNION SELECT pk, col0 FROM view_2_tab3_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 ) AS tab3_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT * FROM view_3_tab3_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT pk FROM tab3 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab3_431

statement ok
DROP VIEW view_2_tab3_431

statement ok
DROP VIEW view_3_tab3_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_431') DROP VIEW view_1_tab4_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_431') DROP VIEW view_2_tab4_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_431') DROP VIEW view_3_tab4_431

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_431

statement ok
CREATE VIEW view_1_tab4_431 AS SELECT pk, col0 FROM tab4 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29

statement ok
CREATE VIEW view_2_tab4_431 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)

statement ok
CREATE VIEW view_3_tab4_431 AS SELECT pk FROM view_1_tab4_431

query II rowsort label-5400-1
SELECT pk, col0 FROM tab4 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
3
23

query II rowsort label-5400-1
SELECT pk, col0 FROM view_1_tab4_431
----
18 values hashing to 15d8b39a848e33215a2b48d99e8bfc79

query II rowsort label-5400-2
SELECT pk, col0 FROM view_2_tab4_431
----
3
23

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_431 UNION ALL SELECT pk, col0 FROM view_2_tab4_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 UNION SELECT pk, col0 FROM tab4 WHERE NOT (col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29)
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_431 UNION SELECT pk, col0 FROM view_2_tab4_431
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5400-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29 ) AS tab4_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT * FROM view_3_tab4_431
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

query I rowsort label-5400-3
SELECT pk FROM tab4 WHERE col3 < 39 OR col3 > 30 AND col3 > 7 AND col3 > 59 OR col0 = 6 AND col4 >= 59.29
----
9 values hashing to 39e3d4d27bae24c9e33e78b000cc7d61

statement ok
DROP VIEW view_1_tab4_431

statement ok
DROP VIEW view_2_tab4_431

statement ok
DROP VIEW view_3_tab4_431

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_432') DROP VIEW view_1_tab0_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_432') DROP VIEW view_2_tab0_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_432') DROP VIEW view_3_tab0_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_432

statement ok
CREATE VIEW view_1_tab0_432 AS SELECT pk, col0 FROM tab0 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))

statement ok
CREATE VIEW view_2_tab0_432 AS SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))

statement ok
CREATE VIEW view_3_tab0_432 AS SELECT pk FROM view_1_tab0_432

query II rowsort label-5500-1
SELECT pk, col0 FROM tab0 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab0_432
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab0_432
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_432 UNION ALL SELECT pk, col0 FROM view_2_tab0_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION SELECT pk, col0 FROM tab0 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_432 UNION SELECT pk, col0 FROM view_2_tab0_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) ) AS tab0_432
----
4

query I rowsort label-5500-3
SELECT * FROM view_3_tab0_432
----
4

query I rowsort label-5500-3
SELECT pk FROM tab0 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4

statement ok
DROP VIEW view_1_tab0_432

statement ok
DROP VIEW view_2_tab0_432

statement ok
DROP VIEW view_3_tab0_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_432') DROP VIEW view_1_tab1_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_432') DROP VIEW view_2_tab1_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_432') DROP VIEW view_3_tab1_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_432

statement ok
CREATE VIEW view_1_tab1_432 AS SELECT pk, col0 FROM tab1 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))

statement ok
CREATE VIEW view_2_tab1_432 AS SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))

statement ok
CREATE VIEW view_3_tab1_432 AS SELECT pk FROM view_1_tab1_432

query II rowsort label-5500-1
SELECT pk, col0 FROM tab1 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab1_432
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab1_432
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_432 UNION ALL SELECT pk, col0 FROM view_2_tab1_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION SELECT pk, col0 FROM tab1 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_432 UNION SELECT pk, col0 FROM view_2_tab1_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) ) AS tab1_432
----
4

query I rowsort label-5500-3
SELECT * FROM view_3_tab1_432
----
4

query I rowsort label-5500-3
SELECT pk FROM tab1 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4

statement ok
DROP VIEW view_1_tab1_432

statement ok
DROP VIEW view_2_tab1_432

statement ok
DROP VIEW view_3_tab1_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_432') DROP VIEW view_1_tab2_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_432') DROP VIEW view_2_tab2_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_432') DROP VIEW view_3_tab2_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_432

statement ok
CREATE VIEW view_1_tab2_432 AS SELECT pk, col0 FROM tab2 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))

statement ok
CREATE VIEW view_2_tab2_432 AS SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))

statement ok
CREATE VIEW view_3_tab2_432 AS SELECT pk FROM view_1_tab2_432

query II rowsort label-5500-1
SELECT pk, col0 FROM tab2 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab2_432
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab2_432
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_432 UNION ALL SELECT pk, col0 FROM view_2_tab2_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION SELECT pk, col0 FROM tab2 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_432 UNION SELECT pk, col0 FROM view_2_tab2_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) ) AS tab2_432
----
4

query I rowsort label-5500-3
SELECT * FROM view_3_tab2_432
----
4

query I rowsort label-5500-3
SELECT pk FROM tab2 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4

statement ok
DROP VIEW view_1_tab2_432

statement ok
DROP VIEW view_2_tab2_432

statement ok
DROP VIEW view_3_tab2_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_432') DROP VIEW view_1_tab3_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_432') DROP VIEW view_2_tab3_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_432') DROP VIEW view_3_tab3_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_432

statement ok
CREATE VIEW view_1_tab3_432 AS SELECT pk, col0 FROM tab3 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))

statement ok
CREATE VIEW view_2_tab3_432 AS SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))

statement ok
CREATE VIEW view_3_tab3_432 AS SELECT pk FROM view_1_tab3_432

query II rowsort label-5500-1
SELECT pk, col0 FROM tab3 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab3_432
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab3_432
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_432 UNION ALL SELECT pk, col0 FROM view_2_tab3_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION SELECT pk, col0 FROM tab3 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_432 UNION SELECT pk, col0 FROM view_2_tab3_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) ) AS tab3_432
----
4

query I rowsort label-5500-3
SELECT * FROM view_3_tab3_432
----
4

query I rowsort label-5500-3
SELECT pk FROM tab3 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4

statement ok
DROP VIEW view_1_tab3_432

statement ok
DROP VIEW view_2_tab3_432

statement ok
DROP VIEW view_3_tab3_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_432') DROP VIEW view_1_tab4_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_432') DROP VIEW view_2_tab4_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_432') DROP VIEW view_3_tab4_432

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_432

statement ok
CREATE VIEW view_1_tab4_432 AS SELECT pk, col0 FROM tab4 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))

statement ok
CREATE VIEW view_2_tab4_432 AS SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))

statement ok
CREATE VIEW view_3_tab4_432 AS SELECT pk FROM view_1_tab4_432

query II rowsort label-5500-1
SELECT pk, col0 FROM tab4 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-5500-1
SELECT pk, col0 FROM view_1_tab4_432
----
4
18

query II rowsort label-5500-2
SELECT pk, col0 FROM view_2_tab4_432
----
18 values hashing to 9df3dfe9a2199e3d7019043a6e25f57e

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION ALL SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_432 UNION ALL SELECT pk, col0 FROM view_2_tab4_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab4 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) UNION SELECT pk, col0 FROM tab4 WHERE NOT ((((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab4_432 UNION SELECT pk, col0 FROM view_2_tab4_432
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5500-3
SELECT pk FROM ( SELECT pk, col0 FROM tab4 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30)) ) AS tab4_432
----
4

query I rowsort label-5500-3
SELECT * FROM view_3_tab4_432
----
4

query I rowsort label-5500-3
SELECT pk FROM tab4 WHERE (((col3 > 10) OR col3 = 35) AND ((col4 <= 2.42) OR col1 >= 82.10) AND (col4 > 33.30))
----
4

statement ok
DROP VIEW view_1_tab4_432

statement ok
DROP VIEW view_2_tab4_432

statement ok
DROP VIEW view_3_tab4_432

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab0_433') DROP VIEW view_1_tab0_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab0_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab0_433') DROP VIEW view_2_tab0_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab0_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab0_433') DROP VIEW view_3_tab0_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab0_433

statement ok
CREATE VIEW view_1_tab0_433 AS SELECT pk, col0 FROM tab0 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)

statement ok
CREATE VIEW view_2_tab0_433 AS SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))

statement ok
CREATE VIEW view_3_tab0_433 AS SELECT pk FROM view_1_tab0_433

query II rowsort label-5600-1
SELECT pk, col0 FROM tab0 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab0_433
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab0_433
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION ALL SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_433 UNION ALL SELECT pk, col0 FROM view_2_tab0_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab0 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION SELECT pk, col0 FROM tab0 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab0_433 UNION SELECT pk, col0 FROM view_2_tab0_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab0 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) ) AS tab0_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab0_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT pk FROM tab0 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
0
1
2
7
9

statement ok
DROP VIEW view_1_tab0_433

statement ok
DROP VIEW view_2_tab0_433

statement ok
DROP VIEW view_3_tab0_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab1_433') DROP VIEW view_1_tab1_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab1_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab1_433') DROP VIEW view_2_tab1_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab1_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab1_433') DROP VIEW view_3_tab1_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab1_433

statement ok
CREATE VIEW view_1_tab1_433 AS SELECT pk, col0 FROM tab1 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)

statement ok
CREATE VIEW view_2_tab1_433 AS SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))

statement ok
CREATE VIEW view_3_tab1_433 AS SELECT pk FROM view_1_tab1_433

query II rowsort label-5600-1
SELECT pk, col0 FROM tab1 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab1_433
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab1_433
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION ALL SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_433 UNION ALL SELECT pk, col0 FROM view_2_tab1_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab1 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION SELECT pk, col0 FROM tab1 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab1_433 UNION SELECT pk, col0 FROM view_2_tab1_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab1 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) ) AS tab1_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab1_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT pk FROM tab1 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
0
1
2
7
9

statement ok
DROP VIEW view_1_tab1_433

statement ok
DROP VIEW view_2_tab1_433

statement ok
DROP VIEW view_3_tab1_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab2_433') DROP VIEW view_1_tab2_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab2_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab2_433') DROP VIEW view_2_tab2_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab2_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab2_433') DROP VIEW view_3_tab2_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab2_433

statement ok
CREATE VIEW view_1_tab2_433 AS SELECT pk, col0 FROM tab2 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)

statement ok
CREATE VIEW view_2_tab2_433 AS SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))

statement ok
CREATE VIEW view_3_tab2_433 AS SELECT pk FROM view_1_tab2_433

query II rowsort label-5600-1
SELECT pk, col0 FROM tab2 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab2_433
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab2_433
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION ALL SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_433 UNION ALL SELECT pk, col0 FROM view_2_tab2_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab2 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION SELECT pk, col0 FROM tab2 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab2_433 UNION SELECT pk, col0 FROM view_2_tab2_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab2 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) ) AS tab2_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab2_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT pk FROM tab2 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
0
1
2
7
9

statement ok
DROP VIEW view_1_tab2_433

statement ok
DROP VIEW view_2_tab2_433

statement ok
DROP VIEW view_3_tab2_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab3_433') DROP VIEW view_1_tab3_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab3_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab3_433') DROP VIEW view_2_tab3_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab3_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab3_433') DROP VIEW view_3_tab3_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab3_433

statement ok
CREATE VIEW view_1_tab3_433 AS SELECT pk, col0 FROM tab3 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)

statement ok
CREATE VIEW view_2_tab3_433 AS SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))

statement ok
CREATE VIEW view_3_tab3_433 AS SELECT pk FROM view_1_tab3_433

query II rowsort label-5600-1
SELECT pk, col0 FROM tab3 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-5600-1
SELECT pk, col0 FROM view_1_tab3_433
----
10 values hashing to 44a3e12141b55dc9311780cb9a28711b

query II rowsort label-5600-2
SELECT pk, col0 FROM view_2_tab3_433
----
10 values hashing to f9f0786834ff861a24351726e06eafc3

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION ALL SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_433 UNION ALL SELECT pk, col0 FROM view_2_tab3_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM tab3 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) UNION SELECT pk, col0 FROM tab3 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query II rowsort label-all
SELECT pk, col0 FROM view_1_tab3_433 UNION SELECT pk, col0 FROM view_2_tab3_433
----
20 values hashing to 73719e959c2a2fe1cfe419b451954eef

query I rowsort label-5600-3
SELECT pk FROM ( SELECT pk, col0 FROM tab3 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35) ) AS tab3_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT * FROM view_3_tab3_433
----
0
1
2
7
9

query I rowsort label-5600-3
SELECT pk FROM tab3 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)
----
0
1
2
7
9

statement ok
DROP VIEW view_1_tab3_433

statement ok
DROP VIEW view_2_tab3_433

statement ok
DROP VIEW view_3_tab3_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_1_tab4_433') DROP VIEW view_1_tab4_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_1_tab4_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_2_tab4_433') DROP VIEW view_2_tab4_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_2_tab4_433

onlyif mssql # IF EXISTS support: 
statement ok
IF EXISTS (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'view_3_tab4_433') DROP VIEW view_3_tab4_433

skipif mssql # not compatible
statement ok
DROP VIEW IF EXISTS view_3_tab4_433

statement ok
CREATE VIEW view_1_tab4_433 AS SELECT pk, col0 FROM tab4 WHERE col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35)

statement ok
CREATE VIEW view_2_tab4_433 AS SELECT pk, col0 FROM tab4 WHERE NOT (col3 > 75 OR ((col1 >= 42.4 AND col3 < 58 AND col1 >= 43.65 AND col0 > 61)) OR (col3 <= 35))

statement ok
CREATE VIEW view_3_tab4_433 AS SELECT pk FROM view_1_tab4_433

query II rowsort label-5600-